commit:     1e05f5e3002c97755380fe28ad2f9fb9450a97b8
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 27 05:55:43 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Mar 27 05:55:43 2016 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=1e05f5e3

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 <AT> gentoo.org>

 gen_compile.sh | 41 ++++++++++++++++++++---------------------
 1 file 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}"
 }

Reply via email to