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

Side by Side Diff: tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh

Issue 281953004: [MIPS] Switch to newer versions of the tools (Closed) Base URL: http://git.chromium.org/native_client/src/native_client.git@master
Patch Set: Created 6 years, 7 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 | « no previous file | 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 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 # 5 #
6 #@ This script creates the mips trusted SDK. 6 #@ This script creates the mips trusted SDK.
7 #@ It must be run from the native_client directory. 7 #@ It must be run from the native_client directory.
8 8
9 # This script is intended to build a mipsel-linux-gnu cross compilation 9 # This script is intended to build a mipsel-linux-gnu cross compilation
10 # toolchain that runs on x86 linux and generates code for a little-endian, 10 # toolchain that runs on x86 linux and generates code for a little-endian,
11 # hard-float, mips32 target. 11 # hard-float, mips32 target.
12 12
13 ###################################################################### 13 ######################################################################
14 # Config 14 # Config
15 ###################################################################### 15 ######################################################################
16 16
17 set -o nounset 17 set -o nounset
18 set -o errexit 18 set -o errexit
19 19
20 readonly SCRIPT_DIR=$(dirname $0) 20 readonly SCRIPT_DIR=$(dirname $0)
21 21
22 readonly MAKE_OPTS="-j8" 22 readonly MAKE_OPTS="-j8"
23 readonly ARCH="mips32" 23 readonly ARCH="mips32"
24 24
25 readonly GMP_URL="http://ftp.gnu.org/gnu/gmp/gmp-4.3.2.tar.bz2" 25 readonly GMP_URL="http://ftp.gnu.org/gnu/gmp/gmp-5.1.3.tar.bz2"
26 readonly GMP_SHA1SUM="c011e8feaf1bb89158bd55eaabd7ef8fdd101a2c" 26 readonly GMP_SHA1SUM="b35928e2927b272711fdfbf71b7cfd5f86a6b165"
27 27
28 readonly MPFR_URL="http://ftp.gnu.org/gnu/mpfr/mpfr-2.4.2.tar.bz2" 28 readonly MPFR_URL="http://ftp.gnu.org/gnu/mpfr/mpfr-3.1.2.tar.bz2"
29 readonly MPFR_SHA1SUM="7ca93006e38ae6e53a995af836173cf10ee7c18c" 29 readonly MPFR_SHA1SUM="46d5a11a59a4e31f74f73dd70c5d57a59de2d0b4"
30 30
31 readonly MPC_URL="http://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz" 31 readonly MPC_URL="http://ftp.gnu.org/gnu/mpc/mpc-1.0.2.tar.gz"
32 readonly MPC_SHA1SUM="8c7e19ad0dd9b3b5cc652273403423d6cf0c5edf" 32 readonly MPC_SHA1SUM="5072d82ab50ec36cc8c0e320b5c377adb48abe70"
33 33
34 readonly GCC_URL="http://ftp.gnu.org/gnu/gcc/gcc-4.7.2/gcc-4.7.2.tar.bz2" 34 readonly GCC_URL="http://ftp.gnu.org/gnu/gcc/gcc-4.9.0/gcc-4.9.0.tar.bz2"
35 readonly GCC_SHA1SUM="a464ba0f26eef24c29bcd1e7489421117fb9ee35" 35 readonly GCC_SHA1SUM="fbde8eb49f2b9e6961a870887cf7337d31cd4917"
36 36
37 readonly BINUTILS_URL="http://ftp.gnu.org/gnu/binutils/binutils-2.22.tar.bz2" 37 readonly BINUTILS_URL="http://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.bz2"
38 readonly BINUTILS_SHA1SUM="65b304a0b9a53a686ce50a01173d1f40f8efe404" 38 readonly BINUTILS_SHA1SUM="7ac75404ddb3c4910c7594b51ddfc76d4693debb"
39 39
40 readonly KERNEL_URL="http://www.linux-mips.org/pub/linux/mips/kernel/v2.6/linux- 2.6.38.4.tar.gz" 40 readonly KERNEL_URL="http://www.linux-mips.org/pub/linux/mips/kernel/v3.x/linux- 3.14.2.tar.gz"
41 readonly KERNEL_SHA1SUM="377fa5cf5f1d0c396759b1c4d147330e7e5b6d7f" 41 readonly KERNEL_SHA1SUM="9b094e817a7a9b7c09b5bc268e23de642c6c407a"
42 42
43 readonly GDB_URL="http://ftp.gnu.org/gnu/gdb/gdb-7.5.tar.bz2" 43 readonly GDB_URL="http://ftp.gnu.org/gnu/gdb/gdb-7.7.1.tar.bz2"
44 readonly GDB_SHA1SUM="79b61152813e5730fa670c89e5fc3c04b670b02c" 44 readonly GDB_SHA1SUM="35228319f7c715074a80be42fff64c7645227a80"
45 45
46 readonly EGLIBC_SVN_URL="svn://svn.eglibc.org/branches/eglibc-2_14" 46 readonly EGLIBC_SVN_URL="svn://svn.eglibc.org/branches/eglibc-2_19"
47 readonly EGLIBC_REVISION="20996" 47 readonly EGLIBC_REVISION="25243"
48 48
49 readonly DOWNLOAD_QEMU_URL="http://wiki.qemu-project.org/download/qemu-2.0.0.tar .bz2" 49 readonly DOWNLOAD_QEMU_URL="http://wiki.qemu-project.org/download/qemu-2.0.0.tar .bz2"
50 50
51 readonly INSTALL_ROOT=$(pwd)/toolchain/linux_x86/mips_trusted 51 readonly INSTALL_ROOT=$(pwd)/toolchain/linux_x86/mips_trusted
52 52
53 readonly TMP=$(pwd)/toolchain/tmp/crosstool-trusted 53 readonly TMP=$(pwd)/toolchain/tmp/crosstool-trusted
54 54
55 readonly BUILD_DIR=${TMP}/build 55 readonly BUILD_DIR=${TMP}/build
56 56
57 readonly JAIL_MIPS32=${INSTALL_ROOT}/sysroot 57 readonly JAIL_MIPS32=${INSTALL_ROOT}/sysroot
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 DownloadOrCopyAndVerify ${KERNEL_URL} ${KERNEL_SHA1SUM} 255 DownloadOrCopyAndVerify ${KERNEL_URL} ${KERNEL_SHA1SUM}
256 SubBanner "extracting from ${tarball}" 256 SubBanner "extracting from ${tarball}"
257 tar zxf ${tarball} -C ${TMP} 257 tar zxf ${tarball} -C ${TMP}
258 258
259 local eglibc_dir="${TMP}/${EGLIBC_SVN_URL##*/}" 259 local eglibc_dir="${TMP}/${EGLIBC_SVN_URL##*/}"
260 CheckoutOrCopy ${EGLIBC_SVN_URL} ${EGLIBC_REVISION} 260 CheckoutOrCopy ${EGLIBC_SVN_URL} ${EGLIBC_REVISION}
261 261
262 262
263 Banner "Preparing the code" 263 Banner "Preparing the code"
264 264
265 if [ ! -d "${TMP}/eglibc-2_14/libc/ports" ]; then 265 if [ ! -d "${TMP}/eglibc-2_19/libc/ports" ]; then
266 ln -s ${TMP}/eglibc-2_14/ports ${TMP}/eglibc-2_14/libc/ports 266 ln -s ${TMP}/eglibc-2_19/ports ${TMP}/eglibc-2_19/libc/ports
267 fi 267 fi
268 268
269 # Fix a minor syntax issue in tc-mips.c. 269 # Fix a minor syntax issue in tc-mips.c.
270 local OLD_TEXT="as_warn_where (fragp->fr_file, fragp->fr_line, msg);" 270 local OLD_TEXT="as_warn_where (fragp->fr_file, fragp->fr_line, msg);"
271 local NEW_TEXT="as_warn_where (fragp->fr_file, fragp->fr_line, \"%s\", msg);" 271 local NEW_TEXT="as_warn_where (fragp->fr_file, fragp->fr_line, \"%s\", msg);"
272 local FILE_NAME="${TMP}/binutils-2.22/gas/config/tc-mips.c" 272 local FILE_NAME="${TMP}/binutils-2.24/gas/config/tc-mips.c"
273 sed -i "s/${OLD_TEXT}/${NEW_TEXT}/g" "${FILE_NAME}" 273 sed -i "s/${OLD_TEXT}/${NEW_TEXT}/g" "${FILE_NAME}"
274 274
275 export PATH=${INSTALL_ROOT}/bin:$PATH 275 export PATH=${INSTALL_ROOT}/bin:$PATH
276 276
277 277
278 Banner "Building binutils" 278 Banner "Building binutils"
279 279
280 rm -rf ${BUILD_DIR}/binutils/ 280 rm -rf ${BUILD_DIR}/binutils/
281 mkdir -p ${BUILD_DIR}/binutils/ 281 mkdir -p ${BUILD_DIR}/binutils/
282 pushd ${BUILD_DIR}/binutils/ 282 pushd ${BUILD_DIR}/binutils/
283 283
284 SubBanner "Configuring" 284 SubBanner "Configuring"
285 ${TMP}/binutils-2.22/configure \ 285 ${TMP}/binutils-2.24/configure \
286 --prefix=${INSTALL_ROOT} \ 286 --prefix=${INSTALL_ROOT} \
287 --target=mipsel-linux-gnu \ 287 --target=mipsel-linux-gnu \
288 --with-sysroot=${JAIL_MIPS32} 288 --with-sysroot=${JAIL_MIPS32}
289 289
290 SubBanner "Make" 290 SubBanner "Make"
291 make ${MAKE_OPTS} all-binutils all-gas all-ld 291 make ${MAKE_OPTS} all-binutils all-gas all-ld
292 292
293 SubBanner "Install" 293 SubBanner "Install"
294 make ${MAKE_OPTS} install-binutils install-gas install-ld 294 make ${MAKE_OPTS} install-binutils install-gas install-ld
295 295
296 popd 296 popd
297 297
298 298
299 Banner "Building GCC (initial)" 299 Banner "Building GCC (initial)"
300 300
301 rm -rf ${BUILD_DIR}/gcc/initial 301 rm -rf ${BUILD_DIR}/gcc/initial
302 mkdir -p ${BUILD_DIR}/gcc/initial 302 mkdir -p ${BUILD_DIR}/gcc/initial
303 pushd ${BUILD_DIR}/gcc/initial 303 pushd ${BUILD_DIR}/gcc/initial
304 304
305 SubBanner "Configuring" 305 SubBanner "Configuring"
306 ${TMP}/gcc-4.7.2/configure \ 306 ${TMP}/gcc-4.9.0/configure \
307 --prefix=${INSTALL_ROOT} \ 307 --prefix=${INSTALL_ROOT} \
308 --disable-libssp \ 308 --disable-libssp \
309 --disable-libgomp \ 309 --disable-libgomp \
310 --disable-libmudflap \ 310 --disable-libmudflap \
311 --disable-fixed-point \ 311 --disable-fixed-point \
312 --disable-decimal-float \ 312 --disable-decimal-float \
313 --with-mips-plt \ 313 --with-mips-plt \
314 --with-endian=little \ 314 --with-endian=little \
315 --with-arch=${ARCH} \ 315 --with-arch=${ARCH} \
316 --enable-languages=c \ 316 --enable-languages=c \
317 --with-newlib \ 317 --with-newlib \
318 --without-headers \ 318 --without-headers \
319 --disable-shared \ 319 --disable-shared \
320 --disable-threads \ 320 --disable-threads \
321 --disable-libquadmath \ 321 --disable-libquadmath \
322 --disable-libatomic \ 322 --disable-libatomic \
323 --target=mipsel-linux-gnu 323 --target=mipsel-linux-gnu
324 324
325 SubBanner "Make" 325 SubBanner "Make"
326 make ${MAKE_OPTS} all 326 make ${MAKE_OPTS} all
327 327
328 SubBanner "Install" 328 SubBanner "Install"
329 make ${MAKE_OPTS} install 329 make ${MAKE_OPTS} install
330 330
331 popd 331 popd
332 332
333 333
334 Banner "Installing Linux kernel headers" 334 Banner "Installing Linux kernel headers"
335 pushd ${TMP}/linux-2.6.38.4 335 pushd ${TMP}/linux-3.14.2
336 make headers_install ARCH=mips INSTALL_HDR_PATH=${JAIL_MIPS32}/usr 336 make headers_install ARCH=mips INSTALL_HDR_PATH=${JAIL_MIPS32}/usr
337 popd 337 popd
338 338
339 339
340 Banner "Building EGLIBC (initial)" 340 Banner "Building EGLIBC (initial)"
341 341
342 mkdir -p ${JAIL_MIPS32}/usr/lib 342 mkdir -p ${JAIL_MIPS32}/usr/lib
343 343
344 rm -rf ${BUILD_DIR}/eglibc/initial 344 rm -rf ${BUILD_DIR}/eglibc/initial
345 mkdir -p ${BUILD_DIR}/eglibc/initial 345 mkdir -p ${BUILD_DIR}/eglibc/initial
346 pushd ${BUILD_DIR}/eglibc/initial 346 pushd ${BUILD_DIR}/eglibc/initial
347 347
348 SubBanner "Configuring" 348 SubBanner "Configuring"
349 BUILD_CC=gcc \ 349 BUILD_CC=gcc \
350 AR=mipsel-linux-gnu-ar \ 350 AR=mipsel-linux-gnu-ar \
351 RANLIB=mipsel-linux-gnu-ranlib \ 351 RANLIB=mipsel-linux-gnu-ranlib \
352 CC=mipsel-linux-gnu-gcc \ 352 CC=mipsel-linux-gnu-gcc \
353 CXX=mipsel-linux-gnu-g++ \ 353 CXX=mipsel-linux-gnu-g++ \
354 ${TMP}/eglibc-2_14/libc/configure \ 354 ${TMP}/eglibc-2_19/libc/configure \
355 --prefix=/usr \ 355 --prefix=/usr \
356 --enable-add-ons \ 356 --enable-add-ons \
357 --build=i686-pc-linux-gnu \ 357 --build=i686-pc-linux-gnu \
358 --host=mipsel-linux-gnu \ 358 --host=mipsel-linux-gnu \
359 --disable-profile \ 359 --disable-profile \
360 --without-gd \ 360 --without-gd \
361 --without-cvs \ 361 --without-cvs \
362 --with-headers=${JAIL_MIPS32}/usr/include 362 --with-headers=${JAIL_MIPS32}/usr/include
363 363
364 SubBanner "Install" 364 SubBanner "Install"
(...skipping 12 matching lines...) Expand all
377 popd 377 popd
378 378
379 379
380 Banner "Building GCC (intermediate)" 380 Banner "Building GCC (intermediate)"
381 381
382 rm -rf ${BUILD_DIR}/gcc/intermediate 382 rm -rf ${BUILD_DIR}/gcc/intermediate
383 mkdir -p ${BUILD_DIR}/gcc/intermediate 383 mkdir -p ${BUILD_DIR}/gcc/intermediate
384 pushd ${BUILD_DIR}/gcc/intermediate 384 pushd ${BUILD_DIR}/gcc/intermediate
385 385
386 SubBanner "Configuring" 386 SubBanner "Configuring"
387 ${TMP}/gcc-4.7.2/configure \ 387 ${TMP}/gcc-4.9.0/configure \
388 --prefix=${INSTALL_ROOT} \ 388 --prefix=${INSTALL_ROOT} \
389 --disable-libssp \ 389 --disable-libssp \
390 --disable-libgomp \ 390 --disable-libgomp \
391 --disable-libmudflap \ 391 --disable-libmudflap \
392 --disable-fixed-point \ 392 --disable-fixed-point \
393 --disable-decimal-float \ 393 --disable-decimal-float \
394 --with-mips-plt \ 394 --with-mips-plt \
395 --with-endian=little \ 395 --with-endian=little \
396 --with-arch=${ARCH} \ 396 --with-arch=${ARCH} \
397 --target=mipsel-linux-gnu \ 397 --target=mipsel-linux-gnu \
(...skipping 15 matching lines...) Expand all
413 413
414 rm -rf ${BUILD_DIR}/eglibc/final 414 rm -rf ${BUILD_DIR}/eglibc/final
415 mkdir -p ${BUILD_DIR}/eglibc/final 415 mkdir -p ${BUILD_DIR}/eglibc/final
416 pushd ${BUILD_DIR}/eglibc/final 416 pushd ${BUILD_DIR}/eglibc/final
417 417
418 BUILD_CC=gcc \ 418 BUILD_CC=gcc \
419 AR=mipsel-linux-gnu-ar \ 419 AR=mipsel-linux-gnu-ar \
420 RANLIB=mipsel-linux-gnu-ranlibi \ 420 RANLIB=mipsel-linux-gnu-ranlibi \
421 CC=mipsel-linux-gnu-gcc \ 421 CC=mipsel-linux-gnu-gcc \
422 CXX=mipsel-linux-gnu-g++ \ 422 CXX=mipsel-linux-gnu-g++ \
423 ${TMP}/eglibc-2_14/libc/configure \ 423 ${TMP}/eglibc-2_19/libc/configure \
424 --prefix=/usr \ 424 --prefix=/usr \
425 --enable-add-ons \ 425 --enable-add-ons \
426 --host=mipsel-linux-gnu \ 426 --host=mipsel-linux-gnu \
427 --disable-profile \ 427 --disable-profile \
428 --without-gd \ 428 --without-gd \
429 --without-cvs \ 429 --without-cvs \
430 --build=i686-pc-linux-gnu \ 430 --build=i686-pc-linux-gnu \
431 --with-headers=${JAIL_MIPS32}/usr/include 431 --with-headers=${JAIL_MIPS32}/usr/include
432 432
433 SubBanner "Make" 433 SubBanner "Make"
434 make ${MAKE_OPTS} all 434 make ${MAKE_OPTS} all
435 435
436 SubBanner "Install" 436 SubBanner "Install"
437 make ${MAKE_OPTS} install install_root=${JAIL_MIPS32} 437 make ${MAKE_OPTS} install install_root=${JAIL_MIPS32}
438 438
439 popd 439 popd
440 440
441 441
442 Banner "Building GCC (final)" 442 Banner "Building GCC (final)"
443 443
444 rm -rf ${BUILD_DIR}/gcc/final 444 rm -rf ${BUILD_DIR}/gcc/final
445 mkdir -p ${BUILD_DIR}/gcc/final 445 mkdir -p ${BUILD_DIR}/gcc/final
446 pushd ${BUILD_DIR}/gcc/final 446 pushd ${BUILD_DIR}/gcc/final
447 447
448 ${TMP}/gcc-4.7.2/configure \ 448 ${TMP}/gcc-4.9.0/configure \
449 --prefix=${INSTALL_ROOT} \ 449 --prefix=${INSTALL_ROOT} \
450 --disable-libssp \ 450 --disable-libssp \
451 --disable-libgomp \ 451 --disable-libgomp \
452 --disable-libmudflap \ 452 --disable-libmudflap \
453 --disable-fixed-point \ 453 --disable-fixed-point \
454 --disable-decimal-float \ 454 --disable-decimal-float \
455 --with-mips-plt \ 455 --with-mips-plt \
456 --with-endian=little \ 456 --with-endian=little \
457 --with-arch=${ARCH} \ 457 --with-arch=${ARCH} \
458 --target=mipsel-linux-gnu \ 458 --target=mipsel-linux-gnu \
459 --enable-__cxa_atexit \ 459 --enable-__cxa_atexit \
460 --enable-languages=c,c++ \ 460 --enable-languages=c,c++ \
461 --with-sysroot=${JAIL_MIPS32} 461 --with-sysroot=${JAIL_MIPS32}
462 462
463 SubBanner "Make" 463 SubBanner "Make"
464 make ${MAKE_OPTS} all 464 make ${MAKE_OPTS} all
465 465
466 SubBanner "Install" 466 SubBanner "Install"
467 make ${MAKE_OPTS} install 467 make ${MAKE_OPTS} install
468 468
469 popd 469 popd
470 470
471 471
472 Banner "Building GDB" 472 Banner "Building GDB"
473 473
474 rm -rf ${BUILD_DIR}/gdb/ 474 rm -rf ${BUILD_DIR}/gdb/
475 mkdir -p ${BUILD_DIR}/gdb/ 475 mkdir -p ${BUILD_DIR}/gdb/
476 pushd ${BUILD_DIR}/gdb/ 476 pushd ${BUILD_DIR}/gdb/
477 477
478 ${TMP}/gdb-7.5/configure \ 478 ${TMP}/gdb-7.7.1/configure \
479 --prefix=${INSTALL_ROOT} \ 479 --prefix=${INSTALL_ROOT} \
480 --target=mipsel-linux-gnu 480 --target=mipsel-linux-gnu
481 481
482 SubBanner "Make" 482 SubBanner "Make"
483 make ${MAKE_OPTS} all-gdb 483 make ${MAKE_OPTS} all-gdb
484 484
485 SubBanner "Install" 485 SubBanner "Install"
486 make ${MAKE_OPTS} install-gdb 486 make ${MAKE_OPTS} install-gdb
487 487
488 popd 488 popd
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 mkdir -p pkgconfig 596 mkdir -p pkgconfig
597 mv mipsel-linux-gnu/pkgconfig/* pkgconfig/ 597 mv mipsel-linux-gnu/pkgconfig/* pkgconfig/
598 rm -rf mipsel-linux-gnu/pkgconfig 598 rm -rf mipsel-linux-gnu/pkgconfig
599 mv mipsel-linux-gnu/* . 599 mv mipsel-linux-gnu/* .
600 rm -rf mipsel-linux-gnu 600 rm -rf mipsel-linux-gnu
601 ln -s . mipsel-linux-gnu 601 ln -s . mipsel-linux-gnu
602 popd 602 popd
603 603
604 pushd ${JAIL_MIPS32}/usr/lib/ 604 pushd ${JAIL_MIPS32}/usr/lib/
605 rm -f libstdc++.so* 605 rm -f libstdc++.so*
606 ln -s ../../../mipsel-linux-gnu/lib/libstdc++.so.6.0.17 . 606 ln -s ../../../mipsel-linux-gnu/lib/libstdc++.so.6.0.20 .
607 ln -s libstdc++.so.6.0.17 libstdc++.so.6 607 ln -s libstdc++.so.6.0.20 libstdc++.so.6
608 ln -s libstdc++.so.6.0.17 libstdc++.so 608 ln -s libstdc++.so.6.0.20 libstdc++.so
609 609
610 rm -f libgcc_s.so* 610 rm -f libgcc_s.so*
611 ln -s ../../../mipsel-linux-gnu/lib/libgcc_s.so.1 . 611 ln -s ../../../mipsel-linux-gnu/lib/libgcc_s.so.1 .
612 ln -s libgcc_s.so.1 libgcc_s.so 612 ln -s libgcc_s.so.1 libgcc_s.so
613 popd 613 popd
614 } 614 }
615 615
616 FixLibs() { 616 FixLibs() {
617 Banner "Fixing libraries" 617 Banner "Fixing libraries"
618 618
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 FixIncludes 707 FixIncludes
708 CreateTarBall ${CROSS_TARBALL} 708 CreateTarBall ${CROSS_TARBALL}
709 fi 709 fi
710 710
711 else 711 else
712 Usage 712 Usage
713 exit -1 713 exit -1
714 714
715 fi 715 fi
716 716
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698