Avoid retpolineplt with static linking
Statically linked binaries linked with -zretpolineplt crash at startup as lld produces a broken PLT. PR: 233336 Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
fd91f85934
commit
1460870880
@ -41,8 +41,11 @@ LDFLAGS+= -Wl,-znow
|
||||
.if ${MK_RETPOLINE} != "no"
|
||||
CFLAGS+= -mretpoline
|
||||
CXXFLAGS+= -mretpoline
|
||||
# retpolineplt is broken with static linking (PR 233336)
|
||||
.if !defined(NO_SHARED) || ${NO_SHARED} == "no" || ${NO_SHARED} == "NO"
|
||||
LDFLAGS+= -Wl,-zretpolineplt
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if defined(CRUNCH_CFLAGS)
|
||||
CFLAGS+=${CRUNCH_CFLAGS}
|
||||
|
Loading…
Reference in New Issue
Block a user