зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1360300 -- Support enabling PIE when using clang. r=froydnj
Also remove bits of a comment, now that we support only macOS 10.9+, most of the comment isn't relevant. While PIE is enabled by default on macOS, this isn't true of clang on Linux. --enable-pie can now be used with clang on Linux. r=froydnj MozReview-Commit-ID: rc6zJiWzLo --HG-- extra : rebase_source : 3745175e106ea8c6be9271d8135d43ba359434c7
This commit is contained in:
Родитель
dcce7ae769
Коммит
4cbcec2157
|
@ -251,11 +251,7 @@ if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$DEVELOPER_OPTIONS"; then
|
|||
fi
|
||||
|
||||
# bionic in Android < 4.1 doesn't support PIE
|
||||
# On OSX, the linker defaults to building PIE programs when targetting OSX 10.7+,
|
||||
# but not when targetting OSX < 10.7. OSX < 10.7 doesn't support running PIE
|
||||
# programs, so as long as support for OSX 10.6 is kept, we can't build PIE.
|
||||
# Even after dropping 10.6 support, MOZ_PIE would not be useful since it's the
|
||||
# default (and clang says the -pie option is not used).
|
||||
# On OSX, the linker defaults to building PIE programs when targeting OSX 10.7.
|
||||
# On other Unix systems, some file managers (Nautilus) can't start PIE programs
|
||||
if test -n "$gonkdir" && test "$ANDROID_VERSION" -ge 16; then
|
||||
MOZ_PIE=1
|
||||
|
@ -268,7 +264,7 @@ MOZ_ARG_ENABLE_BOOL(pie,
|
|||
MOZ_PIE=1,
|
||||
MOZ_PIE= )
|
||||
|
||||
if test "$GNU_CC" -a -n "$MOZ_PIE"; then
|
||||
if test "$GNU_CC$CLANG_CC" -a -n "$MOZ_PIE"; then
|
||||
AC_MSG_CHECKING([for PIE support])
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -pie"
|
||||
|
|
Загрузка…
Ссылка в новой задаче