This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: binutils turns gcc into a cross compiler
- To: Alexandre Oliva <aoliva at redhat dot com>
- Subject: Re: binutils turns gcc into a cross compiler
- From: Jesse Caldwell <Jesse dot Caldwell at Colorado dot EDU>
- Date: Tue, 27 Feb 2001 22:43:54 -0700
- cc: gcc-bugs at gcc dot gnu dot org
>
> configure scripts generated by autoconf 2.13 assume that, if configure
> can't run a program created by the compiler, then the compiler is a
> cross-compiler.
>
> Try to compile and link a hello world-like program using the installed
> gcc and binutils and see why configure thinks it's a cross compiler.
>
OK, you hit the nail on the head with that one. gcc works fine until i
install binutils, at which point it breaks.
pre-binutils:
spicy-pickle:~ > ./hello
Hello, world!
spicy-pickle:~ > echo $status
0
post-binutils:
spicy-pickle:~ > ./hello
Hello, world!
Segmentation fault
spicy-pickle:~ > echo $status
139
spicy-pickle:~ > sudo truss ./hello
execve("hello", 0xEFFFF90C, 0xEFFFF914) argc = 1
stat("hello", 0xEFFFF658) = 0
open("/var/ld/ld.config", O_RDONLY) Err#2 ENOENT
open("/usr/lib/libc.so.1", O_RDONLY) = 3
fstat(3, 0xEFFFF434) = 0
mmap(0x00000000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xEF7C0000
mmap(0x00000000, 778240, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xEF700000
mmap(0xEF7B6000, 24464, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 679936) = 0xEF7B6000
mmap(0xEF7BC000, 6564, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xEF7BC000
munmap(0xEF7A6000, 65536) = 0
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xEF6F0000
close(3) = 0
open("/usr/lib/libdl.so.1", O_RDONLY) = 3
fstat(3, 0xEFFFF434) = 0
mmap(0xEF7C0000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xEF7C0000
close(3) = 0
open("/usr/platform/SUNW,SPARCstation-10/lib/libc_psr.so.1", O_RDONLY) Err#2 ENOENT
ioctl(1, TCGETA, 0xEFFFEAA4) = 0
Hello, world!
write(1, " H e l l o , w o r l d".., 14) = 14
Incurred fault #6, FLTBOUNDS %pc = 0x00010480
siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
Received signal #11, SIGSEGV [default]
siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
*** process killed ***
bummer. here's what i'm doing. i'm building all of these packages:
autoconf automake bash bc binutils bison ddd diffutils enscript
fileutils findutils gawk gcc gdb grep groff gzip java2html less libtool
m4 make patch plotutils rcs sh-utils sharutils tar texinfo textutils
wget
make first, gcc second (bootstrap with sun cc 5.0), binutils last, and
everything else in the middle somewhere. /usr/local/gnu/bin is first in
my path, so everything except for make and gcc are built with
gcc/gmake/etc.
Is there some special trick to installing these packages? some
unwritten order you have to follow? i guess next i'll check what files
binutils is clobbering; one by one i ought to be able to track down
what file binutils is installing that's breaking gcc.
sorry to bother you guys with lame questions,
Jesse