source: patches/gcc-4.3.3-ppc_fixes-1.patch@ 593f554e

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 593f554e was f033e407, checked in by Jim Gifford <clfs@…>, 16 years ago

Fixed Powerpc Build of GCC

  • Property mode set to 100644
File size: 2.2 KB
RevLine 
[f033e407]1Submitted By: Jim Gifford (jim at cross-lfs dot org)
2Date: 02-18-2009
3Initial Package Version: 4.3.3
4Origin: Upstream
5Upstream Status: Applied to Mainline
6Description: This fixes a known build issue with Powerpc and GCC 4.3.3
7 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37739
8
9diff -Naur gcc-4.3.3.orig/gcc/config/rs6000/x-linux-relax gcc-4.3.3/gcc/config/rs6000/x-linux-relax
10--- gcc-4.3.3.orig/gcc/config/rs6000/x-linux-relax 1969-12-31 16:00:00.000000000 -0800
11+++ gcc-4.3.3/gcc/config/rs6000/x-linux-relax 2009-02-18 10:19:52.235263584 -0800
12@@ -0,0 +1,3 @@
13+# At -O0 cc1 etc. are too large and -Wl,--relax is needed
14+$(COMPILERS) : override LDFLAGS += -Wl,--relax
15+
16diff -Naur gcc-4.3.3.orig/gcc/config/x-cflags-O1 gcc-4.3.3/gcc/config/x-cflags-O1
17--- gcc-4.3.3.orig/gcc/config/x-cflags-O1 1969-12-31 16:00:00.000000000 -0800
18+++ gcc-4.3.3/gcc/config/x-cflags-O1 2009-02-18 10:19:24.149463891 -0800
19@@ -0,0 +1,6 @@
20+# At -O0 cc1 etc. are too large on some targets for successful
21+# link; force building libbackend.a with -O1.
22+ifeq ($(filter-out -O0,$(lastword $(filter -O%,$(CFLAGS)))),)
23+$(OBJS) : override CFLAGS += -O1
24+endif
25+
26diff -Naur gcc-4.3.3.orig/gcc/config.host gcc-4.3.3/gcc/config.host
27--- gcc-4.3.3.orig/gcc/config.host 2007-08-08 12:33:24.000000000 -0700
28+++ gcc-4.3.3/gcc/config.host 2009-02-18 10:18:57.471754434 -0800
29@@ -116,6 +116,27 @@
30 host_xmake_file="${host_xmake_file} rs6000/x-rs6000"
31 ;;
32 esac
33+ case ${host} in
34+ *-*-linux* )
35+ if test "${GCC}:${ac_cv_sizeof_long}" = yes:4; then
36+ # On powerpc*-*-linux* use -Wl,--relax to link cc1,
37+ # if ld is new enough, otherwise force -O1 in CFLAGS.
38+ host_ppc_relax_xmake_file=
39+ host_ld_ver=`${CC} -Wl,--version 2>/dev/null | sed 1q`
40+ if echo "$host_ld_ver" | grep GNU > /dev/null; then
41+ host_ld_date=`echo $host_ld_ver \
42+ | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
43+ if test 0"$host_ld_date" -gt 20080806; then
44+ host_ppc_relax_xmake_file=rs6000/x-linux-relax
45+ fi
46+ fi
47+ if test -z "${host_ppc_relax_xmake_file}"; then
48+ host_ppc_relax_xmake_file=x-cflags-O1
49+ fi
50+ host_xmake_file="${host_xmake_file} ${host_ppc_relax_xmake_file}"
51+ fi
52+ ;;
53+ esac
54 ;;
55 esac
56
Note: See TracBrowser for help on using the repository browser.