From efa908dc255aea85fbce3604f648a984b212977e Mon Sep 17 00:00:00 2001 From: "Vicente J. Botet Escriba" Date: Sun, 23 Jan 2011 14:29:45 +0000 Subject: [PATCH] PGI add -fPIC when compiling with shared libs to try to solve this issue Link [2011-01-23 10:12:19 UTC]: fail "/sierra/Sntools/extras/compilers/pgi/linux86-64/10.1/bin/pgCC" -gopt -fpic --zc_eh -shared -o "/scratch/boost/results/boost/bin.v2/libs/system/build/pgi-10.1/debug/threading-multi/libboost_system.so" "/scratch/boost/results/boost/bin.v2/libs/system/build/pgi-10.1/debug/threading-multi/error_code.o" -Wl,-h -Wl,libboost_system.so -Bdynamic -lpthread -lrt -lrt -lrt -Bstatic -Bdynamic /usr/bin/ld: /scratch/boost/results/boost/bin.v2/libs/system/build/pgi-10.1/debug/threading-multi/error_code.o: relocation R_X86_64_PC32 against `__catch_clause_number' can not be used when making a shared object; recompile with -fPIC [SVN r68379] --- src/tools/pgi.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/pgi.jam b/src/tools/pgi.jam index a3f79f9a9..3a35c6447 100644 --- a/src/tools/pgi.jam +++ b/src/tools/pgi.jam @@ -97,7 +97,7 @@ flags pgi.link OPTIONS on : -gopt ; flags pgi.link OPTIONS off : -s ; flags pgi.link OPTIONS on : -xprofile=tcov ; flags pgi.link OPTIONS ; -flags pgi.link OPTIONS shared : -fpic ; +flags pgi.link OPTIONS shared : -fpic -fPIC ; flags pgi.link LINKPATH ; flags pgi.link FINDLIBS-ST ; flags pgi.link FINDLIBS-SA ;