public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tobias Burnus <burnus@net-b.de>
To: gcc patches <gcc-patches@gcc.gnu.org>,
	gfortran <fortran@gcc.gnu.org>,  Jakub Jelinek <jakub@redhat.com>
Subject: [libgomp / Fortran, Patch] PR55884 - Add -fintrinsic-module-path= and use it
Date: Mon, 07 Jan 2013 15:07:00 -0000	[thread overview]
Message-ID: <50EAE4A0.1090901@net-b.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 1252 bytes --]

gfortran uses (via the driver) the separated version of the flag, e.g.

	-fintrinsic-modules-path /usr/lib64/gcc/x86_64-suse-linux/4.8/finclude

However, the current version also supports a joined version, which comes
- very confusingly - without "=":
	
	-fintrinsic-module-path/usr/lib64/gcc/x86_64-suse-linux/4.8/finclude

This patch keeps the first version but replaces the latter
by a joined version which uses "=", which is in line with other command-line
arguments (the w/o "=" version is only common with single-letter arguments like -I)

	-fintrinsic-module-path=/usr/lib64/gcc/x86_64-suse-linux/4.8/finclude


While the patch changes a syntax which is supported since 2007, I 
believe that it is very unlikely that any user code depends on this; the 
flag is not documented and parsing the output ("-v", e.g. in configure 
scripts) will pick up the space-separated version of the driver.


The patch then uses the "=" version to (hopefully) fix the libgomp 
testsuite on hppa2.0w-hp-hpux11.11, which for unclear reasons [%spec 
handling?] either looses the dirname after -fintrinsic-modules-path or 
reorders the arguments such that the flag and its argument get separated.


Build and regtested on x86-64-gnu-linux.
OK for the trunk?

Tobias

[-- Attachment #2: module-dir.diff --]
[-- Type: text/x-patch, Size: 2076 bytes --]

gcc/fortran/
2013-01-07  Jakub Jelinek  <jakub@redhat.com>
	    Tobias Burnus  <burnus@net-b.de>

	PR driver/55884
	* lang.opt (fintrinsic-modules-path): Don't accept Joined.
	(fintrinsic-modules-path=): New.
	* options.c (gfc_handle_option): Handle the latter.

libgomp/
2013-01-07  Jakub Jelinek  <jakub@redhat.com>
	    Tobias Burnus  <burnus@net-b.de>

	PR driver/55884
	* testsuite/libgomp.fortran/fortran.exp: Use
	-fintrinsic-modules-path= instead of
	-fintrinsic-modules-path.

diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt
index 1535187..e2d309f 100644
--- a/gcc/fortran/lang.opt
+++ b/gcc/fortran/lang.opt
@@ -423,7 +423,11 @@ Fortran RejectNegative
 Interpret any INTEGER(4) as an INTEGER(8)
 
 fintrinsic-modules-path
-Fortran RejectNegative Joined Separate
+Fortran RejectNegative Separate
+Specify where to find the compiled intrinsic modules
+
+fintrinsic-modules-path=
+Fortran RejectNegative Joined
 Specify where to find the compiled intrinsic modules
 
 ffixed-line-length-none
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index e05b935..0e0a71d 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -845,6 +845,7 @@ gfc_handle_option (size_t scode, const char *arg, int value,
       break;
 
     case OPT_fintrinsic_modules_path:
+    case OPT_fintrinsic_modules_path_:
       gfc_add_intrinsic_modules_path (arg);
       break;
 
diff --git a/libgomp/testsuite/libgomp.fortran/fortran.exp b/libgomp/testsuite/libgomp.fortran/fortran.exp
index 68440d18..40ac840 100644
--- a/libgomp/testsuite/libgomp.fortran/fortran.exp
+++ b/libgomp/testsuite/libgomp.fortran/fortran.exp
@@ -14,7 +14,7 @@ set quadmath_library_path "../libquadmath/.libs"
 dg-init
 
 if { $blddir != "" } {
-    lappend ALWAYS_CFLAGS "additional_flags=-fintrinsic-modules-path ${blddir}"
+    lappend ALWAYS_CFLAGS "additional_flags=-fintrinsic-modules-path=${blddir}"
     # Look for a static libgfortran first.
     if [file exists "${blddir}/${lang_library_path}/libgfortran.a"] {
         set lang_test_file "${lang_library_path}/libgfortran.a"

             reply	other threads:[~2013-01-07 15:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-07 15:07 Tobias Burnus [this message]
2013-01-11 17:37 ` Mikael Morin

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=50EAE4A0.1090901@net-b.de \
    --to=burnus@net-b.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    /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).