Skip to content

Conversation

@royhills
Copy link
Owner

@royhills royhills commented Aug 26, 2024

Currently we check for -D_FORTIFY_SOURCE=2 support using GCC version checks. Update this to use -D_FORTIFY_SOURCE=3 if supported by the toolchain.

Don't use ax_add_fortify_source.m4 from the autoconf archive as originally planned because this macro leaves the setting unchanged if it has been configured in the compiler settings.

This change will add -D_FORTIFY_SOURCE=3 to CFLAGS if supported (recent GCC and Clang versions) and, failing that, add -D_FORTIFY_SOURCE=2 which will almost certainly be supported.

@coveralls
Copy link

Coverage Status

coverage: 91.302%. remained the same
when pulling 1bfc6be on fortify-source-3
into 89ae57e on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants