summaryrefslogtreecommitdiffstats
path: root/chrome/installer/linux
diff options
context:
space:
mode:
authorsbc <sbc@chromium.org>2015-06-04 17:07:04 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-05 00:07:53 +0000
commit33b96bf8e29a1528360188216474ea4f34eea276 (patch)
tree3204261bfbee8f9bf368d2edb32ca93a58549070 /chrome/installer/linux
parent805d66d5896517309ff5065382e6d1bf13273fe4 (diff)
downloadchromium_src-33b96bf8e29a1528360188216474ea4f34eea276.zip
chromium_src-33b96bf8e29a1528360188216474ea4f34eea276.tar.gz
chromium_src-33b96bf8e29a1528360188216474ea4f34eea276.tar.bz2
Add mips support to install-debian.wheezy.sysroot.py
Also, fix remaining issues with sysroot-creator.sh WRT mips. Not sure I missed those the first time. TEST=GYP_DEFINES=target_arch=mipsel gclient runhooks Review URL: https://codereview.chromium.org/1164073004 Cr-Commit-Position: refs/heads/master@{#332972}
Diffstat (limited to 'chrome/installer/linux')
-rwxr-xr-xchrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py25
-rw-r--r--chrome/installer/linux/sysroot_scripts/sysroot-creator.sh27
2 files changed, 42 insertions, 10 deletions
diff --git a/chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py b/chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py
index acb98bb..dfca9a6 100755
--- a/chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py
+++ b/chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py
@@ -29,19 +29,23 @@ SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
URL_PREFIX = 'http://storage.googleapis.com'
URL_PATH = 'chrome-linux-sysroot/toolchain'
REVISION_AMD64 = 'a2d45701cb21244b9514e420950ba6ba687fb655'
-REVISION_I386 = 'a2d45701cb21244b9514e420950ba6ba687fb655'
REVISION_ARM = 'a2d45701cb21244b9514e420950ba6ba687fb655'
+REVISION_I386 = 'a2d45701cb21244b9514e420950ba6ba687fb655'
+REVISION_MIPS = '7749d2957387abf225b6d45154c3ddad142148dc'
TARBALL_AMD64 = 'debian_wheezy_amd64_sysroot.tgz'
-TARBALL_I386 = 'debian_wheezy_i386_sysroot.tgz'
TARBALL_ARM = 'debian_wheezy_arm_sysroot.tgz'
+TARBALL_I386 = 'debian_wheezy_i386_sysroot.tgz'
+TARBALL_MIPS = 'debian_wheezy_mips_sysroot.tgz'
TARBALL_AMD64_SHA1SUM = '601216c0f980e798e7131635f3dd8171b3dcbcde'
-TARBALL_I386_SHA1SUM = '0090e5a4b56ab9ffb5d557da6a520195ab59b446'
TARBALL_ARM_SHA1SUM = '6289593b36616526562a4d85ae9c92b694b8ce7e'
+TARBALL_I386_SHA1SUM = '0090e5a4b56ab9ffb5d557da6a520195ab59b446'
+TARBALL_MIPS_SHA1SUM = '3b4d782a237db4aac185a638572a7747c1a21825'
SYSROOT_DIR_AMD64 = 'debian_wheezy_amd64-sysroot'
-SYSROOT_DIR_I386 = 'debian_wheezy_i386-sysroot'
SYSROOT_DIR_ARM = 'debian_wheezy_arm-sysroot'
+SYSROOT_DIR_I386 = 'debian_wheezy_i386-sysroot'
+SYSROOT_DIR_MIPS = 'debian_wheezy_mips-sysroot'
-valid_archs = ('arm', 'i386', 'amd64')
+valid_archs = ('arm', 'i386', 'amd64', 'mips')
def GetSha1(filename):
@@ -66,6 +70,8 @@ def DetectArch(gyp_defines):
return 'i386'
elif 'target_arch=arm' in gyp_defines:
return 'arm'
+ elif 'target_arch=mipsel' in gyp_defines:
+ return 'mips'
# Figure out host arch using build/detect_host_arch.py and
# set target_arch to host arch
@@ -81,6 +87,8 @@ def DetectArch(gyp_defines):
return 'i386'
elif detected_host_arch == 'arm':
return 'arm'
+ elif detected_host_arch == 'mips':
+ return 'mips'
else:
print "Unknown host arch: %s" % detected_host_arch
@@ -101,7 +109,7 @@ def main():
print 'Unable to detect host architecture'
return 1
- if options.running_as_hook and target_arch != 'arm':
+ if options.running_as_hook and target_arch != 'arm' and target_arch != 'mips':
# When run from runhooks, only install the sysroot for an Official Chrome
# Linux build, except on ARM where we always use a sysroot.
skip_if_defined = ['branding=Chrome', 'buildtype=Official']
@@ -132,6 +140,11 @@ def main():
tarball_filename = TARBALL_I386
tarball_sha1sum = TARBALL_I386_SHA1SUM
revision = REVISION_I386
+ elif target_arch == 'mips':
+ sysroot = os.path.join(linux_dir, SYSROOT_DIR_MIPS)
+ tarball_filename = TARBALL_MIPS
+ tarball_sha1sum = TARBALL_MIPS_SHA1SUM
+ revision = REVISION_MIPS
else:
print 'Unknown architecture: %s' % target_arch
assert(False)
diff --git a/chrome/installer/linux/sysroot_scripts/sysroot-creator.sh b/chrome/installer/linux/sysroot_scripts/sysroot-creator.sh
index 1fef249..822a5e8 100644
--- a/chrome/installer/linux/sysroot_scripts/sysroot-creator.sh
+++ b/chrome/installer/linux/sysroot_scripts/sysroot-creator.sh
@@ -255,7 +255,7 @@ HacksAndPatchesAmd64() {
lscripts="${INSTALL_ROOT}/usr/lib/x86_64-linux-gnu/libpthread.so \
${INSTALL_ROOT}/usr/lib/x86_64-linux-gnu/libc.so"
- #SubBanner "Rewriting Linker Scripts"
+ # Rewrite linker scripts
sed -i -e 's|/usr/lib/x86_64-linux-gnu/||g' ${lscripts}
sed -i -e 's|/lib/x86_64-linux-gnu/||g' ${lscripts}
@@ -279,7 +279,7 @@ HacksAndPatchesI386() {
lscripts="${INSTALL_ROOT}/usr/lib/i386-linux-gnu/libpthread.so \
${INSTALL_ROOT}/usr/lib/i386-linux-gnu/libc.so"
- #SubBanner "Rewriting Linker Scripts"
+ # Rewrite linker scripts
sed -i -e 's|/usr/lib/i386-linux-gnu/||g' ${lscripts}
sed -i -e 's|/lib/i386-linux-gnu/||g' ${lscripts}
@@ -303,7 +303,7 @@ HacksAndPatchesARM() {
lscripts="${INSTALL_ROOT}/usr/lib/arm-linux-gnueabihf/libpthread.so \
${INSTALL_ROOT}/usr/lib/arm-linux-gnueabihf/libc.so"
- #SubBanner "Rewriting Linker Scripts"
+ # Rewrite linker scripts
sed -i -e 's|/usr/lib/arm-linux-gnueabihf/||g' ${lscripts}
sed -i -e 's|/lib/arm-linux-gnueabihf/||g' ${lscripts}
@@ -315,6 +315,25 @@ HacksAndPatchesARM() {
}
+HacksAndPatchesMips() {
+ Banner "Misc Hacks & Patches"
+ # these are linker scripts with absolute pathnames in them
+ # which we rewrite here
+ lscripts="${INSTALL_ROOT}/usr/lib/mipsel-linux-gnu/libpthread.so \
+ ${INSTALL_ROOT}/usr/lib/mipsel-linux-gnu/libc.so"
+
+ # Rewrite linker scripts
+ sed -i -e 's|/usr/lib/mipsel-linux-gnu/||g' ${lscripts}
+ sed -i -e 's|/lib/mipsel-linux-gnu/||g' ${lscripts}
+
+ # This is for chrome's ./build/linux/pkg-config-wrapper
+ # which overwrites PKG_CONFIG_PATH internally
+ SubBanner "Package Configs Symlink"
+ mkdir -p ${INSTALL_ROOT}/usr/share
+ ln -s ../lib/mipsel-linux-gnu/pkgconfig ${INSTALL_ROOT}/usr/share/pkgconfig
+}
+
+
InstallIntoSysroot() {
Banner "Install Libs And Headers Into Jail"
@@ -363,7 +382,7 @@ CleanupJailSymlinks() {
case "${link}" in
usr/lib/gcc/x86_64-linux-gnu/4.*/* | usr/lib/gcc/i486-linux-gnu/4.*/* | \
usr/lib/gcc/arm-linux-gnueabihf/4.*/* | \
- usr/lib/gcc/misel-linux-gnu/4.*/*)
+ usr/lib/gcc/mipsel-linux-gnu/4.*/*)
# Relativize the symlink.
ln -snfv "../../../../..${target}" "${link}"
;;