From: Mark Wielaard <mark@klomp.org>
To: elfutils-devel@sourceware.org
Cc: Siddhesh Poyarekar <siddhesh@sourceware.org>
Subject: Re: [PATCH] configure: Test for _FORTIFY_SOURCE=3 support.
Date: Mon, 14 Mar 2022 12:56:15 +0100 [thread overview]
Message-ID: <748f4c449f74ba05ba75684309dc4f488a099915.camel@klomp.org> (raw)
In-Reply-To: <20220310170652.22420-1-mark@klomp.org>
Hi,
On Thu, 2022-03-10 at 18:06 +0100, Mark Wielaard wrote:
> _FORTIFY_SOURCE=3 adds extra glibc (dynamic) fortification checks
> when using GCC 12.
>
> This adds a configure check to see if -D_FORTIFY_SOURCE=3 can be
> used.
> If not, configure will fall back to -D_FORTIFY_SOURCE=2.
>
> On some older glibc versions (glibc 2.17) using -D_FORTIFY_SOURCE=3
> provides the same fortification as _FORTIFY_SOURCE=2. On some newer
> glibc versions and older GCC (glibc 2.34 amd gcc 11) using
> -D_FORTIFY_SOURCE=3 produces a not supported warning (and we fall
> back to -D_FORTIFY_SOURCE=2). With newer glibc and newer GCC versions
> (glibc 2.35 and gcc 12) -D_FORTIFY_SOURCE=3 will use the newer
> dynamic
> fortification checks.
>
> This patch also makes sure that AC_PROG_CXX is used earlier so that
> CXXFLAGS is always setup correctly (even if we then don't use it).
> And it outputs both the CFLAGS and CXXFLAGS as used at the end.
Pushed.
Cheers,
Mark
prev parent reply other threads:[~2022-03-14 11:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 17:06 Mark Wielaard
2022-03-14 11:56 ` Mark Wielaard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=748f4c449f74ba05ba75684309dc4f488a099915.camel@klomp.org \
--to=mark@klomp.org \
--cc=elfutils-devel@sourceware.org \
--cc=siddhesh@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).