https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70150
Xi Ruoyao <xry111 at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xry111 at gcc dot gnu.org --- Comment #29 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- (In reply to Allan McRae from comment #25) > Created attachment 52287 [details] > Fix testsuite issues with --enable-default-pie > > The following failure are seen in gcc-11.2 when building with > --enable-default-pie: > > FAIL: gcc.target/i386/cet-sjlj-6a.c scan-assembler-times movq\\t.*buf\\\\+8 1 > FAIL: gcc.target/i386/cet-sjlj-6a.c scan-assembler-times subq\\tbuf\\\\+8 1 > FAIL: gcc.target/i386/cet-sjlj-6b.c scan-assembler-times movq\\t.*buf\\\\+16 > 1 > FAIL: gcc.target/i386/cet-sjlj-6b.c scan-assembler-times subq\\tbuf\\\\+16 1 > FAIL: gcc.target/i386/fentryname3.c scan-assembler 0x0f, 0x1f, 0x44, 0x00, > 0x00 > FAIL: gcc.target/i386/pr24414.c (test for excess errors) > FAIL: gcc.target/i386/pr93492-3.c scan-assembler > \\t.cfi_startproc\\n\\tendbr(32|64)\\n.*.LPFE1:\\n\\tnop\\n1: > \\tcall\\t__fentry__\\n\\tret\\n > FAIL: gcc.target/i386/pr93492-5.c scan-assembler > \\t.cfi_startproc\\n.*.LPFE1:\\n\\tnop\\n1:\\tcall\\t__fentry__\\n\\tret\\n > FAIL: gcc.target/i386/pr98482-1.c scan-assembler movabsq\\t\\\\\$__fentry__, > %r10\\n\\tcall\\t\\\\*%r10 > > Adding -no-pie to dg-options only fixed pr24414.c. For the rest I added a > "{ target { ! pie_enabled } }" to the failing tests, which may or may not be > the proper solution... You may want -fno-PIE. -fno-PIE (with "f") affects code generation, but "-no-pie" simply tells the linker not to link the executable as a PIE.