1 |
commit: 1e05f5e3002c97755380fe28ad2f9fb9450a97b8 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 27 05:55:43 2016 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 27 05:55:43 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=1e05f5e3 |
7 |
|
8 |
always respect kernel settings |
9 |
|
10 |
Just because someone has passed the cross-compile flag does not mean |
11 |
the other settings are not interesting as well. The cross-compile |
12 |
prefix is used for many tools, but genkernel only allows for setting |
13 |
of a few, and the other settings (like arch and output dir) should |
14 |
not be completely ignored. |
15 |
|
16 |
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org> |
17 |
|
18 |
gen_compile.sh | 41 ++++++++++++++++++++--------------------- |
19 |
1 file changed, 20 insertions(+), 21 deletions(-) |
20 |
|
21 |
diff --git a/gen_compile.sh b/gen_compile.sh |
22 |
index 9b9dc5b..554e645 100755 |
23 |
--- a/gen_compile.sh |
24 |
+++ b/gen_compile.sh |
25 |
@@ -8,27 +8,26 @@ compile_kernel_args() { |
26 |
if [ "${KERNEL_CROSS_COMPILE}" != '' ] |
27 |
then |
28 |
ARGS="${ARGS} CROSS_COMPILE=\"${KERNEL_CROSS_COMPILE}\"" |
29 |
- else |
30 |
- if [ "${KERNEL_CC}" != '' ] |
31 |
- then |
32 |
- ARGS="CC=\"${KERNEL_CC}\"" |
33 |
- fi |
34 |
- if [ "${KERNEL_LD}" != '' ] |
35 |
- then |
36 |
- ARGS="${ARGS} LD=\"${KERNEL_LD}\"" |
37 |
- fi |
38 |
- if [ "${KERNEL_AS}" != '' ] |
39 |
- then |
40 |
- ARGS="${ARGS} AS=\"${KERNEL_AS}\"" |
41 |
- fi |
42 |
- if [ -n "${KERNEL_ARCH}" ] |
43 |
- then |
44 |
- ARGS="${ARGS} ARCH=\"${KERNEL_ARCH}\"" |
45 |
- fi |
46 |
- if [ -n "${KERNEL_OUTPUTDIR}" -a "${KERNEL_OUTPUTDIR}" != "${KERNEL_DIR}" ] |
47 |
- then |
48 |
- ARGS="${ARGS} O=\"${KERNEL_OUTPUTDIR}\"" |
49 |
- fi |
50 |
+ fi |
51 |
+ if [ "${KERNEL_CC}" != '' ] |
52 |
+ then |
53 |
+ ARGS="CC=\"${KERNEL_CC}\"" |
54 |
+ fi |
55 |
+ if [ "${KERNEL_LD}" != '' ] |
56 |
+ then |
57 |
+ ARGS="${ARGS} LD=\"${KERNEL_LD}\"" |
58 |
+ fi |
59 |
+ if [ "${KERNEL_AS}" != '' ] |
60 |
+ then |
61 |
+ ARGS="${ARGS} AS=\"${KERNEL_AS}\"" |
62 |
+ fi |
63 |
+ if [ -n "${KERNEL_ARCH}" ] |
64 |
+ then |
65 |
+ ARGS="${ARGS} ARCH=\"${KERNEL_ARCH}\"" |
66 |
+ fi |
67 |
+ if [ -n "${KERNEL_OUTPUTDIR}" -a "${KERNEL_OUTPUTDIR}" != "${KERNEL_DIR}" ] |
68 |
+ then |
69 |
+ ARGS="${ARGS} O=\"${KERNEL_OUTPUTDIR}\"" |
70 |
fi |
71 |
echo -n "${ARGS}" |
72 |
} |