From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 173C91F670 for ; Mon, 25 Oct 2021 22:17:42 +0000 (UTC) Received: from localhost ([::1]:38624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mf8He-0003pp-OO for normalperson@yhbt.net; Mon, 25 Oct 2021 18:17:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mf7xD-00062U-CU for bug-gnulib@gnu.org; Mon, 25 Oct 2021 17:56:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:48229) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mf7x8-0002r2-LC for bug-gnulib@gnu.org; Mon, 25 Oct 2021 17:56:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635198982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=my92u6HKGU7dvROs/+Zab7DszSEbi5RLkWSnDfqHHKs=; b=Q4b/GvfdvBBGi/nkh9ZOGAY7/QB9p27KrJU5lzdZ6c1sYwCQetEDIERWk83+0xIW5vxd5p zZO1OF75wGInGXdCCPaIQJgyfPoLj1A2eyZf7iVMt6sCdtCWL93UZKfNaEzN3B6h0b7Kfr y7hsdMsptF5VuZhm3XsMuRJiWr+gjOk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-438-L5eLfZwLOmaXj2383fzJeA-1; Mon, 25 Oct 2021 17:56:20 -0400 X-MC-Unique: L5eLfZwLOmaXj2383fzJeA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 01782802682 for ; Mon, 25 Oct 2021 21:56:20 +0000 (UTC) Received: from eesha.redhat.com (unknown [10.22.50.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6401019C79; Mon, 25 Oct 2021 21:56:19 +0000 (UTC) From: Robbie Harwood To: bug-gnulib@gnu.org Subject: [PATCH 07/11] Make CFLAGS less painful Date: Mon, 25 Oct 2021 17:55:40 -0400 Message-Id: <20211025215543.111906-8-rharwood@redhat.com> In-Reply-To: <20211025215543.111906-1-rharwood@redhat.com> References: <20211025215543.111906-1-rharwood@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=rharwood@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Received-SPF: pass client-ip=170.10.133.124; envelope-from=rharwood@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 25 Oct 2021 18:17:19 -0400 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Jones , Robbie Harwood Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" From: Peter Jones Signed-off-by: Peter Jones [rharwood@redhat.com: make rpm gunk conditional] Signed-off-by: Robbie Harwood --- gnulib-tool | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gnulib-tool b/gnulib-tool index 9c4a6c17e..24cdbe2da 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -3841,18 +3841,23 @@ func_emit_lib_Makefile_am () cppflags_part1= fi if $for_test; then - cppflags_part2=" -DGNULIB_STRICT_CHECKING=1" + cppflags_part2=" \$(HOST_CPPFLAGS) -DGNULIB_STRICT_CHECKING=1 -D_GLIBCXX_ASSERTIONS " else - cppflags_part2= + cppflags_part2=" \$(HOST_CPPFLAGS) -D_GLIBCXX_ASSERTIONS " + fi + rpm_extra_cflags= + if test -f "/usr/lib/rpm/redhat/redhat-hardened-cc1" && test -f "/usr/lib/rpm/redhat/redhat-annobin-cc1"; then + rpm_extra_cflags="-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" fi if test -z "$makefile_name"; then echo echo "AM_CPPFLAGS =$cppflags_part1$cppflags_part2" - echo "AM_CFLAGS =" + echo "AM_CFLAGS = \$(HOST_CFLAGS) -fexceptions -fstack-protector-strong -fno-strict-aliasing $rpm_extra_cflags -Wp,-D_GLIBCXX_ASSERTIONS -Wp,-DGNULIB_STRICT_CHECKING=1 -W -Wall -Wextra -Wno-undef -Wno-missing-field-initializers -Wno-unused-parameter -Werror -Wno-error=vla -Wno-error=type-limits -Werror=format-security -Werror=trampolines -Wno-error=format-nonliteral -Wno-error=cast-align " else if test -n "$cppflags_part1$cppflags_part2"; then echo echo "AM_CPPFLAGS +=$cppflags_part1$cppflags_part2" + echo "AM_CFLAGS = \$(HOST_CFLAGS) -fexceptions -fstack-protector-strong -fno-strict-aliasing $rpm_extra_cflags -Wp,-D_GLIBCXX_ASSERTIONS -Wp,-DGNULIB_STRICT_CHECKING=1 -W -Wall -Wextra -Wno-undef -Wno-missing-field-initializers -Wno-unused-parameter -Werror -Wno-error=vla -Wno-error=type-limits -Werror=format-security -Werror=trampolines -Wno-error=format-nonliteral -Wno-error=cast-align " fi fi echo -- 2.33.0