summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2017-03-15 21:21:22 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2017-03-15 21:21:22 +0100
commit113fbf87bde97b997474eff124bef406a77482fb (patch)
treeb73d8e3e61089c9703afa3c4651c686fecb4c701 /toolchain
parentbed6fa71872e353244159ad8864b13cd50210777 (diff)
glibc: fix toolchain building in debug mode
Instead of trying to have a list of CFLAGS which need to be filtered out, just add some working FLAGS for GNU C library toolchain compilation.
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/glibc/Makefile19
1 files changed, 5 insertions, 14 deletions
diff --git a/toolchain/glibc/Makefile b/toolchain/glibc/Makefile
index 3005eee19..bbc09b924 100644
--- a/toolchain/glibc/Makefile
+++ b/toolchain/glibc/Makefile
@@ -6,29 +6,20 @@ include ../rules.mk
include Makefile.inc
include ${ADK_TOPDIR}/mk/buildhlp.mk
-TARGET_CFLAGS:= $(filter-out -ffast-math,$(TARGET_CFLAGS))
-TARGET_CFLAGS:= $(filter-out -fno-asynchronous-unwind-tables,$(TARGET_CFLAGS))
-TARGET_CFLAGS:= $(filter-out -fstack-protector-all,$(TARGET_CFLAGS))
-TARGET_LDFLAGS:= $(filter-out -fstack-protector-all,$(TARGET_LDFLAGS))
-
-# glibc does not compile with Os
-TARGET_CFLAGS:= $(subst Os,O2,$(TARGET_CFLAGS))
-TARGET_CXXFLAGS:= $(subst Os,O2,$(TARGET_CXXFLAGS))
ifneq ($(ADK_DEBUG),)
-TARGET_CFLAGS+= -O2
-TARGET_CXXFLAGS+= -O2
+GLIBC_FLAGS:= -O2 -g3
+else
+GLIBC_FLAGS:= -O2
endif
GLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \
--host=$(GNU_TARGET_NAME) \
--with-headers=$(STAGING_TARGET_DIR)/usr/include \
--disable-sanity-checks \
- --disable-werror \
--disable-nls \
--disable-werror \
--without-cvs \
--disable-profile \
- --disable-debug \
--without-gd \
--disable-nscd \
--with-__thread \
@@ -45,8 +36,8 @@ endif
GLIBC_ENV:= PATH='${TARGET_PATH}' \
BUILD_CC=${CC_FOR_BUILD} \
- CFLAGS="$(TARGET_CFLAGS)" \
- CXXFLAGS="$(TARGET_CXXFLAGS)" \
+ CFLAGS="$(GLIBC_FLAGS)" \
+ CXXFLAGS="$(GLIBC_FLAGS)" \
CC="${TARGET_CC}" \
CXX="${TARGET_CXX}" \
AR="${TARGET_AR}" \