This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[gfortran,commited] Fix handling of -J option
- From: FX Coudert <fxcoudert at gmail dot com>
- To: "fortran at gcc dot gnu dot org List" <fortran at gcc dot gnu dot org>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 20 Jan 2007 14:02:31 +0100
- Subject: [gfortran,commited] Fix handling of -J option
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=DOc7aRERugw2gQAVl7fK71h0QkhDaMuVNCWYdGhf3gGBqPB7KsSI5zWkRRu/BF9XVAxUWOuA9Ng6t7E4WbGHnC1Yw43eofwYo0TROyYpk9tL1PTJMfgxi4FotCZoRAbcxk6VJhtwXaYmrMiU1X8jMDau5g9WhROumSHdIjpOtBM=
The following patch, commited to mainline as rev. 121000, fixes PR
fortran/30446 by adding the path specified in the -J (or -M) option
to the search path for modules. Otherwise, module files were created
in a given directory but gfortran then couldn't find them.
Commited as obvious after bootstraping (with Dirk Muller's patch to
prevent the current bootstrap breakage) and regtesting with
RUNTESTFLAGS="--target_board=unix/-Jmodules". I will commit it to 4.2
after bootstrap and regtesting.
2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR fortran/30446
* options.c (gfc_handle_module_path_options): Path used in -J
option is now added to the module search path.
Index: options.c
===================================================================
--- options.c (revision 120949)
+++ options.c (working copy)
@@ -345,6 +345,8 @@
gfc_option.module_dir = (char *) gfc_getmem (strlen (arg) + 2);
strcpy (gfc_option.module_dir, arg);
strcat (gfc_option.module_dir, "/");
+
+ gfc_add_include_path (gfc_option.module_dir, true);
}
static void