[Bug 192686] Segfaults using combinations of -pie -pthread -lm(|_p) when profiling

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 09 Feb 2022 01:59:29 UTC

Kubilay Kocak <koobs@FreeBSD.org> changed:

           What    |Removed                     |Added
           Severity|Affects Many People         |Affects Some People
             Status|New                         |Open
           See Also|                            |https://reviews.freebsd.org
                   |                            |/D25086
           Keywords|                            |needs-qa

--- Comment #2 from Kubilay Kocak <koobs@FreeBSD.org> ---
Hitting this with (some?) ports, in this case lang/php80:

14.0-CURRENT #0 main-n251899-fa255ab1b89-dirty /GENERIC-NODEBUG amd6

configure:4149: $? = 1
configure:4169: checking whether the C compiler works
configure:4191: cc -march=sandybridge -mtune=sandybridge -O2 -pipe  -fpie -fPIC
-flto=thin -fstack-protector-strong -fno-strict-aliasing  -I/usr/local/include
-D_FORTIFY_SOURCE=2  -Wl,--enable-new-dtags -Wl,-z,relro,-z,now -Wl,-pie,-z>
ld: error: cannot preempt symbol: _DYNAMIC
>>> referenced by crt1_c.c:59 (/usr/src/lib/csu/amd64/crt1_c.c:59)
>>>               /usr/lib/crt1.o:(_start)

ld: error: cannot preempt symbol: _DYNAMIC
>>> referenced by ignore_init.c:106 (/usr/src/lib/csu/common/ignore_init.c:106)
>>>               /usr/lib/crt1.o:(handle_static_init)

ld: error: relocation R_X86_64_32 cannot be used against local symbol;
recompile with -fPIC
>>> defined in /usr/lib/crt1.o
>>> referenced by ignore_init.c:109 (/usr/src/lib/csu/common/ignore_init.c:109)
>>>               /usr/lib/crt1.o:(handle_static_init)

Google found me this bug and review D25086

Is this the same issue as on i386 as reported here?

You are receiving this mail because:
You are the assignee for the bug.