Skip to content

Commit 7459b33

Browse files
committed
build: use distro CFLAGS
Instead of using the default settings, use the ones used to build the Tumbleweed distro. This should also catch more bugs due to FORTIFY being enabled. Signed-off-by: Daniel Wagner <[email protected]>
1 parent e09fce3 commit 7459b33

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ jobs:
2525
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
2626
- name: build
2727
run: |
28+
if [ "${{ matrix.distro }}" = "tumbleweed" ]; then
29+
export CFLAGS="-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 \
30+
-fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables \
31+
-fstack-clash-protection -Werror=return-type -flto=auto -g"
32+
export CXXFLAGS="$CFLAGS"
33+
export LDFLAGS="-flto=auto"
34+
fi
2835
scripts/build.sh -b ${{ matrix.buildtype }} -c ${{ matrix.compiler }} -x
2936
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
3037
name: upload logs

0 commit comments

Comments
 (0)