Re: target_header_dir vs host-x-host

2012-03-16 Thread Ian Lance Taylor
DJ Delorie d...@redhat.com writes: OK, but what's wrong --with-sysroot=/ ? It should work, it just seems wrong for a native compiler to have a sysroot... I agree that it's a bug, but I'm not sure I think it's the same bug that you think it is. Every toolchain has a sysroot, really. I

target_header_dir vs host-x-host

2012-03-15 Thread DJ Delorie
configure has various ways of specifying the target headers for a cross-compiler. However, none of these work when you're cross-building a native (build!=host==target). Unfortunately, configure looks in $target_header_dir for target headers to determine various bits of functionality. What is

Re: target_header_dir vs host-x-host

2012-03-15 Thread Ian Lance Taylor
DJ Delorie d...@redhat.com writes: configure has various ways of specifying the target headers for a cross-compiler. However, none of these work when you're cross-building a native (build!=host==target). Unfortunately, configure looks in $target_header_dir for target headers to determine

Re: target_header_dir vs host-x-host

2012-03-15 Thread DJ Delorie
My first try would be --with-build-sysroot. Does that fail in some way? It's ignored without --with-sysroot, but if you use --with-sysroot, the cross-built native *also* expects to use a sysroot, which means binutils must also be built with a sysroot, even if its /.

Re: target_header_dir vs host-x-host

2012-03-15 Thread Ian Lance Taylor
DJ Delorie d...@redhat.com writes: My first try would be --with-build-sysroot. Does that fail in some way? It's ignored without --with-sysroot, but if you use --with-sysroot, the cross-built native *also* expects to use a sysroot, which means binutils must also be built with a sysroot, even

Re: target_header_dir vs host-x-host

2012-03-15 Thread DJ Delorie
OK, but what's wrong --with-sysroot=/ ? It should work, it just seems wrong for a native compiler to have a sysroot...

Re: target_header_dir vs host-x-host

2012-03-15 Thread Andrew Pinski
On Thu, Mar 15, 2012 at 9:50 PM, DJ Delorie d...@redhat.com wrote: OK, but what's wrong --with-sysroot=/ ? It should work, it just seems wrong for a native compiler to have a sysroot... I noticed that a lot of binutils tests fail if it is not compiled with --with-sysroot=/ . This is why I