public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Possible problem in libstdc++v3
@ 2001-07-17 15:00 Loz
  2001-07-17 15:59 ` Joe Buck
  0 siblings, 1 reply; 3+ messages in thread
From: Loz @ 2001-07-17 15:00 UTC (permalink / raw)
  To: gcc

I've been trying to build a cross compiler - host=i686-pc-linux-gnu
target=i586-pc-linux-gnu. I'm pretty sure I've got the correct headers
(I built glibc and the kernel on the target machine to make sure). I get
the following error when building libstdc++:

/usr/src/gcc-build/gcc/xgcc -B/usr/src/gcc-build/gcc/ -nostdinc++
-L/usr/src/gcc-build/pentium-pc-linux-gnu/libstdc++-v3/src
-L/usr/src/gcc-build/pentium-pc-linux-gnu/libstdc++-v3/src/.libs
-B/home/cgcc/pentium-pc-linux-gnu/bin/
-B/home/cgcc/pentium-pc-linux-gnu/lib/ -isystem
/home/cgcc/pentium-pc-linux-gnu/include
-I../../../../gcc-3.0/libstdc++-v3/../gcc
-I../../../../gcc-3.0/libstdc++-v3/../include
-I../../../../gcc-3.0/libstdc++-v3/include
-I../../../../gcc-3.0/libstdc++-v3/include/std
-I../../../../gcc-3.0/libstdc++-v3/include/c_std -I../include
-I../../../../gcc-3.0/libstdc++-v3/libsupc++ -g -O2 -D_GNU_SOURCE
-fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections -g
-c ../../../../gcc-3.0/libstdc++-v3/libsupc++/eh_aux_runtime.cc  -fPIC
-DPIC -o eh_aux_runtime.o
/tmp/ccVXaasj.s: Assembler messages:
/tmp/ccVXaasj.s:333: Error: invalid section for operation
/tmp/ccVXaasj.s:363: Error: invalid section for operation
make[3]: *** [eh_aux_runtime.lo] Error 1
make[3]: Leaving directory
`/usr/src/gcc-build/pentium-pc-linux-gnu/libstdc++-v3/libsupc++'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/usr/src/gcc-build/pentium-pc-linux-gnu/libstdc++-v3'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory
`/usr/src/gcc-build/pentium-pc-linux-gnu/libstdc++-v3

I know this probably isn't a libstdc++ problem per se. Most likely I
have done something foolish, as this is the first time I've attempted
anything like this. But, to me, this looks like gcc (which is an
apparently otherwise working native version of gcc3 on i686) is
producing bad assembler. Does anyone have a clue why this may happen? or
should enter a GNATS entry?

cheers

Loz


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

* Re: Possible problem in libstdc++v3
  2001-07-17 15:00 Possible problem in libstdc++v3 Loz
@ 2001-07-17 15:59 ` Joe Buck
  2001-07-17 16:09   ` Loz
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Buck @ 2001-07-17 15:59 UTC (permalink / raw)
  To: Loz; +Cc: gcc

> I've been trying to build a cross compiler - host=i686-pc-linux-gnu
> target=i586-pc-linux-gnu.

Why do you need a cross-compiler?  Just give the flag -mcpu=i586 to your
regular compiler.  If your code never needs to run on a 386, 486 (or k6?),
you can pass -march=i586 as well to enable use of instructions that don't
exist on non-Pentiums.

Just the same, I have no idea why you see

> /tmp/ccVXaasj.s: Assembler messages:
> /tmp/ccVXaasj.s:333: Error: invalid section for operation
> /tmp/ccVXaasj.s:363: Error: invalid section for operation

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

* Re: Possible problem in libstdc++v3
  2001-07-17 15:59 ` Joe Buck
@ 2001-07-17 16:09   ` Loz
  0 siblings, 0 replies; 3+ messages in thread
From: Loz @ 2001-07-17 16:09 UTC (permalink / raw)
  To: Joe Buck; +Cc: gcc

Joe Buck wrote:

>>I've been trying to build a cross compiler - host=i686-pc-linux-gnu
>>target=i586-pc-linux-gnu.
>>
> 
> Why do you need a cross-compiler?  Just give the flag -mcpu=i586 to your
> regular compiler.  If your code never needs to run on a 386, 486 (or k6?),
> you can pass -march=i586 as well to enable use of instructions that don't
> exist on non-Pentiums.
> 
> Just the same, I have no idea why you see
> 
> 
>>/tmp/ccVXaasj.s: Assembler messages:
>>/tmp/ccVXaasj.s:333: Error: invalid section for operation
>>/tmp/ccVXaasj.s:363: Error: invalid section for operation
>>
> 
> 

Heh, I was just trying things out. I did get illegal instruction 
exceptions from code compiled as -mcpu=i586 -march=i586 on my i686 
machine, running on a pentium. I now suspect that was because I was 
statically linking in i686 only libraries (doh) (I was trying a Linux 
 From Scratch). Before I realised that I started building a cross 
compiler. I then got fascinated by the whole thing and, of course, got 
completely sidetracked. With the machines I have at home the only option 
I had for building such a beast was i686 to i586, which as you say, 
ought to be pretty pointless.
I've a feeling that upgrading to the bleeding edge binutils may fix my 
problem, I'm going to try that tomorrow.

cheers

Loz

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

end of thread, other threads:[~2001-07-17 16:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-17 15:00 Possible problem in libstdc++v3 Loz
2001-07-17 15:59 ` Joe Buck
2001-07-17 16:09   ` Loz

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).