summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorVadim Zeitlin <vz-swig@zeitlins.org>2021-09-30 18:12:50 +0200
committerVadim Zeitlin <vz-swig@zeitlins.org>2021-09-30 18:18:21 +0200
commit6c2a4607f0d0b20875ae586a56821107b3b40340 (patch)
treebfd5bc64efcf505659e7471c6c5cf2c570ce0784 /.github
parent55dfa99e4926efaba8bbdb9bb9ea085b3f75114b (diff)
downloadswig-6c2a4607f0d0b20875ae586a56821107b3b40340.tar.gz
Use -fPIE for clang builds
Executables can't be produced without this option using clang available under Ubuntu 20.04, as linking fails with a lot of errors of the form /usr/bin/ld: Swig/wrapfunc.o: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml3
1 files changed, 3 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7db336f53..1403c149f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -83,6 +83,9 @@ jobs:
if test '${{ matrix.compiler }}' = 'clang'; then
CC="clang"
CXX="clang++"
+
+ CFLAGS="$CFLAGS -fPIE"
+ CXXFLAGS="$CXXFLAGS -fPIE"
elif test -n "$GCC"; then
CC="gcc-$GCC"
CXX="g++-$GCC"