[Bug ada/87936] gnatlink fails with -pie
vries at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Nov 8 13:31:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87936
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> I suppose it works when using -fPIC/-pic?
Using -fPIC:
...
$ rm -f hello.ali hello.o hello ; gnatmake -fPIC hello.adb
gcc -c -fPIC hello.adb
gnatbind -x hello.ali
gnatlink hello.ali -fPIC
$ ./hello
Hello, world!
...
using -fpic:
...
$ rm -f hello.ali hello.o hello ; gnatmake -fpic hello.adb
gcc -c -fpic hello.adb
gnatbind -x hello.ali
gnatlink hello.ali -fpic
$ ./hello
Hello, world!
...
More information about the Gcc-bugs
mailing list