diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-06-28 19:52:09 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-06-28 19:52:09 +0000 |
commit | 8df096ed3e5f09cc3e6fce803e1f58347d21a8b2 (patch) | |
tree | a8453498a77c6b4229750aa25f04259f58da69e6 /toolchain/gcc | |
parent | 705280153b3bc749c9a58e5ca4ce6f15e438734a (diff) | |
download | master-187ad058-8df096ed3e5f09cc3e6fce803e1f58347d21a8b2.tar.gz master-187ad058-8df096ed3e5f09cc3e6fce803e1f58347d21a8b2.tar.bz2 master-187ad058-8df096ed3e5f09cc3e6fce803e1f58347d21a8b2.zip |
fix gcc 4.2.0 compile for ppc
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7761 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'toolchain/gcc')
-rw-r--r-- | toolchain/gcc/Makefile | 1 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.2.0/307-long_double_fix.patch | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index b5502bcefa..6d46f98994 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -119,6 +119,7 @@ define Build/Prepare $(SED) 's,\(version_string.. = "[0-9\.]*\).*\(";\),\1 (OpenWrt-2.0)\2,' $(PKG_BUILD_DIR)/gcc/version.c $(SED) 's,\(bug_report_url.. = "\).*\(";\),\1<URL:https://dev.openwrt.org/>\2,' $(PKG_BUILD_DIR)/gcc/version.c (cd $(PKG_BUILD_DIR)/libstdc++-v3; autoconf;); + $(SED) 's,gcc_no_link=yes,gcc_no_link=no,' $(PKG_BUILD_DIR)/libstdc++-v3/configure endef define Build/Configure diff --git a/toolchain/gcc/patches/4.2.0/307-long_double_fix.patch b/toolchain/gcc/patches/4.2.0/307-long_double_fix.patch new file mode 100644 index 0000000000..1229bdc1bd --- /dev/null +++ b/toolchain/gcc/patches/4.2.0/307-long_double_fix.patch @@ -0,0 +1,26 @@ +Index: gcc-4.2.0/gcc/config/rs6000/darwin-ldouble.c +=================================================================== +--- gcc-4.2.0.orig/gcc/config/rs6000/darwin-ldouble.c 2007-06-28 20:56:39.222667344 +0200 ++++ gcc-4.2.0/gcc/config/rs6000/darwin-ldouble.c 2007-06-28 20:57:02.258165416 +0200 +@@ -49,9 +49,10 @@ + + This code currently assumes big-endian. */ + +-#if ((!defined (__NO_FPRS__) || defined (_SOFT_FLOAT)) \ ++#if (defined (__LONG_DOUBLE_128__) && \ ++ ((!defined (__NO_FPRS__) || defined (_SOFT_FLOAT)) \ + && !defined (__LITTLE_ENDIAN__) \ +- && (defined (__MACH__) || defined (__powerpc__) || defined (_AIX))) ++ && (defined (__MACH__) || defined (__powerpc__) || defined (_AIX)))) + + #define fabs(x) __builtin_fabs(x) + #define isless(x, y) __builtin_isless (x, y) +@@ -219,7 +220,7 @@ + return z.ldval; + } + +-#if defined (_SOFT_FLOAT) && defined (__LONG_DOUBLE_128__) ++#ifdef _SOFT_FLOAT + + long double __gcc_qneg (double, double); + int __gcc_qeq (double, double, double, double); |