diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-03-27 01:55:43 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-03-27 01:55:43 -0400 |
commit | 1e05f5e3002c97755380fe28ad2f9fb9450a97b8 (patch) | |
tree | 86b1c6ecc7d8fde050a7889941bc3bedd5d2cfb0 | |
parent | config.sh: ensure generic config.sh is used again; and refactor duplicate set... (diff) | |
download | genkernel-1e05f5e3002c97755380fe28ad2f9fb9450a97b8.tar.gz genkernel-1e05f5e3002c97755380fe28ad2f9fb9450a97b8.tar.bz2 genkernel-1e05f5e3002c97755380fe28ad2f9fb9450a97b8.zip |
always respect kernel settings
Just because someone has passed the cross-compile flag does not mean
the other settings are not interesting as well. The cross-compile
prefix is used for many tools, but genkernel only allows for setting
of a few, and the other settings (like arch and output dir) should
not be completely ignored.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rwxr-xr-x | gen_compile.sh | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/gen_compile.sh b/gen_compile.sh index 9b9dc5b..554e645 100755 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -8,27 +8,26 @@ compile_kernel_args() { if [ "${KERNEL_CROSS_COMPILE}" != '' ] then ARGS="${ARGS} CROSS_COMPILE=\"${KERNEL_CROSS_COMPILE}\"" - else - if [ "${KERNEL_CC}" != '' ] - then - ARGS="CC=\"${KERNEL_CC}\"" - fi - if [ "${KERNEL_LD}" != '' ] - then - ARGS="${ARGS} LD=\"${KERNEL_LD}\"" - fi - if [ "${KERNEL_AS}" != '' ] - then - ARGS="${ARGS} AS=\"${KERNEL_AS}\"" - fi - if [ -n "${KERNEL_ARCH}" ] - then - ARGS="${ARGS} ARCH=\"${KERNEL_ARCH}\"" - fi - if [ -n "${KERNEL_OUTPUTDIR}" -a "${KERNEL_OUTPUTDIR}" != "${KERNEL_DIR}" ] - then - ARGS="${ARGS} O=\"${KERNEL_OUTPUTDIR}\"" - fi + fi + if [ "${KERNEL_CC}" != '' ] + then + ARGS="CC=\"${KERNEL_CC}\"" + fi + if [ "${KERNEL_LD}" != '' ] + then + ARGS="${ARGS} LD=\"${KERNEL_LD}\"" + fi + if [ "${KERNEL_AS}" != '' ] + then + ARGS="${ARGS} AS=\"${KERNEL_AS}\"" + fi + if [ -n "${KERNEL_ARCH}" ] + then + ARGS="${ARGS} ARCH=\"${KERNEL_ARCH}\"" + fi + if [ -n "${KERNEL_OUTPUTDIR}" -a "${KERNEL_OUTPUTDIR}" != "${KERNEL_DIR}" ] + then + ARGS="${ARGS} O=\"${KERNEL_OUTPUTDIR}\"" fi echo -n "${ARGS}" } |