From unknown Wed Jun 18 23:14:47 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#63172 <63172@debbugs.gnu.org> To: bug#63172 <63172@debbugs.gnu.org> Subject: Status: [PATCH cppi] build: avoid a compiler warning about _FORTIFY_SOURCE redefinition Reply-To: bug#63172 <63172@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:14:47 +0000 retitle 63172 [PATCH cppi] build: avoid a compiler warning about _FORTIFY_S= OURCE redefinition reassign 63172 cppi submitter 63172 "Dmitry V. Levin" severity 63172 normal tag 63172 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 29 04:10:14 2023 Received: (at submit) by debbugs.gnu.org; 29 Apr 2023 08:10:14 +0000 Received: from localhost ([127.0.0.1]:35166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psfen-0008V6-WC for submit@debbugs.gnu.org; Sat, 29 Apr 2023 04:10:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:58610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psfel-0008Uy-Rx for submit@debbugs.gnu.org; Sat, 29 Apr 2023 04:10:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1psfel-000444-Go for bug-cppi@gnu.org; Sat, 29 Apr 2023 04:10:11 -0400 Received: from vmicros1.altlinux.org ([194.107.17.57]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1psfej-00076v-H4 for bug-cppi@gnu.org; Sat, 29 Apr 2023 04:10:11 -0400 Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id 1117D72C97E; Sat, 29 Apr 2023 11:10:06 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id F17F97CF952; Sat, 29 Apr 2023 11:10:05 +0300 (IDT) Date: Sat, 29 Apr 2023 11:10:05 +0300 From: "Dmitry V. Levin" To: bug-cppi@gnu.org Subject: [PATCH cppi] build: avoid a compiler warning about _FORTIFY_SOURCE redefinition Message-ID: <20230429081005.GA553@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Received-SPF: pass client-ip=194.107.17.57; envelope-from=ldv@altlinux.org; helo=vmicros1.altlinux.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Jim Meyering X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) When compiler provides its own definition of _FORTIFY_SOURCE, it complains about _FORTIFY_SOURCE being redefined: ./lib/config.h:35: error: "_FORTIFY_SOURCE" redefined [-Werror] 35 | # define _FORTIFY_SOURCE 2 | : note: this is the location of the previous definition * configure.ac (FORTIFY_SOURCE): Do not redefine _FORTIFY_SOURCE. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f2078b2..36d8c31 100644 --- a/configure.ac +++ b/configure.ac @@ -78,7 +78,7 @@ if test "$gl_gcc_warnings" = yes; then AH_VERBATIM([FORTIFY_SOURCE], [/* Enable compile-time and run-time bounds-checking, and some warnings, without upsetting glibc 2.15+. */ - #if defined __OPTIMIZE__ && __OPTIMIZE__ + #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__ # define _FORTIFY_SOURCE 2 #endif ]) -- ldv From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 30 10:02:04 2023 Received: (at submit) by debbugs.gnu.org; 30 Apr 2023 14:02:04 +0000 Received: from localhost ([127.0.0.1]:38184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pt7cq-0002gs-A2 for submit@debbugs.gnu.org; Sun, 30 Apr 2023 10:02:04 -0400 Received: from lists.gnu.org ([209.51.188.17]:54230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pt7ck-0002gP-8Z for submit@debbugs.gnu.org; Sun, 30 Apr 2023 10:02:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pt7cj-0000rZ-VS for bug-cppi@gnu.org; Sun, 30 Apr 2023 10:01:57 -0400 Received: from mail-lf1-f53.google.com ([209.85.167.53]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pt7ci-0005jO-7z for bug-cppi@gnu.org; Sun, 30 Apr 2023 10:01:57 -0400 Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-4f00d41df22so18521934e87.1 for ; Sun, 30 Apr 2023 07:01:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682863313; x=1685455313; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EgnU0fuqb9Vi6VBu/SaqbPaOWwEOh/Ee4p+thuwe9l8=; b=fXk/o5/oLhd4bDNST2E53zgb9MHpCPeLPMjpymP3qLEvTnzBVBpgPQlvrUdvkx4i4j FCyYo7IFllk5XLFE+MGGXdfEKw/TFNOwzAfoy72F9KOkgjy+tom42iL/wY9Fyc8Dk12b z4ZTpDaKA9KC6c4XXfViSftYyTHgFhu+YegAT4WGa/kutzVGnnDdaTgKhSFFirych2nI JdNXDEtlg1SxazDxeixC24oDHWPcB5E3tm+E8MkvNGQ2j3WHQs1Yt9xw9GyKaApMBjYs 7KU8kc9PRHayLhlegaqLFCDImFoNcCip62Z56Pc17eCcYNQ6C++X5eyJNOkzL2G3W742 jIoA== X-Gm-Message-State: AC+VfDxSKDM/KLhfo+TxLd5iMoNRxNj+I9bCDw+eJ12pIVasItNU9PTr mHgyWN7t67ZDJc936hH/AfHZE1jkvPJ3M6TSU2g= X-Google-Smtp-Source: ACHHUZ5ILVH4Mk2hQd64gZuMRr9AcQayI1EMDSiLAopcME9sa52PzGx9oC0iXPO0c0BuzHfhQJa6IXmQkntu/3iUt6Y= X-Received: by 2002:a05:6512:3c9a:b0:4ec:83fd:1599 with SMTP id h26-20020a0565123c9a00b004ec83fd1599mr4658852lfv.33.1682863313169; Sun, 30 Apr 2023 07:01:53 -0700 (PDT) MIME-Version: 1.0 References: <20230429081005.GA553@altlinux.org> In-Reply-To: <20230429081005.GA553@altlinux.org> From: Jim Meyering Date: Sun, 30 Apr 2023 16:01:40 +0200 Message-ID: Subject: Re: [PATCH cppi] build: avoid a compiler warning about _FORTIFY_SOURCE redefinition To: "Dmitry V. Levin" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=209.85.167.53; envelope-from=meyering@gmail.com; helo=mail-lf1-f53.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit Cc: bug-cppi@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On Sat, Apr 29, 2023 at 10:10=E2=80=AFAM Dmitry V. Levin = wrote: > When compiler provides its own definition of _FORTIFY_SOURCE, it complain= s > about _FORTIFY_SOURCE being redefined: > > ./lib/config.h:35: error: "_FORTIFY_SOURCE" redefined [-Werror] > 35 | # define _FORTIFY_SOURCE 2 > | > : note: this is the location of the previous definition > > * configure.ac (FORTIFY_SOURCE): Do not redefine _FORTIFY_SOURCE. Thank you. Pushed, along with a few other changes.