Skip to content

Commit 4f2a89a

Browse files
authored
Implement workaround for FORTIFY_SOURCE warning with jitterentropy (#2728)
### Issues: Resolves #2725 ### Description of changes: We have received several reports where users are required to workaround compilation issues with v1.60.0+ releases of AWS-LC where we re-introduced jitterentropy into the library. This silences the associated fortify source warnings if FORTIFY_SOURCE is enabled, as the `-O0` optimization flag, required by jitterentropy's design, is not compatible with it. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.
1 parent 815eee1 commit 4f2a89a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

third_party/jitterentropy/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if(WIN32)
2424
endif()
2525
else()
2626
set(CMAKE_POSITION_INDEPENDENT_CODE true)
27-
set(JITTER_COMPILE_FLAGS "-DAWSLC -fwrapv --param ssp-buffer-size=4 -fvisibility=hidden -Wcast-align -Wmissing-field-initializers -Wshadow -Wswitch-enum -Wextra -Wall -pedantic -O0 -fwrapv")
27+
set(JITTER_COMPILE_FLAGS "-DAWSLC -fwrapv --param ssp-buffer-size=4 -fvisibility=hidden -Wcast-align -Wmissing-field-initializers -Wshadow -Wswitch-enum -Wextra -Wall -pedantic -O0 -fwrapv -Wp,-U_FORTIFY_SOURCE")
2828
if ((NOT GCC) OR (GCC AND CMAKE_C_COMPILER_VERSION VERSION_GREATER "4.3"))
2929
# -Wconversion was changed from GCC version 4.3. Prior it was meant as
3030
# an aid in translating code from old C to modern C. It was not meant

0 commit comments

Comments
 (0)