[alpha] : Fix PR/47230 [4.6/4.7 Regression] gcc fails to bootstrap on alpha in stage2 with "relocation truncated to fit: GPREL16 against ..."

Submitted by Uros Bizjak on May 2, 2011, 7:21 a.m.

Details

Message ID BANLkTimKCTLGFdiw0VKZdCNhPGBOE29T2Q@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak May 2, 2011, 7:21 a.m.
Hello!

It looks that GP relative relocations do not fit anymore into GPREL16
reloc, so bootstrap on alpha hosts fail in stage2 with  "relocation
truncated to fit: GPREL16 against ...". I found no other solution but
to pass --no-relax to linker in order to finish the bootstrap.

2011-05-02  Uros Bizjak  <ubizjak@gmail.com>

	PR target/47230
	* configure.ac (alpha*-*-linux*): Use mh-alpha-linux.
	* configure: Regenerate.

config/ChangeLog:

2011-05-02  Uros Bizjak  <ubizjak@gmail.com>

	PR target/47230
	* mh-alpha-linux: New file.

Patch was bootstrapped and regression tested with "GNU ld (GNU
Binutils) 2.21" on alphaev68-pc-linux-gnu [1].

OK for 4.6. and 4.7 ?

[1] http://gcc.gnu.org/ml/gcc-testresults/2011-05/msg00089.html

Uros.

Patch hide | download patch | download mbox

Index: configure.ac
===================================================================
--- configure.ac	(revision 173233)
+++ configure.ac	(working copy)
@@ -1100,6 +1100,9 @@ 
   *-interix*)
     host_makefile_frag="config/mh-interix"
     ;;
+  alpha*-*-linux*)
+    host_makefile_frag="config/mh-alpha-linux"
+    ;;
   hppa*-hp-hpux10*)
     host_makefile_frag="config/mh-pa-hpux10"
     ;;
Index: configure
===================================================================
--- configure	(revision 173233)
+++ configure	(working copy)
@@ -3672,6 +3672,9 @@ 
   *-interix*)
     host_makefile_frag="config/mh-interix"
     ;;
+  alpha*-*-linux*)
+    host_makefile_frag="config/mh-alpha-linux"
+    ;;
   hppa*-hp-hpux10*)
     host_makefile_frag="config/mh-pa-hpux10"
     ;;
Index: config/mh-alpha-linux
===================================================================
--- config/mh-alpha-linux	(revision 0)
+++ config/mh-alpha-linux	(revision 0)
@@ -0,0 +1,3 @@ 
+# Prevent GPREL16 relocation truncation
+LDFLAGS += -Wl,--no-relax
+BOOT_LDFLAGS += -Wl,--no-relax