summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2017-09-06 19:09:03 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2017-09-06 19:10:58 +0200
commit1c0bee6188553ef0475367da1fa8d518b3a5bc24 (patch)
tree030abf6ab929ee53458f46a551334d6a0fdb612a /toolchain
parentf9f38228a49db180501b44c399c516eab1812379 (diff)
frosted: finetune, remove menuconfig warnings
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/Makefile2
-rw-r--r--toolchain/gcc/Makefile10
-rw-r--r--toolchain/newlib/Makefile8
3 files changed, 12 insertions, 8 deletions
diff --git a/toolchain/Makefile b/toolchain/Makefile
index fb46789f2..2502d3f15 100644
--- a/toolchain/Makefile
+++ b/toolchain/Makefile
@@ -40,7 +40,7 @@ TARGETS+=newlib
CLIB:=newlib
endif
-ifeq ($(ADK_TARGET_BINFMT_FLAT),y)
+ifeq ($(ADK_TARGET_BINFMT_FLAT)$(ADK_TARGET_OS_FROSTED),y)
TARGETS+=elf2flt
ELF2FLT:=elf2flt-install
endif
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 1cb0d2540..095e6649a 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -51,10 +51,6 @@ GCC_CONFOPTS:= --prefix=$(TOOLCHAIN_DIR)/usr \
--disable-werror \
--disable-nls
-ifeq ($(ADK_TARGET_LIB_NEWLIB),y)
-GCC_FINAL_CONFOPTS:= --with-newlib
-endif
-
ifeq ($(ADK_TARGET_WITH_NPTL),y)
GCC_FINAL_CONFOPTS:= --enable-tls --enable-threads --enable-libatomic
GCC_TLS_CONFOPTS:= --enable-tls
@@ -68,7 +64,11 @@ GCC_FINAL_CONFOPTS:= --disable-tls --disable-threads --disable-libatomic
GCC_TLS_CONFOPTS:= --disable-tls
endif
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
+ifeq ($(ADK_TARGET_LIB_NEWLIB),y)
+GCC_FINAL_CONFOPTS+= --with-newlib
+endif
+
+ifeq ($(ADK_TARGET_OS_FROSTED)$(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
GCC_FINAL_CONFOPTS+= --disable-shared
else
GCC_FINAL_CONFOPTS+= --enable-shared --enable-cxx-flags='-fPIC'
diff --git a/toolchain/newlib/Makefile b/toolchain/newlib/Makefile
index d2b3a5758..abe153107 100644
--- a/toolchain/newlib/Makefile
+++ b/toolchain/newlib/Makefile
@@ -15,6 +15,7 @@ NEWLIB_CONFIGURE_ARGS+= --enable-newlib-fvwrite-in-streamio=no \
--enable-newlib-fseek-optimization=no \
--enable-newlib_wide_orient=no \
--enable-newlib-unbuf-stream-opt=yes
+TARGET_CFLAGS+="-DREENTRANT_SYSCALLS_PROVIDED"
endif
@@ -23,6 +24,7 @@ $(WRKBUILD)/.configured:
CC='' \
CFLAGS='' \
LDFLAGS='' \
+ CFLAGS_FOR_TARGET='$(TARGET_CFLAGS)' \
./configure --prefix=/usr \
--target=$(GNU_TARGET_NAME) \
--disable-nls \
@@ -33,14 +35,16 @@ $(WRKBUILD)/.configured:
$(WRKBUILD)/.compiled:
PATH='$(HOST_PATH)' $(MAKE) -C $(WRKBUILD) \
CC='' \
- CFLAGS='$(TARGET_CFLAGS)' \
+ CFLAGS='' \
+ CFLAGS_FOR_TARGET='$(TARGET_CFLAGS)' \
all
touch $@
$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
PATH='$(HOST_PATH)' $(MAKE) -C $(WRKBUILD) \
CC='' \
- CFLAGS='$(TARGET_CFLAGS)' \
+ CFLAGS='' \
+ CFLAGS_FOR_TARGET='$(TARGET_CFLAGS)' \
DESTDIR=$(STAGING_TARGET_DIR) \
install
touch $@