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 # DIST_UPDATES=trusty-updates # optional | 10 # DIST_UPDATES=trusty-updates # optional |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 # Rewrite linker scripts | 286 # Rewrite linker scripts |
287 sed -i -e 's|/usr/lib/x86_64-linux-gnu/||g' ${lscripts} | 287 sed -i -e 's|/usr/lib/x86_64-linux-gnu/||g' ${lscripts} |
288 sed -i -e 's|/lib/x86_64-linux-gnu/||g' ${lscripts} | 288 sed -i -e 's|/lib/x86_64-linux-gnu/||g' ${lscripts} |
289 | 289 |
290 # This is for chrome's ./build/linux/pkg-config-wrapper | 290 # This is for chrome's ./build/linux/pkg-config-wrapper |
291 # which overwrites PKG_CONFIG_LIBDIR internally | 291 # which overwrites PKG_CONFIG_LIBDIR internally |
292 SubBanner "Move pkgconfig scripts" | 292 SubBanner "Move pkgconfig scripts" |
293 mkdir -p ${INSTALL_ROOT}/usr/lib/pkgconfig | 293 mkdir -p ${INSTALL_ROOT}/usr/lib/pkgconfig |
294 mv ${INSTALL_ROOT}/usr/lib/x86_64-linux-gnu/pkgconfig/* \ | 294 mv ${INSTALL_ROOT}/usr/lib/x86_64-linux-gnu/pkgconfig/* \ |
295 ${INSTALL_ROOT}/usr/lib/pkgconfig | 295 ${INSTALL_ROOT}/usr/lib/pkgconfig |
296 | |
297 SubBanner "Adding an additional ld.conf include" | |
298 LD_SO_HACK_CONF="${INSTALL_ROOT}/etc/ld.so.conf.d/zz_hack.conf" | |
299 echo /usr/lib/gcc/x86_64-linux-gnu/4.6 > "$LD_SO_HACK_CONF" | |
300 echo /usr/lib >> "$LD_SO_HACK_CONF" | |
301 } | 296 } |
302 | 297 |
303 | 298 |
304 HacksAndPatchesI386() { | 299 HacksAndPatchesI386() { |
305 Banner "Misc Hacks & Patches" | 300 Banner "Misc Hacks & Patches" |
306 # these are linker scripts with absolute pathnames in them | 301 # these are linker scripts with absolute pathnames in them |
307 # which we rewrite here | 302 # which we rewrite here |
308 lscripts="${INSTALL_ROOT}/usr/lib/i386-linux-gnu/libpthread.so \ | 303 lscripts="${INSTALL_ROOT}/usr/lib/i386-linux-gnu/libpthread.so \ |
309 ${INSTALL_ROOT}/usr/lib/i386-linux-gnu/libc.so" | 304 ${INSTALL_ROOT}/usr/lib/i386-linux-gnu/libc.so" |
310 | 305 |
311 # Rewrite linker scripts | 306 # Rewrite linker scripts |
312 sed -i -e 's|/usr/lib/i386-linux-gnu/||g' ${lscripts} | 307 sed -i -e 's|/usr/lib/i386-linux-gnu/||g' ${lscripts} |
313 sed -i -e 's|/lib/i386-linux-gnu/||g' ${lscripts} | 308 sed -i -e 's|/lib/i386-linux-gnu/||g' ${lscripts} |
314 | 309 |
315 # This is for chrome's ./build/linux/pkg-config-wrapper | 310 # This is for chrome's ./build/linux/pkg-config-wrapper |
316 # which overwrites PKG_CONFIG_LIBDIR internally | 311 # which overwrites PKG_CONFIG_LIBDIR internally |
317 SubBanner "Move pkgconfig scripts" | 312 SubBanner "Move pkgconfig scripts" |
318 mkdir -p ${INSTALL_ROOT}/usr/lib/pkgconfig | 313 mkdir -p ${INSTALL_ROOT}/usr/lib/pkgconfig |
319 mv ${INSTALL_ROOT}/usr/lib/i386-linux-gnu/pkgconfig/* \ | 314 mv ${INSTALL_ROOT}/usr/lib/i386-linux-gnu/pkgconfig/* \ |
320 ${INSTALL_ROOT}/usr/lib/pkgconfig | 315 ${INSTALL_ROOT}/usr/lib/pkgconfig |
321 | |
322 SubBanner "Adding an additional ld.conf include" | |
323 LD_SO_HACK_CONF="${INSTALL_ROOT}/etc/ld.so.conf.d/zz_hack.conf" | |
324 echo /usr/lib/gcc/i486-linux-gnu/4.6 > "$LD_SO_HACK_CONF" | |
325 echo /usr/lib >> "$LD_SO_HACK_CONF" | |
326 } | 316 } |
327 | 317 |
328 | 318 |
329 HacksAndPatchesARM() { | 319 HacksAndPatchesARM() { |
330 Banner "Misc Hacks & Patches" | 320 Banner "Misc Hacks & Patches" |
331 # these are linker scripts with absolute pathnames in them | 321 # these are linker scripts with absolute pathnames in them |
332 # which we rewrite here | 322 # which we rewrite here |
333 lscripts="${INSTALL_ROOT}/usr/lib/arm-linux-gnueabihf/libpthread.so \ | 323 lscripts="${INSTALL_ROOT}/usr/lib/arm-linux-gnueabihf/libpthread.so \ |
334 ${INSTALL_ROOT}/usr/lib/arm-linux-gnueabihf/libc.so" | 324 ${INSTALL_ROOT}/usr/lib/arm-linux-gnueabihf/libc.so" |
335 | 325 |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 echo " $0 help" | 872 echo " $0 help" |
883 exit 1 | 873 exit 1 |
884 else | 874 else |
885 ChangeDirectory | 875 ChangeDirectory |
886 if echo $1 | grep -qs --regexp='\(^Print\)\|\(All$\)'; then | 876 if echo $1 | grep -qs --regexp='\(^Print\)\|\(All$\)'; then |
887 "$@" | 877 "$@" |
888 else | 878 else |
889 RunCommand "$@" | 879 RunCommand "$@" |
890 fi | 880 fi |
891 fi | 881 fi |
OLD | NEW |