summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2022-01-25 00:19:46 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2022-02-05 01:51:17 +0100
commit853337b419c36b856c80ba86245f6fd0323a39a4 (patch)
tree853718a1e162274db3d1b14bc1d2fd63fdc9e6a5 /mk
parentda4e7a7fb1ec0fd503022cae2871692d943661cd (diff)
reorder TARGET_CC workarounds
Diffstat (limited to 'mk')
-rw-r--r--mk/kernel-vars.mk17
1 files changed, 9 insertions, 8 deletions
diff --git a/mk/kernel-vars.mk b/mk/kernel-vars.mk
index 80f88bca4..8a5d2053d 100644
--- a/mk/kernel-vars.mk
+++ b/mk/kernel-vars.mk
@@ -1,7 +1,15 @@
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
-KERNEL_MAKE_OPTS:= V=1 \
+KERNEL_MAKE_OPTS:= CC="$(TARGET_CC)"
+ifeq ($(ADK_TARGET_BINFMT_FDPIC),y)
+KERNEL_MAKE_OPTS:= CC="$(TARGET_CC) -mno-fdpic"
+endif
+ifeq ($(ADK_TARGET_ARCH_MICROBLAZE),y)
+KERNEL_MAKE_OPTS:= CC="$(TARGET_CC) -fno-tree-loop-distribute-patterns"
+endif
+
+KERNEL_MAKE_OPTS+= V=1 \
ARCH="$(ADK_TARGET_KARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
HOSTCC="${HOST_CC}" \
@@ -9,13 +17,6 @@ KERNEL_MAKE_OPTS:= V=1 \
SHELL='${SHELL}' \
CONFIG_SHELL='${SHELL}'
-ifeq ($(ADK_TARGET_BINFMT_FDPIC),y)
-KERNEL_MAKE_OPTS+= CC="$(TARGET_CC) -mno-fdpic"
-else
-KERNEL_MAKE_OPTS+= CC="$(TARGET_CC) -fno-tree-loop-distribute-patterns"
-endif
-
-
# regex for relocs needs pcre
ifeq ($(OS_FOR_BUILD),Darwin)
KERNEL_MAKE_OPTS+= HOSTLDFLAGS='-lpcreposix -Wl,-no_pie'