This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


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: Cross build failure: CC doesn't support -z relro but LD does


On 8/10/2012 1:51 AM, David Krauss wrote:
> I'm trying to cross compile glibc-2.16 on OS X for Linux.
> 
> More info: http://stackoverflow.com/q/11876066/153285
> 
> I've configured it like so:
> 
> ../glibc/configure --host=x86_64-pc-linux-gnu --build=x86_64-apple-darwin11 --prefix=/usr/local/cross/linux/ --with-binutils=/usr/local/cross/linux/bin/ --with-headers=/usr/local/cross/linux/include/ libc_cv_forced_unwind=yes libc_cv_ctors_header=yes libc_cv_c_cleanup=yes
> 
> The build fails at the file stdio_lim.h, which is the first thing that happens after the abi-tag.h target is made. So this is one of the first few build products. It tries to build it via stdio_lim.st, finds no rule for that, and bails out.
> 
> Any ideas? Relevant details I left out?

Cross-compiling is difficult and requires considerable knowledge when the given configuration isn't well tested.

I would suggest using crosstool-ng and seeing if they have such a cross configuration already setup.

I know it's possible because there are people that cross compile Sourcery CodeBench sources so they can target ARM GNU/Linux from OS X which is basically the same thing.

I don't know what could be going wrong here and it's a deep and dark rabbit hole that could take days of intense work to figure out.

Sorry to be so dour about it :-(

Cross-compiling from Mac OS X is not something I see anyone testing frequently.

Cheers,
Carlos.
-- 
Carlos O'Donell
Mentor Graphics / CodeSourcery
carlos_odonell@mentor.com
carlos@codesourcery.com
+1 (613) 963 1026


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