Changes in tools/toolchain.sh [e6b4d2d:d231a54] in mainline
- File:
-
- 1 edited
-
tools/toolchain.sh (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tools/toolchain.sh
re6b4d2d rd231a54 31 31 BINUTILS_GDB_GIT="https://github.com/HelenOS/binutils-gdb.git" 32 32 33 BINUTILS_BRANCH="binutils-2_45-helenos" 34 BINUTILS_VERSION="2.45" 33 BINUTILS_BRANCH="binutils-2_43-helenos" 34 BINUTILS_VERSION="2.43" 35 36 GDB_BRANCH="gdb-13.2-helenos" 37 GDB_VERSION="13.2" 35 38 36 39 GCC_GIT="https://github.com/HelenOS/gcc.git" 37 GCC_BRANCH="1 5_2_0-helenos"38 GCC_VERSION="1 5.2"40 GCC_BRANCH="14_2_0-helenos" 41 GCC_VERSION="14.2" 39 42 40 43 BASEDIR="$PWD" … … 48 51 SYSTEM_INSTALL=false 49 52 53 BUILD_GDB=false 50 54 BUILD_BINUTILS=true 51 55 BUILD_GCC=true … … 68 72 echo 69 73 echo "Syntax:" 74 echo " $0 [--system-wide] [--with-gdb|--only-gdb] <platform>" 70 75 echo " $0 [--system-wide] --test-version [<platform>]" 71 76 echo … … 142 147 test_app_version "Binutils" "ld" "GNU ld (.*) \([.0-9]*\)" "$BINUTILS_VERSION" 143 148 test_app_version "GCC" "gcc" "gcc version \([.0-9]*\)" "$GCC_VERSION" 149 test_app_version "GDB" "gdb" "GNU gdb (.*)[[:space:]]\+\([.0-9]*\)" "$GDB_VERSION" 144 150 done 145 151 } … … 258 264 ( set -x ; sudo -k mkdir -p "${CROSS_PREFIX}" ) 259 265 else 260 ( set -x ; mkdir -p "${CROSS_PREFIX}" )266 mkdir -p "${CROSS_PREFIX}" 261 267 fi 262 268 … … 304 310 ./contrib/download_prerequisites 305 311 cd .. 312 fi 313 314 if $BUILD_GDB ; then 315 git clone --depth 1 -b "$GDB_BRANCH" "$BINUTILS_GDB_GIT" "gdb-$GDB_VERSION" 316 git -C "gdb-$GDB_VERSION" pull 306 317 fi 307 318 … … 365 376 --disable-nls \ 366 377 --disable-werror \ 367 -- disable-gold \378 --enable-gold \ 368 379 --enable-deterministic-archives \ 369 380 --disable-gdb \ … … 455 466 } 456 467 468 build_gdb() { 469 # This sets the TARGET variable 470 set_target_from_platform "$1" 471 472 WORKDIR="${BASEDIR}/${TARGET}" 473 GDBDIR="${WORKDIR}/gdb-${GDB_VERSION}" 474 475 echo ">>> Removing previous content" 476 cleanup_dir "${WORKDIR}" 477 mkdir -p "${WORKDIR}" 478 479 echo ">>> Processing GDB (${TARGET})" 480 mkdir -p "${GDBDIR}" 481 cd "${GDBDIR}" 482 check_error $? "Change directory failed." 483 484 change_title "GDB: configure (${TARGET})" 485 CFLAGS="-fcommon" "${BASEDIR}/downloads/gdb-${GDB_VERSION}/configure" \ 486 "--target=${TARGET}" \ 487 "--prefix=${CROSS_PREFIX}" \ 488 "--program-prefix=${TARGET}-" \ 489 --enable-werror=no 490 check_error $? "Error configuring GDB." 491 492 change_title "GDB: make (${TARGET})" 493 make all-gdb -j$JOBS 494 check_error $? "Error compiling GDB." 495 496 change_title "GDB: install (${TARGET})" 497 make install-gdb $DESTDIR_SPEC 498 check_error $? "Error installing GDB." 499 } 500 457 501 install_pkg() { 458 502 echo ">>> Moving to the destination directory." 459 503 if $SYSTEM_INSTALL ; then 460 504 ring_bell 461 ( set -x ; tar -C "${INSTALL_DIR}${CROSS_PREFIX}" -cpf - . | sudo -k tar -C "${CROSS_PREFIX}" -xpf -)505 ( set -x ; sudo -k cp -r -t "${CROSS_PREFIX}" "${INSTALL_DIR}${CROSS_PREFIX}/"* ) 462 506 else 463 ( set -x ; tar -C "${INSTALL_DIR}${CROSS_PREFIX}" -cpf - . | tar -C "${CROSS_PREFIX}" -xpf -)507 ( set -x ; cp -r -t "${CROSS_PREFIX}" "${INSTALL_DIR}${CROSS_PREFIX}/"* ) 464 508 fi 465 509 } … … 486 530 exit 487 531 ;; 532 --with-gdb) 533 BUILD_GDB=true 534 shift 535 ;; 536 --only-gdb) 537 BUILD_GDB=true 538 BUILD_BINUTILS=false 539 BUILD_GCC=false 540 shift 541 ;; 488 542 *) 489 543 show_usage … … 560 614 561 615 $RUNNER build_libgcc 616 fi 617 618 if $BUILD_GDB ; then 619 $RUNNER build_gdb 562 620 fi 563 621
Note:
See TracChangeset
for help on using the changeset viewer.
