git: initrd: Handle ${DESTDIR} when building rescue tools

Aaron LI aly at crater.dragonflybsd.org
Wed Jul 4 02:50:49 PDT 2018


commit 4e60e668e7ed5a59f1bb342d7c6dd2d678a4b93f
Author: Aaron LI <aly at aaronly.me>
Date:   Wed Jun 27 09:36:05 2018 +0800

    initrd: Handle ${DESTDIR} when building rescue tools
    
    When building rescue tools for a target system (e.g., create release
    build), use tools (e.g., crunchide, crunchgen, cc), headers and libraries
    from the target root (${DESTDIR}).
    
    NOTE:
    GCC is more tolerant (e.g., doesn't warn about unused variables) to
    system headers than user headers, so we have to use "-isystem <inc_dir>"
    instead of "-I<dir>", but the former (option syntax) causes difficulty
    for <bsd.dep.mk> to filter the options to call mkdep(1).  Therefore, we
    use "--sysroot=${DESTDIR}" and it's simpler than specifying headers paths
    with "-I<dir>" and library paths with "-L<dir>".
    
    Meanwhile, improve the commands logic in Makefile, and set LC_ALL=C.

Summary of changes:
 initrd/Makefile                  | 19 +++++++++----------
 initrd/Makefile.inc              | 15 ++++++++++++---
 initrd/rescue.libcrypto/Makefile |  2 +-
 initrd/rescue/Makefile           |  2 +-
 share/mk/bsd.crunchgen.mk        | 16 +++++++++++++---
 share/mk/bsd.dep.mk              |  2 ++
 6 files changed, 38 insertions(+), 18 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4e60e668e7ed5a59f1bb342d7c6dd2d678a4b93f


-- 
DragonFly BSD source repository



More information about the Commits mailing list