This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA 1/2]: Don't ignore target_header_dir when deciding inhibit_libc
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: uweigand at de dot ibm dot com
- Cc: law at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Mon, 12 Oct 2015 12:58:00 +0200
- Subject: Re: [RFA 1/2]: Don't ignore target_header_dir when deciding inhibit_libc
- Authentication-results: sourceware.org; auth=none
> From: Ulrich Weigand <uweigand@de.ibm.com>
> Date: Mon, 12 Oct 2015 11:58:40 +0200
(cutting *only* because I had a comment; not an indication of
preference.)
> --or--
>
> 2b) Change target_header_dir from a single directory to a list of
> directories, and check all of these for header files. This list
> would typically include both sys-include and include.
>
> This should not change behavior for any existing user, and would
> bring the header search at configure time in line with the actual
> search order used by the compiler at run time, which will probably
> be the least surprise to users anyway ...
Agreed. Just pointing out that it would take some effort in
gcc/configure.ac.
> For 1), something like the following should probably suffice:
>
> Index: gcc/configure.ac
> ===================================================================
> --- gcc/configure.ac (revision 228530)
> +++ gcc/configure.ac (working copy)
> @@ -1993,7 +1993,7 @@ elif test "x$TARGET_SYSTEM_ROOT" != x; t
> fi
>
> if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
> - if test "x$with_headers" != x; then
> + if test "x$with_headers" != x && test "x$with_headers" != xyes; then
> target_header_dir=$with_headers
> elif test "x$with_sysroot" = x; then
> target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-include"
>
>
> I'll probably not spend any more time right now to try to implement
> either of the 2) variants; I can live with using sys-include for now.
To be clear (to those skipping most of the thread), I'm ok with this.
Thanks.
brgds, H-P