| Newsgroups |
gmane.comp.lib.newlib |
| Message-ID |
<[email protected]> |
Hi Jeff,
>> > Is it possible to point to an empty directory to skirt the
>> > inhibit_libc check
>>
>> No, as stdio.h needs to exist there ($target_header_dir gets set to
>> --with_headers value)
>>
>> if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
>> test x$with_newlib = xyes ; } &&
>> { test "x$with_headers" = xno || test ! -f "$target_header_dir/stdio.h";
>> } ; then
>> inhibit_libc=true
>>
> And creating a dummy stdio.h doesn't work, as that then gets installed
> in sys-include and used.
>
> > and use the target/include headers that you say are on the include
> > path
>>
>> For a clean build, these only exist after newlib is built and
>> installed though. Does that mean GCC needs to be built twice?
>>
>
>What you want to do isn't currently supported in a single configure/build.
It seems that inhibt_libc still gets set even if I build gcc for a second time using --with-headers, because $target_header_dir/stdio.h does not exist, as $target_header_dir is target/sys-include, rather than target/include (and target/sys-include is only created if --with-headers=dir had been used for the first gcc build, but we can't do that because that creates a empty newlib.h file in there).
If for the second build of gcc, I pass --with-headers=/path/to/target/include instead of just --with-headers then inhibit_lib gets set to false as I want, but gcc/configure copies all of target/include to target/sys-include, which isn't ideal as I then have duplicate directories and any subsequent updates to target/include are hidden as target/sys-include is at the head of gcc's search path.
Deleting target/sys-include after it's built is a possibility, but seems a bit hacky. Should the test for ! -f "$target_header_dir/stdio.h" be changed/omitted instead? Is there a better procedure to build the libraries?
Cheers,
Jon