diff options
Diffstat (limited to 'package/gcc')
-rw-r--r-- | package/gcc/Makefile | 10 | ||||
-rw-r--r-- | package/gcc/patches/4.8.2/gcc-cppflags.patch | 24 | ||||
-rw-r--r-- | package/gcc/patches/4.8.2/musl-sh.patch | 11 | ||||
-rw-r--r-- | package/gcc/patches/4.8.2/musl-stubs.patch | 49 |
4 files changed, 91 insertions, 3 deletions
diff --git a/package/gcc/Makefile b/package/gcc/Makefile index 6d8ee9620..c0c5f749a 100644 --- a/package/gcc/Makefile +++ b/package/gcc/Makefile @@ -21,9 +21,13 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,GCC,gcc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,GXX,g++,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -TARGET_CPPFLAGS:= '' -TARGET_CFLAGS:= '' -TARGET_CXXFLAGS:= '' +CPPFLAGS_FOR_BUILD:= -I$(STAGING_HOST_DIR)/include +CFLAGS_FOR_BUILD:= +LDFLAGS_FOR_BUILD:= +TARGET_CPPFLAGS:= +TARGET_CFLAGS:= +TARGET_LDFLAGS:= +TARGET_CXXFLAGS:= ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y) CONFIGURE_ARGS+= --with-abi=$(ADK_TARGET_MIPS_ABI) diff --git a/package/gcc/patches/4.8.2/gcc-cppflags.patch b/package/gcc/patches/4.8.2/gcc-cppflags.patch new file mode 100644 index 000000000..bc47be829 --- /dev/null +++ b/package/gcc/patches/4.8.2/gcc-cppflags.patch @@ -0,0 +1,24 @@ +diff -Nur gcc-4.8.2.orig/gcc/configure gcc-4.8.2/gcc/configure +--- gcc-4.8.2.orig/gcc/configure 2013-06-19 03:18:38.000000000 +0200 ++++ gcc-4.8.2/gcc/configure 2014-03-03 15:05:00.647062804 +0100 +@@ -11204,7 +11204,7 @@ + esac + saved_CFLAGS="${CFLAGS}" + CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ +- LDFLAGS="${LDFLAGS_FOR_BUILD}" \ ++ LDFLAGS="${LDFLAGS_FOR_BUILD}" CPPFLAGS="${CPPFLAGS_FOR_BUILD}" \ + ${realsrcdir}/configure \ + --enable-languages=${enable_languages-all} \ + --target=$target_alias --host=$build_alias --build=$build_alias +diff -Nur gcc-4.8.2.orig/gcc/Makefile.in gcc-4.8.2/gcc/Makefile.in +--- gcc-4.8.2.orig/gcc/Makefile.in 2013-07-08 11:14:34.000000000 +0200 ++++ gcc-4.8.2/gcc/Makefile.in 2014-03-03 15:13:22.021327933 +0100 +@@ -996,7 +996,7 @@ + # Likewise. Put INCLUDES at the beginning: this way, if some autoconf macro + # puts -I options in CPPFLAGS, our include files in the srcdir will always + # win against random include files in /usr/include. +-ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS) ++ALL_CPPFLAGS = $(INCLUDES) + + # This is the variable to use when using $(COMPILER). + ALL_COMPILERFLAGS = $(ALL_CXXFLAGS) diff --git a/package/gcc/patches/4.8.2/musl-sh.patch b/package/gcc/patches/4.8.2/musl-sh.patch new file mode 100644 index 000000000..237f76f63 --- /dev/null +++ b/package/gcc/patches/4.8.2/musl-sh.patch @@ -0,0 +1,11 @@ +diff -Nur gcc-4.8.2.orig/gcc/config/sh/linux.h gcc-4.8.2/gcc/config/sh/linux.h +--- gcc-4.8.2.orig/gcc/config/sh/linux.h 2013-03-14 04:01:53.000000000 +0100 ++++ gcc-4.8.2/gcc/config/sh/linux.h 2014-03-01 11:33:10.000000000 +0100 +@@ -44,6 +44,7 @@ + #define TARGET_ASM_FILE_END file_end_indicate_exec_stack + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh.so.1" + + #undef SUBTARGET_LINK_EMUL_SUFFIX + #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" diff --git a/package/gcc/patches/4.8.2/musl-stubs.patch b/package/gcc/patches/4.8.2/musl-stubs.patch new file mode 100644 index 000000000..35050fd9c --- /dev/null +++ b/package/gcc/patches/4.8.2/musl-stubs.patch @@ -0,0 +1,49 @@ +diff -Nur gcc-4.8.2.orig/gcc/config/m68k/linux.h gcc-4.8.2/gcc/config/m68k/linux.h +--- gcc-4.8.2.orig/gcc/config/m68k/linux.h 2013-01-10 21:38:27.000000000 +0100 ++++ gcc-4.8.2/gcc/config/m68k/linux.h 2014-02-24 10:19:00.214399704 +0100 +@@ -72,6 +72,7 @@ + done. */ + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-m68k.so.1" + + #undef LINK_SPEC + #define LINK_SPEC "-m m68kelf %{shared} \ +diff -Nur gcc-4.8.2.orig/gcc/config/mips/linux64.h gcc-4.8.2/gcc/config/mips/linux64.h +--- gcc-4.8.2.orig/gcc/config/mips/linux64.h 2013-01-10 21:38:27.000000000 +0100 ++++ gcc-4.8.2/gcc/config/mips/linux64.h 2014-02-24 10:19:47.238583895 +0100 +@@ -27,6 +27,9 @@ + #define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1" + #define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0" + #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips.so.1" ++#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mips.so.1" ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips.so.1" + #define GNU_USER_DYNAMIC_LINKERN32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ +- BIONIC_DYNAMIC_LINKERN32) ++ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32) +diff -Nur gcc-4.8.2.orig/gcc/config/sparc/linux64.h gcc-4.8.2/gcc/config/sparc/linux64.h +--- gcc-4.8.2.orig/gcc/config/sparc/linux64.h 2013-01-10 21:38:27.000000000 +0100 ++++ gcc-4.8.2/gcc/config/sparc/linux64.h 2014-02-24 10:20:49.414827006 +0100 +@@ -94,6 +94,9 @@ + + #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" + #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-sparc.so.1" ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-sparc.so.1" ++ + + #ifdef SPARC_BI_ARCH + +diff -Nur gcc-4.8.2.orig/gcc/config/sparc/linux.h gcc-4.8.2/gcc/config/sparc/linux.h +--- gcc-4.8.2.orig/gcc/config/sparc/linux.h 2013-01-10 21:38:27.000000000 +0100 ++++ gcc-4.8.2/gcc/config/sparc/linux.h 2014-02-24 10:21:14.342924339 +0100 +@@ -84,6 +84,7 @@ + done. */ + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sparc.so.1" + + #undef LINK_SPEC + #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ |