From 113fbf87bde97b997474eff124bef406a77482fb Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 15 Mar 2017 21:21:22 +0100 Subject: 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. --- toolchain/glibc/Makefile | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'toolchain/glibc/Makefile') 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}" \ -- cgit v1.2.3