public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/39317]  New: [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64
@ 2009-02-27  0:30 rob1weld at aol dot com
  2009-02-27  0:33 ` [Bug lto/39317] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: rob1weld at aol dot com @ 2009-02-27  0:30 UTC (permalink / raw)
  To: gcc-bugs

# uname -a
Linux debian 2.6.26-1-amd64 #1 SMP Sat Jan 10 19:55:48 UTC 2009 x86_64
GNU/Linux


# gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=gcc/xgcc
Target: x86_64-unknown-linux-gnu
Configured with: ../lto_trunk/configure --prefix=/usr/local/lto
--enable-languages=lto,c++ --enable-multilib --enable-stage1-checking=all
--enable-checking=release CPPFLAGS=-I/usr/local/include
Thread model: posix
gcc version 4.4.0 20090218 (experimental) [lto revision 144454] (lto merged
with rev 144262) 


# make
...
make[3]: Leaving directory `/usr/src/lto_build/lto-plugin'
mkdir -p -- x86_64-unknown-linux-gnu/libgcc
Checking multilib configuration for libgcc...
Configuring stage 1 in x86_64-unknown-linux-gnu/libgcc
configure: creating cache ./config.cache
checking for --enable-version-specific-runtime-libs... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... gawk
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for x86_64-unknown-linux-gnu-ar... ar
checking for x86_64-unknown-linux-gnu-lipo... lipo
checking for x86_64-unknown-linux-gnu-nm... /usr/src/lto_build/./gcc/nm
checking for x86_64-unknown-linux-gnu-ranlib... ranlib
checking for x86_64-unknown-linux-gnu-strip... strip
checking whether ln -s works... yes
checking for x86_64-unknown-linux-gnu-gcc... /usr/src/lto_build/./gcc/xgcc
-B/usr/src/lto_build/./gcc/ -B/usr/local/lto/x86_64-unknown-linux-gnu/bin/
-B/usr/local/lto/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/local/lto/x86_64-unknown-linux-gnu/include -isystem
/usr/local/lto/x86_64-unknown-linux-gnu/sys-include
checking for suffix of object files... configure: error: in
`/usr/src/lto_build/x86_64-unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/usr/src/lto_build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/usr/src/lto_build'
make: *** [all] Error 2


The "config.log" says:
...
xgcc: '-V' must come at the start of the command line
configure:2396: $? = 1
configure:2415: /usr/src/lto_build/./gcc/xgcc -B/usr/src/lto_build/./gcc/
-B/usr/local/lto/x86_64-unknown-linux-gnu/bin/
-B/usr/local/lto/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/local/lto/x86_64-unknown-linux-gnu/include -isystem
/usr/local/lto/x86_64-unknown-linux-gnu/sys-include -o conftest -g -O2    
conftest.c  >&5
/tmp/ccEBgRfq.s: Assembler messages:
/tmp/ccEBgRfq.s:35: Error: cannot represent relocation type BFD_RELOC_64
/tmp/ccEBgRfq.s:36: Error: cannot represent relocation type BFD_RELOC_64
/tmp/ccEBgRfq.s:44: Error: cannot represent relocation type BFD_RELOC_64
/tmp/ccEBgRfq.s:45: Error: cannot represent relocation type BFD_RELOC_64
/tmp/ccEBgRfq.s:123: Error: cannot represent relocation type BFD_RELOC_64
configure:2418: $? = 1
configure:2590: checking for suffix of object files
...


This is similar to the problem described in these Bug Reports:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38743
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38804

Andrew has some input on fixing these type of problems, here:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38804#c4 (and c5)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38743#c2


Thanks,
Rob


-- 
           Summary: [lto] - cannot compute suffix of object files - cannot
                    represent relocation type BFD_RELOC_64
           Product: gcc
           Version: lto
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rob1weld at aol dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39317


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug lto/39317] [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64
  2009-02-27  0:30 [Bug lto/39317] New: [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64 rob1weld at aol dot com
@ 2009-02-27  0:33 ` pinskia at gcc dot gnu dot org
  2009-02-27  0:34 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-02-27  0:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2009-02-27 00:33 -------
This is unrelated to those bug reports.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39317


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug lto/39317] [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64
  2009-02-27  0:30 [Bug lto/39317] New: [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64 rob1weld at aol dot com
  2009-02-27  0:33 ` [Bug lto/39317] " pinskia at gcc dot gnu dot org
@ 2009-02-27  0:34 ` pinskia at gcc dot gnu dot org
  2009-02-27  1:30 ` rob1weld at aol dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-02-27  0:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2009-02-27 00:34 -------
What as version are you using?  This looks like a bug in the GNU binutils
rather than in GCC.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39317


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug lto/39317] [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64
  2009-02-27  0:30 [Bug lto/39317] New: [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64 rob1weld at aol dot com
  2009-02-27  0:33 ` [Bug lto/39317] " pinskia at gcc dot gnu dot org
  2009-02-27  0:34 ` pinskia at gcc dot gnu dot org
@ 2009-02-27  1:30 ` rob1weld at aol dot com
  2009-02-27  6:09 ` rob1weld at aol dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rob1weld at aol dot com @ 2009-02-27  1:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rob1weld at aol dot com  2009-02-27 01:29 -------
I'm running Debian Lenny 5.0 released 14 Feb 2009, with updates.


# ld --version
GNU ld (GNU Binutils for Debian) 2.18.0.20080103

# as --version
GNU assembler (GNU Binutils for Debian) 2.18.0.20080103



Simply tossing in an -m64 alerts us to another issue:

# /usr/src/lto_build/./gcc/xgcc -B/usr/src/lto_build/./gcc/
-B/usr/local/lto/x86_64-unknown-linux-gnu/bin/
-B/usr/local/lto/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/local/lto/x86_64-unknown-linux-gnu/include -isystem
/usr/local/lto/x86_64-unknown-linux-gnu/sys-include -o conftest -g -O2 -m64 
test_delete.c 
/usr/bin/ld: crtbegin.o: No such file: No such file or directory
collect2: ld returned 1 exit status


but (with the default installation of Debian's gcc version 4.3.2 
(Debian 4.3.2-1.1) ), a workaround is to add this to the file
../lto_trunk/libgcc/configure:

-m64 -L/usr/lib/gcc/i486-linux-gnu/4.3/64

That ensures we can access crt*.o and libgcc*, etc., for Linking.


Once I get it built, for the first time on this Platform, I will
go back and determine correct fixes and try to produce cross-Platform
compatible patches.


Thanks,
Rob


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39317


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug lto/39317] [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64
  2009-02-27  0:30 [Bug lto/39317] New: [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64 rob1weld at aol dot com
                   ` (2 preceding siblings ...)
  2009-02-27  1:30 ` rob1weld at aol dot com
@ 2009-02-27  6:09 ` rob1weld at aol dot com
  2009-02-28  3:53 ` rob1weld at aol dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rob1weld at aol dot com @ 2009-02-27  6:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rob1weld at aol dot com  2009-02-27 06:08 -------
# uname -m
x86_64


In addition to the lack of "-L..." this is also a 'spec' issue :

Original (head -2 ../lto_build/prev-gcc/specs) :
*asm:
%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*}  %{Wa,*:%*} %{m32:--32}
%{m64:--64}  %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}

Fixed:
*asm:
%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*}  %{Wa,*:%*} %{m32:--32}
%{!m64:--64}  %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}


If I am:

# uname -m
x86_64

I need the "!" before the "m64".


If I am:

# uname -m
i386

I need the "!" before the "m32".


That defaults the compiler to build executables that match the
Boot-mode (32 or 64 bit). To build in the mode _not_ booted into
should require the appropriate "-m64" _OR_ "-m32". We should not
be required to _always_ specify either "-m64" _OR_ "-m32", there
must be a default.


Rob


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39317


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug lto/39317] [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64
  2009-02-27  0:30 [Bug lto/39317] New: [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64 rob1weld at aol dot com
                   ` (3 preceding siblings ...)
  2009-02-27  6:09 ` rob1weld at aol dot com
@ 2009-02-28  3:53 ` rob1weld at aol dot com
  2009-02-28 17:34 ` rob1weld at aol dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rob1weld at aol dot com @ 2009-02-28  3:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rob1weld at aol dot com  2009-02-28 03:53 -------
(In reply to comment #4)
> In addition to the lack of "-L..." this is also a 'spec' issue :
> ...

The issue with the spec file is caused by this in the Makefile.in:

# Dump a specs file to make -B./ read these specs over installed ones.
$(SPECS): xgcc$(exeext)
        $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
        mv tmp-specs $(SPECS)



Debian's supplied gcc 4.3 is built androgynous:

# gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3
--program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-mpfr --enable-targets=all --enable-cld
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1) 


# gcc -dumpspecs | head -2
*asm:
%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*}  %{Wa,*:%*} %{m32:--32}
%{m64:--64}



We need to check that the host-compiler's "spec" is correct and fix it.


Here is some pseudo-code:

if ' gcc -dumpspecs | grep \{m32:--32 | grep \{m64:--64 ' then # not correct
  if test x`(hostname || uname -n) 2>/dev/null | sed 1q` == "xopensolaris" ;
then
    if 'isainfo -k' = 'i386' then 
      gcc -dumpspecs | sed 2s/m32:--32/!m32:--32/1p
    fi
    if 'isainfo -k' = 'amd_64' | 'x86_64' then 
      gcc -dumpspecs | sed 2s/m64:--64/!m64:--64/1p
    fi
  else # Not OpenSolaris' uname
    if 'uname -m' = 'i386' then 
      gcc -dumpspecs | sed 2s/m32:--32/!m32:--32/1p
    fi
    if 'uname -m' = 'amd_64' | 'x86_64' then 
      gcc -dumpspecs | sed 2s/m64:--64/!m64:--64/1p
    fi
  fi
fi


Rob



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39317


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug lto/39317] [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64
  2009-02-27  0:30 [Bug lto/39317] New: [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64 rob1weld at aol dot com
                   ` (4 preceding siblings ...)
  2009-02-28  3:53 ` rob1weld at aol dot com
@ 2009-02-28 17:34 ` rob1weld at aol dot com
  2009-03-02  3:19 ` rob1weld at aol dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rob1weld at aol dot com @ 2009-02-28 17:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rob1weld at aol dot com  2009-02-28 17:34 -------
I rebooted Debian and chose the 32-bit Kernel, then re-configured in
an _identical_ manner. I rebuilt gcc (using un-modified source) with
no extra effort with the 32-Bit Kernel.


Host Compiler:

# gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3
--program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-mpfr --enable-targets=all --enable-cld
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1) 


Broken on 64-bit:

# gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=gcc/xgcc
Target: x86_64-pc-linux-gnu
Configured with: ../lto_trunk/configure --prefix=/usr/local/lto
--enable-languages=lto,c++ --enable-multilib --disable-stage1-checking
--enable-checking=release --with-gmp=/usr/local --with-mpfr=/usr/local
Thread model: posix
gcc version 4.4.0 20090218 (experimental) [lto revision 144460] (lto merged
with rev 144262) 


Works on 32-bit:

# gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=gcc/xgcc
Target: i686-pc-linux-gnu
Configured with: ../lto_trunk/configure --prefix=/usr/local/lto
--enable-languages=lto,c++ --enable-multilib --disable-stage1-checking
--enable-checking=release --with-gmp=/usr/local --with-mpfr=/usr/local
Thread model: posix
gcc version 4.4.0 20090218 (experimental) [lto revision 144460] (lto merged
with rev 144262) 


Broken: x86_64-pc-linux-gnu
Works:  i686-pc-linux-gnu

Rob


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39317


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug lto/39317] [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64
  2009-02-27  0:30 [Bug lto/39317] New: [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64 rob1weld at aol dot com
                   ` (5 preceding siblings ...)
  2009-02-28 17:34 ` rob1weld at aol dot com
@ 2009-03-02  3:19 ` rob1weld at aol dot com
  2009-03-05 22:59 ` rob1weld at aol dot com
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rob1weld at aol dot com @ 2009-03-02  3:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rob1weld at aol dot com  2009-03-02 03:19 -------
(In reply to comment #6)
> Broken: x86_64-pc-linux-gnu
> Works:  i686-pc-linux-gnu
> Rob

Here is someone who had much better luck on 64-Bit (ia64-suse-linux-gnu):

Results for 4.4.0 20090218 (experimental) [lto revision 144462] (lto merged
with rev 144262) testsuite on ia64-suse-linux-gnu
http://gcc.gnu.org/ml/gcc-testresults/2009-02/msg02766.html 

Rob


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39317


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug lto/39317] [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64
  2009-02-27  0:30 [Bug lto/39317] New: [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64 rob1weld at aol dot com
                   ` (6 preceding siblings ...)
  2009-03-02  3:19 ` rob1weld at aol dot com
@ 2009-03-05 22:59 ` rob1weld at aol dot com
  2009-03-06 11:08 ` rob1weld at aol dot com
  2009-07-09  5:52 ` bje at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: rob1weld at aol dot com @ 2009-03-05 22:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rob1weld at aol dot com  2009-03-05 22:59 -------
(In reply to comment #7)
> (In reply to comment #6)
> > Broken: x86_64-pc-linux-gnu
> > Works:  i686-pc-linux-gnu
> > Rob
> Here is someone who had much better luck on 64-Bit (ia64-suse-linux-gnu):
> Results for 4.4.0 20090218 (experimental) [lto revision 144462] (lto merged
> with rev 144262) testsuite on ia64-suse-linux-gnu
> http://gcc.gnu.org/ml/gcc-testresults/2009-02/msg02766.html 
> Rob

I tried with the 'trunk' (instead of 'lto') and found the same issue.


Here is my Host Compiler and the head of it's 'spec':

# gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3
--program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-mpfr --enable-targets=all --enable-cld
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1) 

# gcc -dumpspecs 2>&1 | head -2
*asm:
%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*}  %{Wa,*:%*} %{m32:--32}
%{m64:--64}



The workaround that I applied enabled me to compile gcc _without_ making
any changes to the source code. I utilized a bit of spec file magic
and a bit of Environment trickery.

1. Build and install gmp / mpfr in default location.

2. Set LD_LIBRARY_PATH=/usr/local/lib

3. Build gcc and it will fail here:

checking for suffix of object files... configure: error: in
`/mnt/drive2/gcc_build_64/x86_64-unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
...

The config.log will say:
/tmp/cc21sHKa.s:35: Error: cannot represent relocation type BFD_RELOC_64


4. Fix your "../gcc_build/gcc/specs" file so the top two lines are this:

*asm:
%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*}  %{Wa,*:%*} %{m32:--32}
%{!m32:%{!m64:--64}}  %{!mno-sse2avx:%{mavx:-msse2avx}}
%{msse2avx:%{!mavx:-msse2avx}}

(You may need to adjust it to suit your ./configure options. The important
part is to change "%{m64:--64}" to "%{!m32:%{!m64:--64}}" ).


5. Continue the make and it will fail here:

checking for x86_64-unknown-linux-gnu-gcc...
/mnt/drive2/gcc_build_64/./gcc/xgcc -B/mnt/drive2/gcc_build_64/./gcc/
-B/mnt/drive2/gcc_installed_64/x86_64-unknown-linux-gnu/bin/
-B/mnt/drive2/gcc_installed_64/x86_64-unknown-linux-gnu/lib/ -isystem
/mnt/drive2/gcc_installed_64/x86_64-unknown-linux-gnu/include -isystem
/mnt/drive2/gcc_installed_64/x86_64-unknown-linux-gnu/sys-include
checking for suffix of object files... configure: error: in
`/mnt/drive2/gcc_build_64/x86_64-unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
...

This time the config.log will not seem to indicate the problem but if 
you add a "-v" to the gcc command that fails you will see that 'cc1'
is looking for "libgmp" in /usr/local/lib . If you use the "file"
command on 'xgcc' or the new 'cc1' you will find that they are 64-Bit
executables. Set 'LD_LIBRARY_PATH=/usr/local/lib64' and re-make.


6. When stage2 finishes and everything is moved to prev-gcc check
that you don't loose you 'spec' setting of "%{!m32:%{!m64:--64}}"
or you will need to type "make" again.

The build will complete without further intervention and without 
having made any alterations to the trunk source code.


I "grepped the trunk" and found that some parts of some scripts do check 
if one is using "LD_LIBRARY_PATH_32" and "LD_LIBRARY_PATH_64" but these
'unofficial' (and useful) Environment Variables are not used in all parts
of the gcc build -- thus the need to hand-alter your "LD_LIBRARY_PATH" as 
the compiler second-stages itself and converts from a 32-Bit gcc (your
Host Compiler) and becomes a full-fledged 64-Bit executable.


Solution:

If the Makefile's "$(SPECS)" target would check that the dumpspecs
it is getting (from a prior version of gcc (the Host Compiler)) is
compatible with a 64 bit build (and fix it if needed) _and_ if
the scripts / Makefiles would toss a "64" on the tail of any
"LD_LIBRARY_PATH" paths as the compiler evolves from 32 to 64 bit
then it would all work without any intervention.


I'll leave it to _others_ to decide if gcc < 4.4.x is a Regression for 
not having their spec files suitable to build later revisions of gcc.

This revision of gcc (4.4.x) needs a 'sed' script to rewrite the 'spec' 
file and do sanity checking. The scripts also need to 'promote' the
library directory path from 32 to 64 as the Compiler changes it's strips.


Rob


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39317


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug lto/39317] [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64
  2009-02-27  0:30 [Bug lto/39317] New: [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64 rob1weld at aol dot com
                   ` (7 preceding siblings ...)
  2009-03-05 22:59 ` rob1weld at aol dot com
@ 2009-03-06 11:08 ` rob1weld at aol dot com
  2009-07-09  5:52 ` bje at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: rob1weld at aol dot com @ 2009-03-06 11:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rob1weld at aol dot com  2009-03-06 11:07 -------
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)

After the workaround we get 10 failures on i686 and 33 failures
on x86_64 when compiling trunk revision 144629, results here:

Results for 4.4.0 20090304 (experimental) [trunk revision 144629] (GCC)
testsuite on i686-pc-linux-gnu
http://gcc.gnu.org/ml/gcc-testresults/2009-03/msg00511.html

Results for 4.4.0 20090304 (experimental) [trunk revision 144629] (GCC)
testsuite on x86_64-unknown-linux-gnu
http://gcc.gnu.org/ml/gcc-testresults/2009-03/msg00598.html

Rob


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39317


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug lto/39317] [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64
  2009-02-27  0:30 [Bug lto/39317] New: [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64 rob1weld at aol dot com
                   ` (8 preceding siblings ...)
  2009-03-06 11:08 ` rob1weld at aol dot com
@ 2009-07-09  5:52 ` bje at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: bje at gcc dot gnu dot org @ 2009-07-09  5:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from bje at gcc dot gnu dot org  2009-07-09 05:52 -------
(In reply to comment #8)

> I tried with the 'trunk' (instead of 'lto') and found the same issue.

I really don't think this is a bug with the lto branch.  If you still think
it's a problem on trunk, then please re-open this bug as being against the
trunk compiler.  Thanks.


-- 

bje at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39317


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-07-09  5:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-27  0:30 [Bug lto/39317] New: [lto] - cannot compute suffix of object files - cannot represent relocation type BFD_RELOC_64 rob1weld at aol dot com
2009-02-27  0:33 ` [Bug lto/39317] " pinskia at gcc dot gnu dot org
2009-02-27  0:34 ` pinskia at gcc dot gnu dot org
2009-02-27  1:30 ` rob1weld at aol dot com
2009-02-27  6:09 ` rob1weld at aol dot com
2009-02-28  3:53 ` rob1weld at aol dot com
2009-02-28 17:34 ` rob1weld at aol dot com
2009-03-02  3:19 ` rob1weld at aol dot com
2009-03-05 22:59 ` rob1weld at aol dot com
2009-03-06 11:08 ` rob1weld at aol dot com
2009-07-09  5:52 ` bje at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).