From patchwork Sat Aug 20 08:41:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 636 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f406:0:0:0:0:0 with SMTP id g6csp154372wro; Sat, 20 Aug 2022 01:42:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR6FDDR/6hNGl/7pwso/ltb0J2is+x4bCT0EqJcoEpxaeOCApFU4UMLSxwMiA4KZwephXpWq X-Received: by 2002:a17:907:2da0:b0:73d:692f:c738 with SMTP id gt32-20020a1709072da000b0073d692fc738mr605250ejc.417.1660984956615; Sat, 20 Aug 2022 01:42:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660984956; cv=none; d=google.com; s=arc-20160816; b=RYFJ991haoIQ3Gmm5vwBpRwOxBw/vejk/i1rJMq8OetA8ebYMkCT0OkVjn/ONsp62z 11DAGtEbkj1D6E7miqjGf46ctsBdL4tTonfWagz3/0vJD6uXaesfrOvXjoBY2fmhsh+7 nOzZMCWwUwbK/lf5ETEgAyuD9Rfk3nAvS3R4SfFXGbx+4rvLn5PKK/kkfOLf6swAP5fq p6Slxe0KCVlX2mPBRi5GLaqNTZGAIjQKYBrRmqfzK4CiEFWDtLJhwdBuhIPX2vv514iS J1sJuW05gOd+oii3lrSVJwLJQHRNe6QLw1J4Ws95PiQNmT40z5ZSFCsWICpv6BZ1FrDv uknw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=vBrvC45rwaQlRKrXflf/YHQSLbJrFgZnSJdBjRSENF4=; b=z8LI1C48hKQDeh1Q0C0U03wVtMFjsg1KGW73Yh/Ivp/EDoBYWgIjJS3uy1isZdj9ru 5tPKQOeCbu/51x4d51Qll/Yw1NHIBJ8cP8RuSWaVwLlqYJF718AcDSVO7KEvKTiHH66E 5B99rd4aVQ+pNecrCYr2lX3E0HUHsnCIK6q81wN/AtZXNtZZy6ZDEidPXAlRg/2mph/k +0FO0s6mivJ8U/IrwQak/I/Bo9ryYIFMkAIFQKEI/Wn6ZB6igQUsjYeoMcyOUGJzFk56 +lrxm52a4DZdrUwEoferS7+L0LNrI+CnEFoHznsxeJzl8aYoSvUo2nakXqgfnX1SAiBP H3Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ltqJI+tt; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id n14-20020a05640205ce00b004461b801769si4889475edx.390.2022.08.20.01.42.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Aug 2022 01:42:36 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ltqJI+tt; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 62B143858287 for ; Sat, 20 Aug 2022 08:42:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 62B143858287 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1660984955; bh=vBrvC45rwaQlRKrXflf/YHQSLbJrFgZnSJdBjRSENF4=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ltqJI+ttV2FM+3QfgFYDP53ajC9rnh8Y9MfISAg8gwx6vH/sSpMyLNlmHGDdvgWyp 8EhY3D40BD4BAFYzbpfda6NQ0ZR2Kzk5UgG9mJba4zoqw0yK4dKSbCOZvoSmOBwnGG UJYhdzRWRskjLSKSKZZ7ENTKikxjkptF9881s1Eo= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 AE1DD3858D39 for ; Sat, 20 Aug 2022 08:41:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AE1DD3858D39 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 To: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: [PATCH] fortran: Drop -static-lib{gfortran,quadmath} from f951 [PR46539] Message-ID: 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-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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1741668962118042059?= X-GMAIL-MSGID: =?utf-8?q?1741668962118042059?= 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. Jakub --- 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_: