summaryrefslogtreecommitdiff
path: root/toolchain/gcc/Makefile
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-08-26 12:28:55 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-08-26 12:29:24 +0200
commit9d6eef9b39547d230d5a7cb871735bae71f5fd55 (patch)
treed204388625afbaed50d26c136bbea12861a0d2c6 /toolchain/gcc/Makefile
parent8e2707b81b0c90295c9fdf92a576925442d22147 (diff)
we need to remove crtbegin.o/crtend.o from gcc specs file. otherwise broken executables (f.e. sash) with a wrong data start are created by elf2flt)
Diffstat (limited to 'toolchain/gcc/Makefile')
-rw-r--r--toolchain/gcc/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 25c396e1b..efe5231c1 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -48,12 +48,16 @@ ifneq ($(ADK_LINUX_AARCH64)$(ADK_LINUX_ALPHA)$(ADK_LINUX_XTENSA)$(ADK_LINUX_M68K
GCC_FINAL_CONFOPTS+= --enable-cxx-flags='$(TARGET_CXXFLAGS)'
endif
+ifeq ($(ADK_TARGET_UCLINUX),y)
+GCC_FINAL_CONFOPTS+= --disable-shared
+else
# 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
+endif
ifeq ($(ADK_LINUX_M68K)$(ADK_LINUX_SH)$(ADK_LINUX_X86_64)$(ADK_LINUX_X86),)
GCC_FINAL_CONFOPTS+= --disable-biarch --disable-multilib
@@ -267,6 +271,10 @@ endif
ln -sf libstdc++.so.6.0.19 libstdc++.so.6
# cleanup unneeded docs
rm -rf $(TOOLCHAIN_DIR)/usr/share
+ # create gcc wrapper for uClinux/m68k
+ echo "#!/bin/sh" > $(TOOLCHAIN_DIR)/usr/bin/adk-uclinux-gcc
+ echo "exec ${GNU_TARGET_NAME}-gcc \"$$@\" -specs $(ADK_TOPDIR)/toolchain/gcc/m68k-uclinux-gcc.specs" >> $(TOOLCHAIN_DIR)/usr/bin/adk-uclinux-gcc
+ chmod a+x $(TOOLCHAIN_DIR)/usr/bin/adk-uclinux-gcc
touch $@
include ${ADK_TOPDIR}/mk/toolchain.mk