diff options
author | Sam James <sam@gentoo.org> | 2023-02-21 09:27:26 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-04-11 03:36:53 +0100 |
commit | 1d63573f81945a489ea169636fa11850bc74716b (patch) | |
tree | f1a62d7ef9ef905e19421f98cd91e3ce9cdb6c0f /gmon/tst-gmon-gprof.sh | |
parent | 590d0e089b06f158ded713f5e5600eaa66dcea44 (diff) | |
download | glibc-1d63573f81945a489ea169636fa11850bc74716b.tar.gz glibc-1d63573f81945a489ea169636fa11850bc74716b.tar.xz glibc-1d63573f81945a489ea169636fa11850bc74716b.zip |
stdio-common: tests: don't double-define _FORTIFY_SOURCE
Exactly the same as 35bcb08eaa953c9b8bef6ab2486dc4361e1f26c0. If using -D_FORITFY_SOURCE=3 (in my case, I've patched GCC to add =3 instead of =2 (we've done =2 for years in Gentoo)), building glibc tests will fail on tst-bz11319-fortify2 like: ``` <command-line>: error: "_FORTIFY_SOURCE" redefined [-Werror] <built-in>: note: this is the location of the previous definition cc1: all warnings being treated as errors ``` It's just because we're always setting -D_FORTIFY_SOURCE=2 rather than unsetting it first. If F_S is already 2, it's harmless, but if it's another value (say, 1, or 3), the compiler will bawk. (I'm not aware of a reason this couldn't be tested with =3, but the toolchain support is limited for that (too new), and we want to run the tests everywhere possible.) As Siddhesh noted previously, we could implement some fallback logic to determine the maximal F_S value supported by the toolchain, which is a bit easier now that autoconf-archive has been updated for F_S=3 (https://github.com/autoconf-archive/autoconf-archive/pull/269), but let's revisit this if it continues to crop up. Signed-off-by: Sam James <sam@gentoo.org> Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org> (cherry picked from commit ecf8ae6704d5034fc2d5e29e5dc88dbca981581e)
Diffstat (limited to 'gmon/tst-gmon-gprof.sh')
0 files changed, 0 insertions, 0 deletions