summaryrefslogtreecommitdiff
path: root/package/gcc
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2017-11-08 06:21:16 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2017-11-08 06:21:49 +0100
commite7383dee0c3fc20a2752b13f21d0bb3f5988aad6 (patch)
treed08262ebab90f22006e3d81b815644745976cb36 /package/gcc
parentb9d9e97e51ee153c0781d54f7a6ebc166e23f22a (diff)
gcc: fix cross-native for Xtensa gcc
Diffstat (limited to 'package/gcc')
-rw-r--r--package/gcc/Makefile17
1 files changed, 12 insertions, 5 deletions
diff --git a/package/gcc/Makefile b/package/gcc/Makefile
index a971b97f9..4d99e214a 100644
--- a/package/gcc/Makefile
+++ b/package/gcc/Makefile
@@ -28,8 +28,17 @@ CFLAGS_FOR_BUILD:=
LDFLAGS_FOR_BUILD:=
TARGET_CPPFLAGS:=
TARGET_CFLAGS:=
-TARGET_LDFLAGS:=
TARGET_CXXFLAGS:=
+TARGET_LDFLAGS:=
+
+ifeq ($(ADK_TARGET_LINUX_ARCH_XTENSA),y)
+GCC_EXTRA_CFLAGS:= -mtext-section-literals
+GCC_EXTRA_CXXFLAGS:= -mtext-section-literals
+endif
+
+# some targets need extra CFLAGS/CXXFLAGS
+CONFIGURE_ENV+= CC="${TARGET_CC} ${GCC_EXTRA_CFLAGS}"
+CONFIGURE_ENV+= CXX="${TARGET_CXX} ${GCC_EXTRA_CXXFLAGS}"
ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
CONFIGURE_ARGS+= --with-abi=$(ADK_TARGET_MIPS_ABI)
@@ -46,9 +55,8 @@ CONFIGURE_ARGS+= --enable-languages=c,c++
else
CONFIGURE_ARGS+= --enable-languages=c
endif
-ifeq ($(ADK_TARGET_CPU_ARCH),ppc)
+ifeq ($(ADK_TARGET_LINUX_ARCH_PPC),y)
CONFIGURE_ARGS+= --disable-target-optspace --with-long-double-64 --enable-secureplt
-TARGET_CFLAGS+= '-Wl,--secure-plt'
else
CONFIGURE_ARGS+= --enable-target-optspace
endif
@@ -71,8 +79,7 @@ CONFIGURE_ARGS+= --host=$(GNU_TARGET_NAME) \
--disable-libsanitizer \
--disable-libitm \
--disable-install-libiberty \
- --enable-dependency-tracking \
- --enable-cxx-flags="${TARGET_LDFLAGS}"
+ --enable-dependency-tracking
pre-configure:
$(SED) 's@\./fixinc\.sh@-c true@' $(WRKSRC)/gcc/Makefile.in