Fixes the creation of DT_TEXTREL entries in binaries built with PIE
enabled:
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
This matches the changes made in libaom:
1df26009da aom_configure: only override CONFIG_PIC if not set on cmd line
7235e65746 aom_configure.cmake: detect PIE and set CONFIG_PIC
Change-Id: I0a43e964af2d8eb8c5e7811ce14ad39285eec3a8
;;
esac
- # PIC is probably what we want when building shared libs
+ # Position independent code (PIC) is probably what we want when building
+ # shared libs or position independent executable (PIE) targets.
enabled shared && soft_enable pic
+ check_cpp << EOF || soft_enable pic
+#if !(__pie__ || __PIE__)
+#error Neither __pie__ or __PIE__ are set
+#endif
+EOF
# Minimum iOS version for all target platforms (darwin and iphonesimulator).
# Shared library framework builds are only possible on iOS 8 and later.