From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id B97BC3858D28 for ; Sat, 20 Aug 2022 08:41:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B97BC3858D28 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-624-tY70ym7uMY-dyb4JfAk-hg-1; Sat, 20 Aug 2022 04:41:31 -0400 X-MC-Unique: tY70ym7uMY-dyb4JfAk-hg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D6FB729AB3E5; Sat, 20 Aug 2022 08:41:30 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 98F201121315; Sat, 20 Aug 2022 08:41:30 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 27K8fSHq824734 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sat, 20 Aug 2022 10:41:28 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 27K8fRGO824733; Sat, 20 Aug 2022 10:41:27 +0200 Date: Sat, 20 Aug 2022 10:41:27 +0200 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: [PATCH] fortran: Drop -static-lib{gfortran,quadmath} from f951 [PR46539] Message-ID: Reply-To: Jakub Jelinek MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2022 08:41:36 -0000 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 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