This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/70150] -fno-pic no longer works with --enable-default-pie


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

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to H.J. Lu from comment #1)
> When GCC is configured with --enable-default-pie, -fno-pic doesn't
> turn off PIC:
> 
> [hjl@gnu-6 gcc]$ ./xgcc -B./ -S x.c -fno-pic
> x.c:2:3: error: #error foo
>  # error foo
>    ^~~~~
> [hjl@gnu-6 gcc]$

It isn't a bug since PIC is off by default, but PIE is on by default,
which also defines __PIC__, with --enable-default-pie.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]