commit: 6ea3cd1f1525fdadb9faabfe8183e22b4836acdf Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> AuthorDate: Thu Aug 27 20:55:56 2020 +0000 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> CommitDate: Fri Aug 28 13:45:21 2020 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=6ea3cd1f
defaults/config.sh: Add DEFAULT_<TYPE>_<TCVAR> to allow override _tc-getPROG() can only override variable with user provided value when there is a default value. Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> defaults/config.sh | 26 ++++++++++++++++++++------ gen_determineargs.sh | 26 +++++++++++++++++++++----- 2 files changed, 41 insertions(+), 11 deletions(-) diff --git a/defaults/config.sh b/defaults/config.sh index f8cb311..a5d9ea3 100644 --- a/defaults/config.sh +++ b/defaults/config.sh @@ -37,18 +37,32 @@ DEFAULT_MAKEOPTS="${PORTAGE_MAKEOPTS:- -j$(nproc)}" DEFAULT_MODULEREBUILD_CMD="emerge --ignore-default-opts --buildpkg=n --usepkg=n --quiet-build=y @module-rebuild" -DEFAULT_KERNEL_MAKE=make -DEFAULT_UTILS_MAKE=make - -DEFAULT_KERNEL_CC=gcc DEFAULT_KERNEL_AS=as +DEFAULT_KERNEL_AR=ar +DEFAULT_KERNEL_CC=gcc +DEFAULT_KERNEL_CXX=g++ DEFAULT_KERNEL_LD=ld +DEFAULT_KERNEL_NM=nm +DEFAULT_KERNEL_MAKE=make +DEFAULT_KERNEL_OBJCOPY=objcopy +DEFAULT_KERNEL_OBJDUMP=objdump +DEFAULT_KERNEL_RANLIB=ranlib +DEFAULT_KERNEL_READELF=readelf +DEFAULT_KERNEL_STRIP=strip -DEFAULT_UTILS_CFLAGS="-Os -pipe -fomit-frame-pointer" +DEFAULT_UTILS_AS=as +DEFAULT_UTILS_AR=ar DEFAULT_UTILS_CC=gcc +DEFAULT_UTILS_CFLAGS="-Os -pipe -fomit-frame-pointer" DEFAULT_UTILS_CXX=g++ -DEFAULT_UTILS_AS=as DEFAULT_UTILS_LD=ld +DEFAULT_UTILS_NM=nm +DEFAULT_UTILS_MAKE=make +DEFAULT_UTILS_OBJCOPY=objcopy +DEFAULT_UTILS_OBJDUMP=objdump +DEFAULT_UTILS_RANLIB=ranlib +DEFAULT_UTILS_READELF=readelf +DEFAULT_UTILS_STRIP=strip PORTAGE_CHOST="$(portageq envvar CHOST)" DEFAULT_CHOST="${PORTAGE_CHOST:-$(${DEFAULT_UTILS_CC} -dumpmachine 2>/dev/null)}" diff --git a/gen_determineargs.sh b/gen_determineargs.sh index 7332bb0..0fe8886 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -318,16 +318,32 @@ determine_real_args() { set_config_with_override STRING CHOST CMD_CHOST "${DEFAULT_CHOST}" set_config_with_override STRING MAKEOPTS CMD_MAKEOPTS "${DEFAULT_MAKEOPTS}" set_config_with_override STRING NICE CMD_NICE "10" - set_config_with_override STRING KERNEL_MAKE CMD_KERNEL_MAKE "${DEFAULT_KERNEL_MAKE}" - set_config_with_override STRING UTILS_CFLAGS CMD_UTILS_CFLAGS "${DEFAULT_UTILS_CFLAGS}" - set_config_with_override STRING UTILS_MAKE CMD_UTILS_MAKE "${DEFAULT_UTILS_MAKE}" + set_config_with_override STRING KERNEL_AS CMD_KERNEL_AS "${DEFAULT_KERNEL_AS}" + set_config_with_override STRING KERNEL_AR CMD_KERNEL_AR "${DEFAULT_KERNEL_AR}" set_config_with_override STRING KERNEL_CC CMD_KERNEL_CC "${DEFAULT_KERNEL_CC}" + set_config_with_override STRING KERNEL_CFLAGS CMD_KERNEL_CFLAGS "${DEFAULT_KERNEL_CFLAGS}" + set_config_with_override STRING KERNEL_CXX CMD_KERNEL_CXX "${DEFAULT_KERNEL_CXX}" set_config_with_override STRING KERNEL_LD CMD_KERNEL_LD "${DEFAULT_KERNEL_LD}" - set_config_with_override STRING KERNEL_AS CMD_KERNEL_AS "${DEFAULT_KERNEL_AS}" + set_config_with_override STRING KERNEL_NM CMD_KERNEL_NM "${DEFAULT_KERNEL_NM}" + set_config_with_override STRING KERNEL_MAKE CMD_KERNEL_MAKE "${DEFAULT_KERNEL_MAKE}" + set_config_with_override STRING KERNEL_OBJCOPY CMD_KERNEL_OBJCOPY "${DEFAULT_KERNEL_OBJCOPY}" + set_config_with_override STRING KERNEL_OBJDUMP CMD_KERNEL_OBJDUMP "${DEFAULT_KERNEL_OBJDUMP}" + set_config_with_override STRING KERNEL_RANLIB CMD_KERNEL_RANLIB "${DEFAULT_KERNEL_RANLIB}" + set_config_with_override STRING KERNEL_READELF CMD_KERNEL_READELF "${DEFAULT_KERNEL_READELF}" + set_config_with_override STRING KERNEL_STRIP CMD_KERNEL_STRIP "${DEFAULT_KERNEL_STRIP}" + set_config_with_override STRING UTILS_AS CMD_UTILS_AS "${DEFAULT_UTILS_AS}" + set_config_with_override STRING UTILS_AR CMD_UTILS_AR "${DEFAULT_UTILS_AR}" set_config_with_override STRING UTILS_CC CMD_UTILS_CC "${DEFAULT_UTILS_CC}" + set_config_with_override STRING UTILS_CFLAGS CMD_UTILS_CFLAGS "${DEFAULT_UTILS_CFLAGS}" set_config_with_override STRING UTILS_CXX CMD_UTILS_CXX "${DEFAULT_UTILS_CXX}" set_config_with_override STRING UTILS_LD CMD_UTILS_LD "${DEFAULT_UTILS_LD}" - set_config_with_override STRING UTILS_AS CMD_UTILS_AS "${DEFAULT_UTILS_AS}" + set_config_with_override STRING UTILS_NM CMD_UTILS_NM "${DEFAULT_UTILS_NM}" + set_config_with_override STRING UTILS_MAKE CMD_UTILS_MAKE "${DEFAULT_UTILS_MAKE}" + set_config_with_override STRING UTILS_OBJCOPY CMD_UTILS_OBJCOPY "${DEFAULT_UTILS_OBJCOPY}" + set_config_with_override STRING UTILS_OBJDUMP CMD_UTILS_OBJDUMP "${DEFAULT_UTILS_OBJDUMP}" + set_config_with_override STRING UTILS_RANLIB CMD_UTILS_RANLIB "${DEFAULT_UTILS_RANLIB}" + set_config_with_override STRING UTILS_READELF CMD_UTILS_READELF "${DEFAULT_UTILS_READELF}" + set_config_with_override STRING UTILS_STRIP CMD_UTILS_STRIP "${DEFAULT_UTILS_STRIP}" set_config_with_override STRING CROSS_COMPILE CMD_CROSS_COMPILE set_config_with_override STRING BOOTDIR CMD_BOOTDIR "/boot"