public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org
Subject: [PATCH] fortran: Drop -static-lib{gfortran,quadmath} from f951 [PR46539]
Date: Sat, 20 Aug 2022 10:41:27 +0200	[thread overview]
Message-ID: <YwCeN3wT1mKQO9u4@tucnak> (raw)

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.

--- gcc/fortran/lang.opt.jj	2022-08-17 17:00:28.558530108 +0200
+++ gcc/fortran/lang.opt	2022-08-19 18:09:23.505859992 +0200
@@ -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
--- gcc/fortran/options.cc.jj	2022-08-17 17:00:28.559530096 +0200
+++ gcc/fortran/options.cc	2022-08-19 18:05:32.153797148 +0200
@@ -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_:
 

	Jakub


             reply	other threads:[~2022-08-20  8:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-20  8:41 Jakub Jelinek [this message]
2022-08-20  9:45 ` 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=YwCeN3wT1mKQO9u4@tucnak \
    --to=jakub@redhat.com \
    --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).