From patchwork Mon Jan 7 15:07:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [libgomp, /, Fortran] PR55884 - Add -fintrinsic-module-path= and use it Date: Mon, 07 Jan 2013 05:07:12 -0000 From: Tobias Burnus X-Patchwork-Id: 209946 Message-Id: <50EAE4A0.1090901@net-b.de> To: gcc patches , gfortran , Jakub Jelinek 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 gcc/fortran/ 2013-01-07 Jakub Jelinek Tobias Burnus 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 Tobias Burnus 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"