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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 # these are linker scripts with absolute pathnames in them | 254 # these are linker scripts with absolute pathnames in them |
255 # which we rewrite here | 255 # which we rewrite here |
256 lscripts="${INSTALL_ROOT}/usr/lib/x86_64-linux-gnu/libpthread.so \ | 256 lscripts="${INSTALL_ROOT}/usr/lib/x86_64-linux-gnu/libpthread.so \ |
257 ${INSTALL_ROOT}/usr/lib/x86_64-linux-gnu/libc.so" | 257 ${INSTALL_ROOT}/usr/lib/x86_64-linux-gnu/libc.so" |
258 | 258 |
259 # Rewrite linker scripts | 259 # Rewrite linker scripts |
260 sed -i -e 's|/usr/lib/x86_64-linux-gnu/||g' ${lscripts} | 260 sed -i -e 's|/usr/lib/x86_64-linux-gnu/||g' ${lscripts} |
261 sed -i -e 's|/lib/x86_64-linux-gnu/||g' ${lscripts} | 261 sed -i -e 's|/lib/x86_64-linux-gnu/||g' ${lscripts} |
262 | 262 |
263 # This is for chrome's ./build/linux/pkg-config-wrapper | 263 # This is for chrome's ./build/linux/pkg-config-wrapper |
264 # which overwrites PKG_CONFIG_PATH internally | 264 # which overwrites PKG_CONFIG_LIBDIR internally |
265 SubBanner "Move pkgconfig scripts" | 265 SubBanner "Move pkgconfig scripts" |
266 mv ${INSTALL_ROOT}/usr/lib/x86_64-linux-gnu/pkgconfig ${INSTALL_ROOT}/usr/lib/ | 266 mv ${INSTALL_ROOT}/usr/lib/x86_64-linux-gnu/pkgconfig ${INSTALL_ROOT}/usr/lib/ |
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 # Rewrite 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_LIBDIR internally |
288 SubBanner "Move pkgconfig scripts" | 288 SubBanner "Move pkgconfig scripts" |
289 mv ${INSTALL_ROOT}/usr/lib/i386-linux-gnu/pkgconfig ${INSTALL_ROOT}/usr/lib/ | 289 mv ${INSTALL_ROOT}/usr/lib/i386-linux-gnu/pkgconfig ${INSTALL_ROOT}/usr/lib/ |
290 | 290 |
291 SubBanner "Adding an additional ld.conf include" | 291 SubBanner "Adding an additional ld.conf include" |
292 LD_SO_HACK_CONF="${INSTALL_ROOT}/etc/ld.so.conf.d/zz_hack.conf" | 292 LD_SO_HACK_CONF="${INSTALL_ROOT}/etc/ld.so.conf.d/zz_hack.conf" |
293 echo /usr/lib/gcc/i486-linux-gnu/4.6 > "$LD_SO_HACK_CONF" | 293 echo /usr/lib/gcc/i486-linux-gnu/4.6 > "$LD_SO_HACK_CONF" |
294 echo /usr/lib >> "$LD_SO_HACK_CONF" | 294 echo /usr/lib >> "$LD_SO_HACK_CONF" |
295 } | 295 } |
296 | 296 |
297 | 297 |
298 HacksAndPatchesARM() { | 298 HacksAndPatchesARM() { |
299 Banner "Misc Hacks & Patches" | 299 Banner "Misc Hacks & Patches" |
300 # these are linker scripts with absolute pathnames in them | 300 # these are linker scripts with absolute pathnames in them |
301 # which we rewrite here | 301 # which we rewrite here |
302 lscripts="${INSTALL_ROOT}/usr/lib/arm-linux-gnueabihf/libpthread.so \ | 302 lscripts="${INSTALL_ROOT}/usr/lib/arm-linux-gnueabihf/libpthread.so \ |
303 ${INSTALL_ROOT}/usr/lib/arm-linux-gnueabihf/libc.so" | 303 ${INSTALL_ROOT}/usr/lib/arm-linux-gnueabihf/libc.so" |
304 | 304 |
305 # Rewrite linker scripts | 305 # Rewrite linker scripts |
306 sed -i -e 's|/usr/lib/arm-linux-gnueabihf/||g' ${lscripts} | 306 sed -i -e 's|/usr/lib/arm-linux-gnueabihf/||g' ${lscripts} |
307 sed -i -e 's|/lib/arm-linux-gnueabihf/||g' ${lscripts} | 307 sed -i -e 's|/lib/arm-linux-gnueabihf/||g' ${lscripts} |
308 | 308 |
309 # This is for chrome's ./build/linux/pkg-config-wrapper | 309 # This is for chrome's ./build/linux/pkg-config-wrapper |
310 # which overwrites PKG_CONFIG_PATH internally | 310 # which overwrites PKG_CONFIG_LIBDIR internally |
311 SubBanner "Move pkgconfig files" | 311 SubBanner "Move pkgconfig files" |
312 mv ${INSTALL_ROOT}/usr/lib/arm-linux-gnueabihf/pkgconfig \ | 312 mv ${INSTALL_ROOT}/usr/lib/arm-linux-gnueabihf/pkgconfig \ |
313 ${INSTALL_ROOT}/usr/lib/ | 313 ${INSTALL_ROOT}/usr/lib/ |
314 } | 314 } |
315 | 315 |
316 | 316 |
317 HacksAndPatchesMips() { | 317 HacksAndPatchesMips() { |
318 Banner "Misc Hacks & Patches" | 318 Banner "Misc Hacks & Patches" |
319 # these are linker scripts with absolute pathnames in them | 319 # these are linker scripts with absolute pathnames in them |
320 # which we rewrite here | 320 # which we rewrite here |
321 lscripts="${INSTALL_ROOT}/usr/lib/mipsel-linux-gnu/libpthread.so \ | 321 lscripts="${INSTALL_ROOT}/usr/lib/mipsel-linux-gnu/libpthread.so \ |
322 ${INSTALL_ROOT}/usr/lib/mipsel-linux-gnu/libc.so" | 322 ${INSTALL_ROOT}/usr/lib/mipsel-linux-gnu/libc.so" |
323 | 323 |
324 # Rewrite linker scripts | 324 # Rewrite linker scripts |
325 sed -i -e 's|/usr/lib/mipsel-linux-gnu/||g' ${lscripts} | 325 sed -i -e 's|/usr/lib/mipsel-linux-gnu/||g' ${lscripts} |
326 sed -i -e 's|/lib/mipsel-linux-gnu/||g' ${lscripts} | 326 sed -i -e 's|/lib/mipsel-linux-gnu/||g' ${lscripts} |
327 | 327 |
328 # This is for chrome's ./build/linux/pkg-config-wrapper | 328 # This is for chrome's ./build/linux/pkg-config-wrapper |
329 # which overwrites PKG_CONFIG_PATH internally | 329 # which overwrites PKG_CONFIG_LIBDIR internally |
330 SubBanner "Move pkgconfig files" | 330 SubBanner "Move pkgconfig files" |
331 mv ${INSTALL_ROOT}/usr/lib/mipsel-linux-gnu/pkgconfig \ | 331 mv ${INSTALL_ROOT}/usr/lib/mipsel-linux-gnu/pkgconfig \ |
332 ${INSTALL_ROOT}/usr/lib/ | 332 ${INSTALL_ROOT}/usr/lib/ |
333 } | 333 } |
334 | 334 |
335 | 335 |
336 InstallIntoSysroot() { | 336 InstallIntoSysroot() { |
337 Banner "Install Libs And Headers Into Jail" | 337 Banner "Install Libs And Headers Into Jail" |
338 | 338 |
339 mkdir -p ${BUILD_DIR}/debian-packages | 339 mkdir -p ${BUILD_DIR}/debian-packages |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 echo " $0 help" | 703 echo " $0 help" |
704 exit 1 | 704 exit 1 |
705 else | 705 else |
706 ChangeDirectory | 706 ChangeDirectory |
707 if echo $1 | grep -qs "All$"; then | 707 if echo $1 | grep -qs "All$"; then |
708 "$@" | 708 "$@" |
709 else | 709 else |
710 RunCommand "$@" | 710 RunCommand "$@" |
711 fi | 711 fi |
712 fi | 712 fi |
OLD | NEW |