https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117851

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
And it isn't just about --enable-default-pie, if I do with normally configured
gcc 14.2.1:
cat a.c; gcc -fopenmp -o a a.c -foffload-options=-march=gfx1103 -fpie -pie;
OMP_DEFAULT_DEVICE=1 ./a
#include <omp.h>

int
main ()
{
  #pragma omp target
  __builtin_printf ("Hello, world from %s!\n", omp_is_initial_device () ?
"host" : "offload device");
}
/usr/bin/ld: /tmp/ccZ7QktH.target.o: relocation R_X86_64_32 against `.rodata'
can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
bash: ./a: No such file or directory
while without -pie it works fine.

Reply via email to