[PATCH configure,config.gcc] Fix for PR69153 to allow config.gcc to set target_header_dir
Bernd Edlinger
bernd.edlinger@hotmail.de
Mon Jan 11 21:36:00 GMT 2016
Hi,
On 11.01.2016 20:20, Michael Meissner wrote:
> On Sun, Jan 10, 2016 at 05:10:29PM -0600, Peter Bergner wrote:
>> On Sun, 2016-01-10 at 19:28 +0000, Bernd Edlinger wrote:
>>> Hi Peter,
>>>
>>>> @@ -4167,6 +4167,7 @@
>>>> -d "/opt/$with_advance_toolchain/bin/." -a \
>>>> -d "/opt/$with_advance_toolchain/include/.";
>>>> then
>>>>
>>>> + target_header_dir=`find
>>>> /opt/$with_advance_toolchain/ -path '*/include/features.h' | sed -e
>>>> 's#/features.h##'`
>>>> tm_file="$tm_file ./advance-toolchain.h"
>>>> (at="/opt/$with_advance_toolchain"
>>>> echo "/* Use Advance Toolchain $at */"
>>>
>>> why can't you just set native_system_header_dir instead?
>>>
>>
>> That won't work on our cross builds using --with-advance-toolchain=...
>> options, correct? And don't we really need the native_system_header_dir
>> to really point at the native system headers for tests against gmp.h etc.?
>
> The problem is on native systems, you want to search the AT include files and
> libraries, and then if it doesn't find them in the AT directory, fall back to
> the system directory. This is because AT only has a selected set of libraries
> that it provides. For cross, you want to go with using the normal
> --with-sysroot approach.
>
Hmm, the patch looks just too odd...
Could if work also if you set native_system_header_dir to
/opt/$with_advance_toolchain/include or somthing and instead of
-isystem $at/include in INCLUDE_EXTRA_SPEC you could add something like
%{!nostdinc:-idirafter $original_native_system_header_dir } ?
Bernd.
More information about the Gcc-patches
mailing list