git: bsd.crunchgen.mk: Pass CFLAGS to "make exe" to enable WARNS

Aaron LI aly at crater.dragonflybsd.org
Sun Jun 21 22:30:49 PDT 2026


commit b1c60d0b1c9b1260bca55b0ba511eca2ac8c522c
Author: Aaron LI <aly at aaronly.me>
Date:   Sun Jun 21 21:06:14 2026 +0800

    bsd.crunchgen.mk: Pass CFLAGS to "make exe" to enable WARNS
    
    The "make exe" phase builds the stub objects and the final crunched
    executable.  Because the crunchgen(1) generated makefile does not
    include any makefile from the system, the ${CFLAGS} was empty and the
    ${WARNS} tunable was ineffective.
    
    By explicitly passing the ${CFLAGS} to the "make exe" phase, the ${WARNS}
    is correctly accounted in the main Makefile (that includes
    <bsd.crunchgen.mk>) and works as expected.
    
    The "make objs" that builds the objects of each individual tool to be
    crunched is not affected.  Those objects are already built with their
    corresponding ${WARNS} and ${CFLAGS}.
    
    As we're explicitly setting the ${CFLAGS}, filter the LTO flags in
    <bsd.crunchgen.mk> and thus revert the previous commit
    a3f29142615c9b60b7f2d6c4eecbf55e595d778b.
    
    Furthermore, since crunchgen(1) is a cross tool that's used during the
    buildworld, temporarily lower the WARNS to 2 for 'rescue' and
    'rescue.libcrypto' until most people have done a *full* buildworld and
    installworld.
    
    Discussed-with: swildner

Summary of changes:
 initrd/rescue.libcrypto/Makefile     | 4 ++++
 initrd/rescue/Makefile               | 4 ++++
 share/mk/bsd.crunchgen.mk            | 1 +
 usr.bin/crunch/crunchgen/crunchgen.c | 5 -----
 4 files changed, 9 insertions(+), 5 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b1c60d0b1c9b1260bca55b0ba511eca2ac8c522c


-- 
DragonFly BSD source repository


More information about the Commits mailing list