Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 #SubBanner "Rewriting Linker Scripts" | |
|
Lei Zhang
2015/06/04 22:43:45
Either uncomment or erase.
| |
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |