Initial push
[termux-packages] / termux.spec
diff --git a/termux.spec b/termux.spec
new file mode 100644 (file)
index 0000000..bcd2f1d
--- /dev/null
@@ -0,0 +1,10 @@
+# Android 5 requires position-independent executables, so we use the
+#   %{!S:X}     Substitutes X, if the -S switch is not given to GCC"
+# construct (see https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html for full reference)
+# to add -fPIE and -pie flags as appropriate.
+
+*cc1_options:
++ %{!fpie: %{!fPIE: %{!fpic: %{!fPIC: %{!fno-pic:-fPIE}}}}}
+
+*link:
++ %{!nopie: %{!static: %{!shared: %{!nostdlib: %{!nostartfiles: %{!fno-PIE: %{!fno-pie: -pie}}}}}}}