Discussion:
crosscompiled gcc
(too old to reply)
Marc Lörner
2009-12-15 09:29:49 UTC
Permalink
Hello,
I'm trying to build a crosscompiled GCC for compiling and linking code
to run on 8.0-Release. For 7.0 I got it working after setting some
configure options.

Now, as it seems, something was changed/patched in gcc from 7.0 to 8.0.
So does anybody know where to tweak/patch or what to put in configuration
of original gcc 4.2.1 to make crosscompilling work for 8.0?

Thanks in advance,
Marc Loerner
--
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser
Marcel Moolenaar
2009-12-15 17:41:31 UTC
Permalink
Post by Marc Lörner
Hello,
I'm trying to build a crosscompiled GCC for compiling and linking code
to run on 8.0-Release. For 7.0 I got it working after setting some
configure options.
Hi Marc,

Can you be a bit more explicit. In particular, can you state what
the build, host and target "triples" are?
Post by Marc Lörner
Now, as it seems, something was changed/patched in gcc from 7.0 to 8.0.
So does anybody know where to tweak/patch or what to put in configuration
of original gcc 4.2.1 to make crosscompilling work for 8.0?
Can you share what you did before to make it work? Maybe from the
patch I can understand the problem you're trying to solve.

Thanks,
--
Marcel Moolenaar
***@mac.com
Marc Lörner
2009-12-15 18:15:30 UTC
Permalink
Post by Marcel Moolenaar
Post by Marc Lörner
Hello,
I'm trying to build a crosscompiled GCC for compiling and linking code
to run on 8.0-Release. For 7.0 I got it working after setting some
configure options.
Hi Marc,
Can you be a bit more explicit. In particular, can you state what
the build, host and target "triples" are?
target=ia64-unknown-freebsd8.0
host=x86_64-unknown-linux-gnu
Post by Marcel Moolenaar
Post by Marc Lörner
Now, as it seems, something was changed/patched in gcc from 7.0 to 8.0.
So does anybody know where to tweak/patch or what to put in configuration
of original gcc 4.2.1 to make crosscompilling work for 8.0?
Can you share what you did before to make it work? Maybe from the
patch I can understand the problem you're trying to solve.
For 7.0:
- make sysroot directory with all headers and libraries used
and put "--with-sysroot=XXX" as parameters of configure-scripts
- Add "--disable-werror" to configure of binutils2.17
- Add above and "--disable-initfini-array" to configure of gcc
=> This worked for me, but unfortunately doesn't for 8.0.

It seems compilation works, because I can run compiled kernel-objects.
But for userspace programs linked to libraries I get ld-elf.so undefined
symbol... errors.

Maybe you have some ideas to solve this.

I already tried to use gcc-source from "/usr/src/contrib/" which doesn't
work, too.

Regards,
Marc
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
Marcel Moolenaar
2009-12-15 18:56:50 UTC
Permalink
Post by Marc Lörner
Post by Marcel Moolenaar
Post by Marc Lörner
Now, as it seems, something was changed/patched in gcc from 7.0 to 8.0.
So does anybody know where to tweak/patch or what to put in configuration
of original gcc 4.2.1 to make crosscompilling work for 8.0?
Can you share what you did before to make it work? Maybe from the
patch I can understand the problem you're trying to solve.
- make sysroot directory with all headers and libraries used
and put "--with-sysroot=XXX" as parameters of configure-scripts
- Add "--disable-werror" to configure of binutils2.17
- Add above and "--disable-initfini-array" to configure of gcc
=> This worked for me, but unfortunately doesn't for 8.0.
It seems compilation works, because I can run compiled kernel-objects.
But for userspace programs linked to libraries I get ld-elf.so undefined
symbol... errors.
It seems you have it 95%-99% working. What are the undefined symbols?
--
Marcel Moolenaar
***@mac.com
Marc Lörner
2009-12-15 19:05:52 UTC
Permalink
-------- Original-Nachricht --------
Datum: Tue, 15 Dec 2009 10:56:50 -0800
Betreff: Re: crosscompiled gcc
Post by Marc Lörner
Post by Marcel Moolenaar
Post by Marc Lörner
Now, as it seems, something was changed/patched in gcc from 7.0 to
8.0.
Post by Marc Lörner
Post by Marcel Moolenaar
Post by Marc Lörner
So does anybody know where to tweak/patch or what to put in
configuration
Post by Marc Lörner
Post by Marcel Moolenaar
Post by Marc Lörner
of original gcc 4.2.1 to make crosscompilling work for 8.0?
Can you share what you did before to make it work? Maybe from the
patch I can understand the problem you're trying to solve.
- make sysroot directory with all headers and libraries used
and put "--with-sysroot=XXX" as parameters of configure-scripts
- Add "--disable-werror" to configure of binutils2.17
- Add above and "--disable-initfini-array" to configure of gcc
=> This worked for me, but unfortunately doesn't for 8.0.
It seems compilation works, because I can run compiled kernel-objects.
But for userspace programs linked to libraries I get ld-elf.so undefined
symbol... errors.
It seems you have it 95%-99% working. What are the undefined symbols?
/libexec/ld-elf.so.1: /test_app: Undefined symbol "_ZNSt15basic_streambufIcSt11char_traitsIcEE7seekoffExSt12_Ios_SeekdirSt13_Ios_Openmode"

Maybe something wrong with my boost-lib or libstdc++?

Regards,
Marc
--
Preisknaller: GMX DSL Flatrate für nur 16,99 Euro/mtl.!
http://portal.gmx.net/de/go/dsl02
Loading...