xbps-src: pass PIE flags via -specs mechanism, avoids breaking static build.
This commit is contained in:
parent
494316a961
commit
ea96fc3cce
3 changed files with 11 additions and 2 deletions
2
common/environment/configure/gccspecs/hardened-cc1
Normal file
2
common/environment/configure/gccspecs/hardened-cc1
Normal file
|
@ -0,0 +1,2 @@
|
|||
*cc1_options:
|
||||
+ %{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}
|
5
common/environment/configure/gccspecs/hardened-ld
Normal file
5
common/environment/configure/gccspecs/hardened-ld
Normal file
|
@ -0,0 +1,5 @@
|
|||
*self_spec:
|
||||
+ %{static|Bstatic|shared|Bshareable|i|r|pie|nopie:;:-pie}
|
||||
|
||||
*link:
|
||||
+ %{!static:-z relro}
|
Loading…
Add table
Add a link
Reference in a new issue