Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit bb2afff

Browse files
committed
Bug 1425381 - Always enable PIE on Android now that we support only >= 4.1. r=froydnj
--HG-- extra : rebase_source : c73d77ab1274b2dd54a3785a6d77c6e8dcb69f87
1 parent f1c9a5d commit bb2afff

8 files changed

Lines changed: 8 additions & 34 deletions

File tree

build/autoconf/compiler-opts.m4

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,14 @@ if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$DEVELOPER_OPTIONS"; then
198198
fi
199199
fi
200200
201-
# bionic in Android < 4.1 doesn't support PIE
202201
# On OSX, the linker defaults to building PIE programs when targeting OSX 10.7.
203202
# On other Unix systems, some file managers (Nautilus) can't start PIE programs
204-
MOZ_PIE=
203+
if test "$OS_TARGET" = Android; then
204+
# bionic in Android >= 4.1 supports PIE, and we target those versions.
205+
MOZ_PIE=1
206+
else
207+
MOZ_PIE=
208+
fi
205209
206210
MOZ_ARG_ENABLE_BOOL(pie,
207211
[ --enable-pie Enable Position Independent Executables],

ipc/app/moz.build

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,11 @@
44
# License, v. 2.0. If a copy of the MPL was not distributed with this
55
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
66

7-
# Any changes that affect Android need to be made in pie/moz.build as well.
8-
97
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
108
Program(CONFIG['MOZ_CHILD_PROCESS_NAME'])
119
SOURCES += [
1210
'MozillaRuntimeMainAndroid.cpp',
1311
]
14-
15-
DIRS += ['pie']
1612
else:
1713
GeckoProgram(CONFIG['MOZ_CHILD_PROCESS_NAME'], linkage='dependent')
1814

ipc/app/pie/moz.build

Lines changed: 0 additions & 19 deletions
This file was deleted.

ipc/glue/moz.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ include('/ipc/chromium/chromium-config.mozbuild')
219219

220220
FINAL_LIBRARY = 'xul'
221221

222-
for var in ('MOZ_CHILD_PROCESS_NAME', 'MOZ_CHILD_PROCESS_NAME_PIE',
223-
'MOZ_CHILD_PROCESS_BUNDLE', 'DLL_PREFIX', 'DLL_SUFFIX'):
222+
for var in ('MOZ_CHILD_PROCESS_NAME', 'MOZ_CHILD_PROCESS_BUNDLE',
223+
'DLL_PREFIX', 'DLL_SUFFIX'):
224224
DEFINES[var] = '"%s"' % CONFIG[var]
225225

226226
if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT':

js/xpconnect/shell/moz.build

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ if CONFIG['OS_ARCH'] == 'WINNT':
5050
'xul.dll',
5151
]
5252

53-
if CONFIG['OS_TARGET'] == 'Android':
54-
LDFLAGS += ['-pie']
55-
5653
CFLAGS += CONFIG['TK_CFLAGS']
5754
CXXFLAGS += CONFIG['TK_CFLAGS']
5855
OS_LIBS += CONFIG['TK_LIBS']

mobile/android/installer/Makefile.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ DEFINES += \
2727
-DPREF_DIR=$(PREF_DIR) \
2828
-DJAREXT= \
2929
-DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME) \
30-
-DMOZ_CHILD_PROCESS_NAME_PIE=$(MOZ_CHILD_PROCESS_NAME_PIE) \
3130
-DANDROID_CPU_ARCH=$(ANDROID_CPU_ARCH) \
3231
$(NULL)
3332

mobile/android/installer/package-manifest.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
@BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@
7575
# This should be MOZ_CHILD_PROCESS_NAME, but that has a "lib/" prefix.
7676
@BINPATH@/@MOZ_CHILD_PROCESS_NAME@
77-
@BINPATH@/@MOZ_CHILD_PROCESS_NAME_PIE@
7877

7978
#ifdef MOZ_ANDROID_GOOGLE_VR
8079
@BINPATH@/@DLL_PREFIX@gvr@DLL_SUFFIX@

old-configure.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4431,8 +4431,6 @@ else
44314431
# because the unpacked file will be under the lib/ subdirectory and will
44324432
# need to be executed from that path.
44334433
MOZ_CHILD_PROCESS_NAME="libplugin-container.so"
4434-
MOZ_CHILD_PROCESS_NAME_PIE="libplugin-container-pie.so"
4435-
AC_SUBST(MOZ_CHILD_PROCESS_NAME_PIE)
44364434
fi
44374435
MOZ_CHILD_PROCESS_BUNDLE="plugin-container.app/Contents/MacOS/"
44384436
MOZ_CHILD_PROCESS_BUNDLENAME="${MOZ_APP_DISPLAYNAME}CP"

0 commit comments

Comments
 (0)