Skip to content

Commit

Permalink
compiler-hardening-check: Clarify test for -fhardened (#38582)
Browse files Browse the repository at this point in the history
It took me a little bit to understand this logic during code review -
hoping this helps the next person.

Signed-off-by: dann frazier <[email protected]>
  • Loading branch information
dannf authored Jan 13, 2025
1 parent 3de7623 commit 6d98d06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pipelines/test/compiler-hardening-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ pipeline:
out=$(./hello-disabled 1 || true)
[ "$out" = "hello-c" ]
# Compile without bind now (gcc 14+ specific test)
# Compile without bind now. Test for -fhardened support (introduced in
# gcc 14), and no-op the test if unsupported.
GCC_SPEC_FILE=/dev/null ${{inputs.cc}} -fhardened -Wl,-z,lazy -v -o hello-lazy hello.c || cp hello-disabled hello-lazy
out=$(./hello-lazy 1 || true)
[ "$out" = "hello-c" ]
Expand Down

0 comments on commit 6d98d06

Please sign in to comment.