mirror of
https://github.com/richfelker/musl-cross-make.git
synced 2025-08-14 12:23:24 +02:00
update all static pie patches to ensure -static reached the linker
on some targets, the logic for the compiler option -static seems not to be processed when -pie is present. rather than playing whack-a-mole, just ensure LD_PIE_SPEC specs always pass -static to ld if either -static or -static-pie is present on the compiler driver command line. this may produce redundant -static arguments but it doesn't matter.
This commit is contained in:
parent
2398261280
commit
4be756d35c
@ -80,7 +80,7 @@ index e6887590ae2..df6e3965f13 100644
|
||||
#ifdef HAVE_LD_PIE
|
||||
#ifndef LD_PIE_SPEC
|
||||
-#define LD_PIE_SPEC "-pie"
|
||||
+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic}"
|
||||
+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic -static}"
|
||||
#endif
|
||||
#else
|
||||
#define LD_PIE_SPEC ""
|
||||
|
@ -80,7 +80,7 @@ index 3c81c5798d8..cd96eac5d12 100644
|
||||
#ifdef HAVE_LD_PIE
|
||||
#ifndef LD_PIE_SPEC
|
||||
-#define LD_PIE_SPEC "-pie"
|
||||
+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic}"
|
||||
+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic -static}"
|
||||
#endif
|
||||
#else
|
||||
#define LD_PIE_SPEC ""
|
||||
|
@ -80,7 +80,7 @@ index 3c81c5798d8..cd96eac5d12 100644
|
||||
#ifdef HAVE_LD_PIE
|
||||
#ifndef LD_PIE_SPEC
|
||||
-#define LD_PIE_SPEC "-pie"
|
||||
+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic}"
|
||||
+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic -static}"
|
||||
#endif
|
||||
#else
|
||||
#define LD_PIE_SPEC ""
|
||||
|
@ -80,7 +80,7 @@ index 3c81c5798d8..cd96eac5d12 100644
|
||||
#ifdef HAVE_LD_PIE
|
||||
#ifndef LD_PIE_SPEC
|
||||
-#define LD_PIE_SPEC "-pie"
|
||||
+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic}"
|
||||
+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic -static}"
|
||||
#endif
|
||||
#else
|
||||
#define LD_PIE_SPEC ""
|
||||
|
@ -80,7 +80,7 @@ index 3c81c5798d8..cd96eac5d12 100644
|
||||
#ifdef HAVE_LD_PIE
|
||||
#ifndef LD_PIE_SPEC
|
||||
-#define LD_PIE_SPEC "-pie"
|
||||
+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic}"
|
||||
+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic -static}"
|
||||
#endif
|
||||
#else
|
||||
#define LD_PIE_SPEC ""
|
||||
|
@ -80,7 +80,7 @@ index 3c81c5798d8..cd96eac5d12 100644
|
||||
#ifdef HAVE_LD_PIE
|
||||
#ifndef LD_PIE_SPEC
|
||||
-#define LD_PIE_SPEC "-pie"
|
||||
+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic}"
|
||||
+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic -static}"
|
||||
#endif
|
||||
#else
|
||||
#define LD_PIE_SPEC ""
|
||||
|
@ -80,7 +80,7 @@ index 3c81c5798d8..cd96eac5d12 100644
|
||||
#ifdef HAVE_LD_PIE
|
||||
#ifndef LD_PIE_SPEC
|
||||
-#define LD_PIE_SPEC "-pie"
|
||||
+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic}"
|
||||
+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic -static}"
|
||||
#endif
|
||||
#else
|
||||
#define LD_PIE_SPEC ""
|
||||
|
@ -80,7 +80,7 @@ index 3c81c5798d8..cd96eac5d12 100644
|
||||
#ifdef HAVE_LD_PIE
|
||||
#ifndef LD_PIE_SPEC
|
||||
-#define LD_PIE_SPEC "-pie"
|
||||
+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic}"
|
||||
+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic -static}"
|
||||
#endif
|
||||
#else
|
||||
#define LD_PIE_SPEC ""
|
||||
|
@ -34,7 +34,7 @@ index 0576ea7..0a280e0 100644
|
||||
#ifdef HAVE_LD_PIE
|
||||
#ifndef LD_PIE_SPEC
|
||||
-#define LD_PIE_SPEC "-pie"
|
||||
+#define LD_PIE_SPEC "-pie %{static:--no-dynamic-linker -Bsymbolic}"
|
||||
+#define LD_PIE_SPEC "-pie %{static:--no-dynamic-linker -Bsymbolic -static}"
|
||||
#endif
|
||||
#else
|
||||
#define LD_PIE_SPEC ""
|
||||
|
@ -53,7 +53,7 @@ index 91eb0534722..74a390e6005 100644
|
||||
#ifdef HAVE_LD_PIE
|
||||
#ifndef LD_PIE_SPEC
|
||||
-#define LD_PIE_SPEC "-pie"
|
||||
+#define LD_PIE_SPEC "-pie %{static:--no-dynamic-linker -Bsymbolic}"
|
||||
+#define LD_PIE_SPEC "-pie %{static:--no-dynamic-linker -Bsymbolic -static}"
|
||||
#endif
|
||||
#else
|
||||
#define LD_PIE_SPEC ""
|
||||
|
@ -105,7 +105,7 @@ index eb1610ba8b0..87560afb03c 100644
|
||||
#ifdef HAVE_LD_PIE
|
||||
#ifndef LD_PIE_SPEC
|
||||
-#define LD_PIE_SPEC "-pie"
|
||||
+#define LD_PIE_SPEC "-pie %{static-pie:-static} %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic}"
|
||||
+#define LD_PIE_SPEC "-pie %{static-pie:-static} %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic -static}"
|
||||
#endif
|
||||
#else
|
||||
#define LD_PIE_SPEC ""
|
||||
|
@ -74,7 +74,7 @@ index d185c01b257..5d3f81c5fc5 100644
|
||||
#ifdef HAVE_LD_PIE
|
||||
#ifndef LD_PIE_SPEC
|
||||
-#define LD_PIE_SPEC "-pie"
|
||||
+#define LD_PIE_SPEC "-pie %{static-pie:-static} %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic}"
|
||||
+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic -static}"
|
||||
#endif
|
||||
#else
|
||||
#define LD_PIE_SPEC ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user