This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Configuring gcc for a s390 or criss crosscompiler? (was: [PATCH]Add --with-cross configure option to force -DCROSS_COMPILE behavior)


Daniel Jacobowitz wrote:
+ /build/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/gcc-3.3/configure
--target=s390-unknown-linux-gnu --host=s390-host_unknown-linux-gnu ...

Eh, I guess you're running that on an S/390...

That's the amusing part. I'm not. That was run on an x86 linux system.


I figure I'm just slowly going insane, as promised by the curse of
libstdc++-v3/configure.in.

Then you're misunderstanding what the suggestion I gave meant. Do you understand what "--host=s390-host_unknown-linux-gnu --target=s390-unknown-linux-gnu" means? It means, build a compiler on i686-linux, which will run on s390-host_unknown-linux-gnu, and target s390-unknown-linux-gnu.

I see your mouth moving, and I see the words coming out, but unfortunately in the parallel dimension I'm in, they don't make any sense. All the compilers I've built with those parameters end up being compilers built on x86, that run on x86, and produce code for the desired target. Why? I dunno. To reproduce it with, try e.g. wget http://www.kegel.com/crossgcc/crosstool-0.6.tar.gz tar -xzvf crosstool-0.6.tar.gz cd crosstool-0.6 eval `cat sh4.dat` `cat gcc3.3-glibc2.3.2.dat` sh all.sh The last step of all.sh is to run the resulting cross-compiler on the build system. It happily runs, and generates an sh4 executable. Is this a bug in gcc's configure, or am I confused? Hopefully the latter.

I really doubt you want to build that! Just use --target.

I would, but then I can't build on x86; it sucks in local system headers and libraries, and the build fails. That was the original problem, and why I wanted to add a --with-cross option to gcc's configure.

I would really like to end up with one way of invoking gcc's
configure regardless of whether cpu being used to build the
cross-compiler was similar to the one the cross-compiler will
generate code for.  I'm sure I'm just being dense, and I keep
pinching myself to try to wake up from this bad dream...
- Dan

--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045


------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]