fortran: Drop -static-lib{gfortran,quadmath} from f951 [PR46539]
Commit Message
Hi!
As discussed earlier, all other -static-lib* options are Driver only,
these 2 are Driver in common.opt and Fortran in lang.opt.
The spec files never pass the -static-lib* options down to any compiler
(f951 etc.), so the 2 errors below are reported only when one
runs ./f951 -static-libgfortran by hand.
The following patch just removes f951 support of these options, the
gfortran driver behavior remains as before. For other -static-lib*
option (and even these because it is never passed to f951) we never
error if we can't support those options, and e.g. Darwin is actually
able to handle those options through other means.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
2022-08-20 Jakub Jelinek <jakub@redhat.com>
PR fortran/46539
* lang.opt (static-libgfortran, static-libquadmath): Change Fortran
to Driver.
* options.cc (gfc_handle_option): Don't handle OPT_static_libgfortran
nor OPT_static_libquadmath here.
Jakub
Comments
Le 20/08/2022 à 10:41, Jakub Jelinek via Fortran a écrit :
> Hi!
>
> As discussed earlier, all other -static-lib* options are Driver only,
> these 2 are Driver in common.opt and Fortran in lang.opt.
>
> The spec files never pass the -static-lib* options down to any compiler
> (f951 etc.), so the 2 errors below are reported only when one
> runs ./f951 -static-libgfortran by hand.
>
> The following patch just removes f951 support of these options, the
> gfortran driver behavior remains as before. For other -static-lib*
> option (and even these because it is never passed to f951) we never
> error if we can't support those options, and e.g. Darwin is actually
> able to handle those options through other means.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
OK, thanks.
@@ -860,11 +860,11 @@ Fortran Joined Separate
; Documented in common.opt
static-libgfortran
-Fortran
+Driver
Statically link the GNU Fortran helper library (libgfortran).
static-libquadmath
-Fortran
+Driver
Statically link the GCC Quad-Precision Math Library (libquadmath).
std=f2003
@@ -685,20 +685,6 @@ gfc_handle_option (size_t scode, const c
gfc_option.source_form = FORM_FREE;
break;
- case OPT_static_libgfortran:
-#ifndef HAVE_LD_STATIC_DYNAMIC
- gfc_fatal_error ("%<-static-libgfortran%> is not supported in this "
- "configuration");
-#endif
- break;
-
- case OPT_static_libquadmath:
-#ifndef HAVE_LD_STATIC_DYNAMIC
- gfc_fatal_error ("%<-static-libquadmath%> is not supported in this "
- "configuration");
-#endif
- break;
-
case OPT_fintrinsic_modules_path:
case OPT_fintrinsic_modules_path_: