summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2015-03-01 13:12:06 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2015-03-01 13:12:06 +0100
commit874f9c46c0a02893e6ca2cfc32a085c99dc78d28 (patch)
tree46ec8d49c8c659691f12a068f4d0f56ce6d48dd9
parenta32b5466ba4179b5dcc72ec80dd0745d8301f5e7 (diff)
add quirks for clang
-rw-r--r--mk/os.mk11
-rw-r--r--toolchain/gcc/Makefile7
2 files changed, 18 insertions, 0 deletions
diff --git a/mk/os.mk b/mk/os.mk
new file mode 100644
index 000000000..38a2e53f3
--- /dev/null
+++ b/mk/os.mk
@@ -0,0 +1,11 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+# operating system quirks
+ifeq (${OStype},Darwin)
+HOST_CC:=clang -fbracket-depth=1024
+HOST_CXX:=clang++ -fbracket-depth=1024
+else
+HOST_CC:=${CC}
+HOST_CXX:=${CXX}
+endif
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index f38ba051a..65899a334 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -4,6 +4,7 @@
include $(ADK_TOPDIR)/rules.mk
include ../rules.mk
include Makefile.inc
+include $(ADK_TOPDIR)/mk/os.mk
# disable SSP for libstdc++
ifeq ($(ADK_TARGET_LIB_MUSL),y)
@@ -182,6 +183,8 @@ endif
$(SED) '/k prot/agcc_cv_libc_provides_ssp=yes' $(WRKBUILD)/gcc/configure
cd $(GCC_BUILD_DIR_MINIMAL); \
PATH='$(TARGET_PATH)' \
+ CC='$(HOST_CC)' \
+ CXX='$(HOST_CXX)' \
CFLAGS="-O0 -g0 -fomit-frame-pointer" \
CXXFLAGS="-O0 -g0 -fomit-frame-pointer" \
$(WRKBUILD)/configure \
@@ -204,6 +207,8 @@ $(GCC_BUILD_DIR_INITIAL)/.configured:
mkdir -p $(GCC_BUILD_DIR_INITIAL)
cd $(GCC_BUILD_DIR_INITIAL); \
PATH='$(TARGET_PATH)' \
+ CC='$(HOST_CC)' \
+ CXX='$(HOST_CXX)' \
CFLAGS="-O0 -g0 -fomit-frame-pointer" \
CXXFLAGS="-O0 -g0 -fomit-frame-pointer" \
$(WRKBUILD)/configure \
@@ -227,6 +232,8 @@ $(GCC_BUILD_DIR_FINAL)/.configured:
mkdir -p $(GCC_BUILD_DIR_FINAL)
cd $(GCC_BUILD_DIR_FINAL); \
PATH='$(TARGET_PATH)' \
+ CC='$(HOST_CC)' \
+ CXX='$(HOST_CXX)' \
CFLAGS_FOR_TARGET='$(TARGET_CFLAGS)' \
CXXFLAGS_FOR_TARGET='$(TARGET_CXXFLAGS)' \
$(WRKBUILD)/configure \