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.129.124]) by sourceware.org (Postfix) with ESMTPS id 0B0803858C53 for ; Thu, 18 Aug 2022 10:41:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0B0803858C53 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-139-_wEPcW_wP2OBY7gK4cP_ig-1; Thu, 18 Aug 2022 06:41:40 -0400 X-MC-Unique: _wEPcW_wP2OBY7gK4cP_ig-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 24921800124; Thu, 18 Aug 2022 10:41:40 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C403B9459C; Thu, 18 Aug 2022 10:41:39 +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 27IAfa353156340 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 18 Aug 2022 12:41:37 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 27IAfZat3156339; Thu, 18 Aug 2022 12:41:35 +0200 Date: Thu, 18 Aug 2022 12:41:35 +0200 From: Jakub Jelinek To: Iain Sandoe Cc: Mikael Morin , GCC Patches , GCC Fortran Subject: Re: [PATCH] fortran, v2: Add -static-libquadmath support [PR46539] Message-ID: Reply-To: Jakub Jelinek References: <55BAB9E6-B67B-4686-BAFD-AB06C0740990@googlemail.com> MIME-Version: 1.0 In-Reply-To: <55BAB9E6-B67B-4686-BAFD-AB06C0740990@googlemail.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 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.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: Thu, 18 Aug 2022 10:41:46 -0000 On Thu, Aug 18, 2022 at 11:35:06AM +0100, Iain Sandoe wrote: > > --- gcc/fortran/options.cc.jj 2022-01-18 11:58:59.568982256 +0100 > > +++ gcc/fortran/options.cc 2022-08-16 14:56:22.807525218 +0200 > > @@ -692,6 +692,13 @@ gfc_handle_option (size_t scode, const c > > #endif > > break; > > > > + case OPT_static_libquadmath: > > +#ifndef HAVE_LD_STATIC_DYNAMIC > > + gfc_fatal_error ("%<-static-libquadmath%> is not supported in this " > > + "configuration"); > > +#endif > > I think that this will disable the option on Darwin (where the linker does not > support Bstatic/dynamic) - the point of the specs outfile substitution is to work > for such platforms. So long as the option is not stripped out by the driver, the > specs substitution should work (there is a bug in the g++ driver where this is > not happening properly for -static-libstdc++ - but the gdc driver has it right). It does the same thing as OPT_static_libgfortran and that option presumably isn't disabled on Darwin. My guess is that this is just dead code and could be removed for both options, I think gfc_handle_option is only in f951 program, and the -static-lib* options are driver only, not passed to the compiler. Note, for other options like -static-libstdc++, we also don't reject them if HAVE_LD_STATIC_DYNAMIC isn't defined. Jakub