https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71072
Bug ID: 71072 Summary: [6/7] gnat doesn't respect --enable-default-pie Product: gcc Version: 6.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: doko at gcc dot gnu.org Target Milestone: --- GCC 6 introduces the --enable-default-pie option, however it looks like gnat doesn't respect this option. Seen while running the examples/matrix test in gprbuild on x86_64-linux-gnu (gnatgcc here is just a symlink to the gcc driver matching the gnat version): make[1]: Entering directory '/tmp/adt-run.SU7baW/adttmp/examples/matrix' gprconfig --batch --config Ada --config C --config Fortran -o default.cgpr Creating configuration file: default.cgpr gprbuild using project file matrix.gpr gnatgcc -c -gnat05 main.adb gfortran -c multmat.f gcc -c initmat.c gprbind main.bexch gnatbind main.ali gnatgcc -c b__main.adb ar cr libmatrix.a ... ranlib libmatrix.a gfortran main.o -o main /usr/bin/ld: main.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC main.o: error adding symbols: Bad value Makefile:2: recipe for target 'all' failed make[1]: Leaving directory '/tmp/adt-run.SU7baW/adttmp/examples/matrix' Makefile:5: recipe for target 'all' failed collect2: error: ld returned 1 exit status gprbuild: link of main.adb failed make[1]: *** [all] Error 4