Skip to content

Commit

Permalink
CI: Pass -O2 for annocheck
Browse files Browse the repository at this point in the history
Because `optflags` is pasted into the invocation line after `CC`, we were
building with -O1 unintentionally. You can see this in the configuration
summary: https://github.com/ruby/ruby/actions/runs/3933391169/jobs/6727044423#step:9:753

The check actually fails with -O2. To make it pass, upstream suggest
that we use the annocheck GCC plugin. Since it requires building from
source as the debian package for it isn't ready yet, punt on it for now
and use `--skip-gaps`.

Co-authored-by: Jun Aruga <jaruga@redhat.com>
  • Loading branch information
2 people authored and hsbt committed May 8, 2024
1 parent 8029ee4 commit a10a0d0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/compilers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,13 @@ jobs:
container: gcc-11
env:
# Minimal flags to pass the check.
default_cc: 'gcc-11 -O2 -fcf-protection -Wa,--generate-missing-build-notes=yes'
default_cc: 'gcc-11 -fcf-protection -Wa,--generate-missing-build-notes=yes'
optflags: '-O2'
LDFLAGS: '-Wl,-z,now'
# FIXME: Drop skipping options
# https://bugs.ruby-lang.org/issues/18061
# https://sourceware.org/annobin/annobin.html/Test-pie.html
TEST_ANNOCHECK_OPTS: "--skip-pie"
TEST_ANNOCHECK_OPTS: "--skip-pie --skip-gaps"
check: true
- { name: clang-16, env: { default_cc: clang-16 } }
- { name: clang-15, env: { default_cc: clang-15 } }
Expand Down

0 comments on commit a10a0d0

Please sign in to comment.