Skip to content

Commit de5e4db

Browse files
authored
Fix Linux native flags for non-x86 CI builds (#42)
* Make Linux native flags architecture-safe in CI * Fix workflow matrix expressions for manual dispatch * Merge x86 flags into arch-specific workflow cflags
1 parent f659131 commit de5e4db

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/build-all-and-publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ jobs:
1717
name: Linux natives (${{ matrix.arch }})
1818
runs-on: ubuntu-latest
1919
env:
20-
NATIVE_BASE_CFLAGS: -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection
20+
NATIVE_BASE_CFLAGS: -O2 -fno-omit-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security
2121
NATIVE_XXHASH_EXTRA_CFLAGS: -fno-tree-vectorize
2222
strategy:
2323
fail-fast: false
2424
matrix:
2525
include:
2626
- arch: amd64
2727
cc: gcc
28-
arch_cflags: ""
28+
arch_cflags: "-mno-omit-leaf-frame-pointer -fcf-protection"
2929
ldflags: ""
3030
apt: ""
3131
- arch: i386
3232
cc: gcc
33-
arch_cflags: "-m32"
34-
ldflags: ""
33+
arch_cflags: "-mno-omit-leaf-frame-pointer -fcf-protection -m32"
34+
ldflags: "-m32"
3535
apt: "gcc-multilib libc6-dev-i386"
3636
- arch: aarch64
3737
cc: aarch64-linux-gnu-gcc
@@ -76,7 +76,7 @@ jobs:
7676
7777
- name: Build (mvn package)
7878
run: |
79-
./mvnw -B -V -DskipTests \
79+
./mvnw -B -V -DskipTests \
8080
-Darch.id=${{ matrix.arch }} \
8181
-Dnative.cc=${{ matrix.cc }} \
8282
"-Dnative.cflags=${{ env.NATIVE_BASE_CFLAGS }} ${{ matrix.arch_cflags }}" \

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@
389389
</os>
390390
</activation>
391391
<properties>
392-
<native.cflags>-O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection</native.cflags>
392+
<native.cflags>-O2 -fno-omit-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security</native.cflags>
393393
<native.xxhash.cflags>${native.cflags} -fno-tree-vectorize</native.xxhash.cflags>
394394
</properties>
395395
<build>

0 commit comments

Comments
 (0)