From 853337b419c36b856c80ba86245f6fd0323a39a4 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 25 Jan 2022 00:19:46 +0100 Subject: reorder TARGET_CC workarounds --- mk/kernel-vars.mk | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'mk') 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' -- cgit v1.2.3