diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-06-28 21:51:24 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-06-28 21:52:30 +0200 |
commit | 7d9f958d550ee7ac394794738eaa35086a64545d (patch) | |
tree | c92855ba8ae7c86d89cd0d5d8d83acdd0755e86d /toolchain/gcc/Makefile | |
parent | dcd6c2ef08fc808fbb99fcc1ba326505b612360e (diff) |
enable shared libgcc for uClibc/glibc
unfortunately uClibc/glibc uses dlopen to access exception
handling code from libgcc_s.so.1. Pure static build is only
provided by musl.
Diffstat (limited to 'toolchain/gcc/Makefile')
-rw-r--r-- | toolchain/gcc/Makefile | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index c6f57f413..1c95a2f93 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -10,10 +10,6 @@ ifeq ($(ADK_TARGET_LIB_MUSL),y) TARGET_CXXFLAGS:= $(filter-out -fstack-protector-all,$(TARGET_CXXFLAGS)) endif -ifneq ($(ADK_LINUX_XTENSA),y) -GCC_FINAL_CONFOPTS+= --enable-cxx-flags='$(TARGET_CXXFLAGS)' -endif - GCC_CONFOPTS:= --prefix=$(TOOLCHAIN_DIR)/usr \ --with-bugurl="http://www.openadk.org/" \ --build=$(GNU_HOST_NAME) \ @@ -42,6 +38,18 @@ GCC_CONFOPTS:= --prefix=$(TOOLCHAIN_DIR)/usr \ --disable-nls GCC_FINAL_CONFOPTS:= + +ifneq ($(ADK_LINUX_XTENSA),y) +GCC_FINAL_CONFOPTS+= --enable-cxx-flags='$(TARGET_CXXFLAGS)' +endif + +# uClibc/glibc uses libgcc_s.so.1 for pthread_cancel with dlopen +ifeq (ADK_TARGET_LIB_MUSL),y) +GCC_FINAL_CONFOPTS+= --enable-shared='libstdc++' +else +GCC_FINAL_CONFOPTS+= --enable-shared='libstdc++,libgcc' +endif + ifeq ($(ADK_LINUX_SH)$(ADK_LINUX_X86_64)$(ADK_LINUX_X86),) GCC_FINAL_CONFOPTS+= --disable-biarch --disable-multilib endif @@ -102,7 +110,7 @@ endif endif ifeq ($(ADK_CPU_ARM926EJ_S),y) -GCC_CONFOPTS+= --with-arch=armv5te --with-tune=arm1176jzf-s +GCC_CONFOPTS+= --with-arch=armv5te --with-tune=arm926ej-s endif ifeq ($(ADK_CPU_ARM1176JZF_S),y) @@ -205,8 +213,7 @@ $(GCC_BUILD_DIR_FINAL)/.configured: ${GCC_FINAL_CONFOPTS} \ --enable-languages=$(LANGUAGES) \ --with-build-sysroot='$${prefix}/${STAGING_HOST2TARGET}' \ - --with-sysroot='$${prefix}/${STAGING_HOST2TARGET}' \ - --enable-shared='libstdc++' + --with-sysroot='$${prefix}/${STAGING_HOST2TARGET}' touch $@ $(WRKBUILD)/.compiled: $(GCC_BUILD_DIR_FINAL)/.configured |