musl-wiki icon indicating copy to clipboard operation
musl-wiki copied to clipboard

FAQ: add -static-pie information

Open nisbet-hubbard opened this issue 1 year ago • 3 comments

It’d be useful to mention this somewhere, though I’m not sure if FAQ is the best place for it.

nisbet-hubbard avatar Jul 02 '23 15:07 nisbet-hubbard

i doubt the author you mention is the original author, as mcm has static pie patches since 8 years: https://github.com/richfelker/musl-cross-make/blob/master/patches/gcc-4.2.1/0005-staticpie.diff this also makes it easy to answer how to get support for it: use mcm aka the official toolchain. however, it seems surprising that the specs file shipped with musl itself for musl-gcc comes without static-pie, are you certain ?

rofl0r avatar Jul 03 '23 10:07 rofl0r

Right, that’s the patch for gcc 4, and Felker was talking about getting it into upstream at the time: https://www.openwall.com/lists/musl/2015/06/01/12.

But gcc ended up getting -static-pie only in 2017: https://gcc.gnu.org/git/?p=gcc.git&a=commit;h=b4fed89078efeb11da212091421a9f4718f625cc.

Hoyer’s Fedora patch is for the wrapper, and yes it’s not in the spec file shipped with 1.2.4.

nisbet-hubbard avatar Jul 03 '23 12:07 nisbet-hubbard

alright, i guess it's best to summon @richfelker to hear his thoughts on the matter

rofl0r avatar Jul 03 '23 12:07 rofl0r