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
This commit is contained in:
parent
55dfa99e49
commit
6c2a4607f0
1 changed files with 3 additions and 0 deletions
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue