Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: chrome/installer/linux/sysroot_scripts/sysroot-creator.sh

Issue 1164073004: Add mips support to install-debian.wheezy.sysroot.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 # 4 #
5 # This script should not be run directly but sourced by the other 5 # This script should not be run directly but sourced by the other
6 # scripts (e.g. sysroot-creator-trusty.sh). Its up to the parent scripts 6 # scripts (e.g. sysroot-creator-trusty.sh). Its up to the parent scripts
7 # to define certain environment variables: e.g. 7 # to define certain environment variables: e.g.
8 # DISTRO=ubuntu 8 # DISTRO=ubuntu
9 # DIST=trusty 9 # DIST=trusty
10 # APT_REPO=http://archive.ubuntu.com/ubuntu 10 # APT_REPO=http://archive.ubuntu.com/ubuntu
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 # 248 #
249 ###################################################################### 249 ######################################################################
250 250
251 HacksAndPatchesAmd64() { 251 HacksAndPatchesAmd64() {
252 Banner "Misc Hacks & Patches" 252 Banner "Misc Hacks & Patches"
253 # these are linker scripts with absolute pathnames in them 253 # these are linker scripts with absolute pathnames in them
254 # which we rewrite here 254 # which we rewrite here
255 lscripts="${INSTALL_ROOT}/usr/lib/x86_64-linux-gnu/libpthread.so \ 255 lscripts="${INSTALL_ROOT}/usr/lib/x86_64-linux-gnu/libpthread.so \
256 ${INSTALL_ROOT}/usr/lib/x86_64-linux-gnu/libc.so" 256 ${INSTALL_ROOT}/usr/lib/x86_64-linux-gnu/libc.so"
257 257
258 #SubBanner "Rewriting Linker Scripts" 258 # Rewrite linker scripts
259 sed -i -e 's|/usr/lib/x86_64-linux-gnu/||g' ${lscripts} 259 sed -i -e 's|/usr/lib/x86_64-linux-gnu/||g' ${lscripts}
260 sed -i -e 's|/lib/x86_64-linux-gnu/||g' ${lscripts} 260 sed -i -e 's|/lib/x86_64-linux-gnu/||g' ${lscripts}
261 261
262 # This is for chrome's ./build/linux/pkg-config-wrapper 262 # This is for chrome's ./build/linux/pkg-config-wrapper
263 # which overwrites PKG_CONFIG_PATH internally 263 # which overwrites PKG_CONFIG_PATH internally
264 SubBanner "Package Configs Symlink" 264 SubBanner "Package Configs Symlink"
265 mkdir -p ${INSTALL_ROOT}/usr/share 265 mkdir -p ${INSTALL_ROOT}/usr/share
266 ln -s ../lib/x86_64-linux-gnu/pkgconfig ${INSTALL_ROOT}/usr/share/pkgconfig 266 ln -s ../lib/x86_64-linux-gnu/pkgconfig ${INSTALL_ROOT}/usr/share/pkgconfig
267 267
268 SubBanner "Adding an additional ld.conf include" 268 SubBanner "Adding an additional ld.conf include"
269 LD_SO_HACK_CONF="${INSTALL_ROOT}/etc/ld.so.conf.d/zz_hack.conf" 269 LD_SO_HACK_CONF="${INSTALL_ROOT}/etc/ld.so.conf.d/zz_hack.conf"
270 echo /usr/lib/gcc/x86_64-linux-gnu/4.6 > "$LD_SO_HACK_CONF" 270 echo /usr/lib/gcc/x86_64-linux-gnu/4.6 > "$LD_SO_HACK_CONF"
271 echo /usr/lib >> "$LD_SO_HACK_CONF" 271 echo /usr/lib >> "$LD_SO_HACK_CONF"
272 } 272 }
273 273
274 274
275 HacksAndPatchesI386() { 275 HacksAndPatchesI386() {
276 Banner "Misc Hacks & Patches" 276 Banner "Misc Hacks & Patches"
277 # these are linker scripts with absolute pathnames in them 277 # these are linker scripts with absolute pathnames in them
278 # which we rewrite here 278 # which we rewrite here
279 lscripts="${INSTALL_ROOT}/usr/lib/i386-linux-gnu/libpthread.so \ 279 lscripts="${INSTALL_ROOT}/usr/lib/i386-linux-gnu/libpthread.so \
280 ${INSTALL_ROOT}/usr/lib/i386-linux-gnu/libc.so" 280 ${INSTALL_ROOT}/usr/lib/i386-linux-gnu/libc.so"
281 281
282 #SubBanner "Rewriting Linker Scripts" 282 # Rewrite linker scripts
283 sed -i -e 's|/usr/lib/i386-linux-gnu/||g' ${lscripts} 283 sed -i -e 's|/usr/lib/i386-linux-gnu/||g' ${lscripts}
284 sed -i -e 's|/lib/i386-linux-gnu/||g' ${lscripts} 284 sed -i -e 's|/lib/i386-linux-gnu/||g' ${lscripts}
285 285
286 # This is for chrome's ./build/linux/pkg-config-wrapper 286 # This is for chrome's ./build/linux/pkg-config-wrapper
287 # which overwrites PKG_CONFIG_PATH internally 287 # which overwrites PKG_CONFIG_PATH internally
288 SubBanner "Package Configs Symlink" 288 SubBanner "Package Configs Symlink"
289 mkdir -p ${INSTALL_ROOT}/usr/share 289 mkdir -p ${INSTALL_ROOT}/usr/share
290 ln -s ../lib/i386-linux-gnu/pkgconfig ${INSTALL_ROOT}/usr/share/pkgconfig 290 ln -s ../lib/i386-linux-gnu/pkgconfig ${INSTALL_ROOT}/usr/share/pkgconfig
291 291
292 SubBanner "Adding an additional ld.conf include" 292 SubBanner "Adding an additional ld.conf include"
293 LD_SO_HACK_CONF="${INSTALL_ROOT}/etc/ld.so.conf.d/zz_hack.conf" 293 LD_SO_HACK_CONF="${INSTALL_ROOT}/etc/ld.so.conf.d/zz_hack.conf"
294 echo /usr/lib/gcc/i486-linux-gnu/4.6 > "$LD_SO_HACK_CONF" 294 echo /usr/lib/gcc/i486-linux-gnu/4.6 > "$LD_SO_HACK_CONF"
295 echo /usr/lib >> "$LD_SO_HACK_CONF" 295 echo /usr/lib >> "$LD_SO_HACK_CONF"
296 } 296 }
297 297
298 298
299 HacksAndPatchesARM() { 299 HacksAndPatchesARM() {
300 Banner "Misc Hacks & Patches" 300 Banner "Misc Hacks & Patches"
301 # these are linker scripts with absolute pathnames in them 301 # these are linker scripts with absolute pathnames in them
302 # which we rewrite here 302 # which we rewrite here
303 lscripts="${INSTALL_ROOT}/usr/lib/arm-linux-gnueabihf/libpthread.so \ 303 lscripts="${INSTALL_ROOT}/usr/lib/arm-linux-gnueabihf/libpthread.so \
304 ${INSTALL_ROOT}/usr/lib/arm-linux-gnueabihf/libc.so" 304 ${INSTALL_ROOT}/usr/lib/arm-linux-gnueabihf/libc.so"
305 305
306 #SubBanner "Rewriting Linker Scripts" 306 # Rewrite linker scripts
307 sed -i -e 's|/usr/lib/arm-linux-gnueabihf/||g' ${lscripts} 307 sed -i -e 's|/usr/lib/arm-linux-gnueabihf/||g' ${lscripts}
308 sed -i -e 's|/lib/arm-linux-gnueabihf/||g' ${lscripts} 308 sed -i -e 's|/lib/arm-linux-gnueabihf/||g' ${lscripts}
309 309
310 # This is for chrome's ./build/linux/pkg-config-wrapper 310 # This is for chrome's ./build/linux/pkg-config-wrapper
311 # which overwrites PKG_CONFIG_PATH internally 311 # which overwrites PKG_CONFIG_PATH internally
312 SubBanner "Package Configs Symlink" 312 SubBanner "Package Configs Symlink"
313 mkdir -p ${INSTALL_ROOT}/usr/share 313 mkdir -p ${INSTALL_ROOT}/usr/share
314 ln -s ../lib/arm-linux-gnueabihf/pkgconfig ${INSTALL_ROOT}/usr/share/pkgconfig 314 ln -s ../lib/arm-linux-gnueabihf/pkgconfig ${INSTALL_ROOT}/usr/share/pkgconfig
315 } 315 }
316 316
317 317
318 HacksAndPatchesMips() {
319 Banner "Misc Hacks & Patches"
320 # these are linker scripts with absolute pathnames in them
321 # which we rewrite here
322 lscripts="${INSTALL_ROOT}/usr/lib/mipsel-linux-gnu/libpthread.so \
323 ${INSTALL_ROOT}/usr/lib/mipsel-linux-gnu/libc.so"
324
325 # Rewrite linker scripts
326 sed -i -e 's|/usr/lib/mipsel-linux-gnu/||g' ${lscripts}
327 sed -i -e 's|/lib/mipsel-linux-gnu/||g' ${lscripts}
328
329 # This is for chrome's ./build/linux/pkg-config-wrapper
330 # which overwrites PKG_CONFIG_PATH internally
331 SubBanner "Package Configs Symlink"
332 mkdir -p ${INSTALL_ROOT}/usr/share
333 ln -s ../lib/mipsel-linux-gnu/pkgconfig ${INSTALL_ROOT}/usr/share/pkgconfig
334 }
335
336
318 InstallIntoSysroot() { 337 InstallIntoSysroot() {
319 Banner "Install Libs And Headers Into Jail" 338 Banner "Install Libs And Headers Into Jail"
320 339
321 mkdir -p ${BUILD_DIR}/debian-packages 340 mkdir -p ${BUILD_DIR}/debian-packages
322 mkdir -p ${INSTALL_ROOT} 341 mkdir -p ${INSTALL_ROOT}
323 while (( "$#" )); do 342 while (( "$#" )); do
324 local file="$1" 343 local file="$1"
325 local package="${BUILD_DIR}/debian-packages/${file##*/}" 344 local package="${BUILD_DIR}/debian-packages/${file##*/}"
326 shift 345 shift
327 local sha256sum="$1" 346 local sha256sum="$1"
(...skipping 28 matching lines...) Expand all
356 if [ "${ARCH}" != "MIPS" ]; then 375 if [ "${ARCH}" != "MIPS" ]; then
357 libdirs+=" lib64" 376 libdirs+=" lib64"
358 fi 377 fi
359 find $libdirs -type l -printf '%p %l\n' | while read link target; do 378 find $libdirs -type l -printf '%p %l\n' | while read link target; do
360 # skip links with non-absolute paths 379 # skip links with non-absolute paths
361 echo "${target}" | grep -qs ^/ || continue 380 echo "${target}" | grep -qs ^/ || continue
362 echo "${link}: ${target}" 381 echo "${link}: ${target}"
363 case "${link}" in 382 case "${link}" in
364 usr/lib/gcc/x86_64-linux-gnu/4.*/* | usr/lib/gcc/i486-linux-gnu/4.*/* | \ 383 usr/lib/gcc/x86_64-linux-gnu/4.*/* | usr/lib/gcc/i486-linux-gnu/4.*/* | \
365 usr/lib/gcc/arm-linux-gnueabihf/4.*/* | \ 384 usr/lib/gcc/arm-linux-gnueabihf/4.*/* | \
366 usr/lib/gcc/misel-linux-gnu/4.*/*) 385 usr/lib/gcc/mipsel-linux-gnu/4.*/*)
367 # Relativize the symlink. 386 # Relativize the symlink.
368 ln -snfv "../../../../..${target}" "${link}" 387 ln -snfv "../../../../..${target}" "${link}"
369 ;; 388 ;;
370 usr/lib/x86_64-linux-gnu/* | usr/lib/i386-linux-gnu/* | \ 389 usr/lib/x86_64-linux-gnu/* | usr/lib/i386-linux-gnu/* | \
371 usr/lib/arm-linux-gnueabihf/* | usr/lib/mipsel-linux-gnu/* ) 390 usr/lib/arm-linux-gnueabihf/* | usr/lib/mipsel-linux-gnu/* )
372 # Relativize the symlink. 391 # Relativize the symlink.
373 ln -snfv "../../..${target}" "${link}" 392 ln -snfv "../../..${target}" "${link}"
374 ;; 393 ;;
375 usr/lib/*) 394 usr/lib/*)
376 # Relativize the symlink. 395 # Relativize the symlink.
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 echo " $0 help" 691 echo " $0 help"
673 exit 1 692 exit 1
674 else 693 else
675 ChangeDirectory 694 ChangeDirectory
676 if echo $1 | grep -qs "All$"; then 695 if echo $1 | grep -qs "All$"; then
677 "$@" 696 "$@"
678 else 697 else
679 RunCommand "$@" 698 RunCommand "$@"
680 fi 699 fi
681 fi 700 fi
OLDNEW
« no previous file with comments | « chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698