Re: Cross-compiling gcc? (sysroot confusion)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 5 Nov 2014 15:35:16 +0100
Pierre Ossman <ossman@xxxxxxxxx> wrote:

> > 
> > If not you can do something like this: --with-gmp=/sysroot (you don't need to add --with-mpfr and --with-mpc as long as you used --with-gmp) --host=i686-pc-linux-gnu --with-build-sysroot=/sysroot --with-sysroot=/ 
> 
> My plan is that that final gcc will be run as /usr/bin/gcc after all
> of /sysroot has been moved to a separate machine, yes.
> 
> So it sounds like --with-build-sysroot is what I need. Thanks.
> 

Unfortunately this isn't working. The problem is that it tries to test
execute programs. Which of course fails as it won't find ld-linux.

gcc's main configure seems to think it is cross compiling as is quite
content with things:

> configure:4415: checking whether the C compiler works
> configure:4424: ./a.out
> ../configure: ./a.out: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
> configure:4428: $? = 126
> configure:4443: result: yes
> configure:4450: checking whether we are cross compiling
> configure:4452: result: yes

But the configure in the sub-directories are not playing nice:

> configure:2679: checking whether the C compiler works
> configure:2688: ./a.out
> /home/cendio/cenbuild.git/repo/rpmbuild/BUILD/gcc-4.5.4/libdecnumber/configure: ./a.out: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
> configure:2692: $? = 126
> configure:2699: error: in `/home/cendio/cenbuild.git/repo/rpmbuild/BUILD/gcc-4.5.4/build/libdecnumber':
> configure:2703: error: cannot run C compiled programs.
> If you meant to cross compile, use `--host'.
> See `config.log' for more details.

This is from libdecnumber.

My full configure line:

> ../configure --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-build-sysroot=/opt/cendio-build/arch/i386 --with-sysroot=/ --disable-nls --disable-multilib --enable-shared --enable-threads=posix --enable-languages=c,c++

Ideas?

Rgds
-- 
Pierre Ossman           Software Development
Cendio AB		http://cendio.com
Teknikringen 8		http://twitter.com/ThinLinc
583 30 Linköping	http://facebook.com/ThinLinc
Phone: +46-13-214600	http://plus.google.com/112509906846170010689

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux