From: Paul Richard Thomas <paul.richard.thomas@gmail.com>
To: Tobias Burnus <burnus@net-b.de>
Cc: gcc patches <gcc-patches@gcc.gnu.org>, gfortran <fortran@gcc.gnu.org>
Subject: Re: [Patch, Build+Fortran] PR54725 - correctly set TARGET_SYSTEM_ROOT for CPP
Date: Sun, 21 Oct 2012 11:04:00 -0000 [thread overview]
Message-ID: <CAGkQGi+9eD4LqEtTtNRxDUJMtc4mS+cU0JfhbFAr72Qv929fHw@mail.gmail.com> (raw)
In-Reply-To: <50810DC8.7010905@net-b.de>
Dear Tobias,
I had already reviewed this patch in its previous accidental manifestation :-)
OK for trunk
Thanks for the patch
Paul
On 19 October 2012 10:22, Tobias Burnus <burnus@net-b.de> wrote:
> gfortran was ignoring the TARGET_SYSTEM_ROOT and thus searched in
> /usr/include for files specified with "#include"/"include" files and for
> .mod files.
>
> The solution is to do in gcc/fortran/cpp.c the same as it is done in
> gcc/c-family/c-opts.c.
>
>
> However, the TARGET_SYSTEM_ROOT also has to be available. For C/C++ that's
> done via gcc/Makefile.in:
> CFLAGS-c-family/c-opts.o += @TARGET_SYSTEM_ROOT_DEFINE@
>
> For Fortran, we have to to it likewise, but slightly different:
>
> The gcc/Makefile.in gets updated by configure and written to
> $BUILD/gcc/Makefile. At that point the @TARGET...@ has been replaced by the
> actual value.
>
> For Fortran, the gcc/fortran/Make-lang.in is included in
> $BUILD/gcc/Makefile:
> include $(LANG_MAKEFRAGS)
>
> Thus, we cannot use @TARGET_...@ as it won't get replaced. Hence, I create a
> Makefile variable in gcc/Makefile.in and set it there, which then in turn
> gets used in gcc/fortran/Make-lang.in.
>
> Build and regtested on x86-64-gnu-linux.
> OK for the trunk?
>
> Tobias
>
> PS: I haven't yet cross compiled and thus checked whether it indeed works.
--
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy
prev parent reply other threads:[~2012-10-21 9:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-19 9:23 Tobias Burnus
2012-10-21 11:04 ` Paul Richard Thomas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGkQGi+9eD4LqEtTtNRxDUJMtc4mS+cU0JfhbFAr72Qv929fHw@mail.gmail.com \
--to=paul.richard.thomas@gmail.com \
--cc=burnus@net-b.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).