diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/build/binutils/binutils.sh | 46 | ||||
-rw-r--r-- | scripts/build/debug/300-gdb.sh | 38 |
2 files changed, 37 insertions, 47 deletions
diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh index 05df34a..4a27e22 100644 --- a/scripts/build/binutils/binutils.sh +++ b/scripts/build/binutils/binutils.sh @@ -131,24 +131,22 @@ do_binutils_backend() { CT_DoLog EXTRA "Configuring binutils" - if [ "${CT_BINUTILS_HAS_GOLD}" = "y" ]; then - case "${CT_BINUTILS_LINKERS_LIST}" in - ld) - extra_config+=( --enable-ld=yes --enable-gold=no ) - ;; - gold) - extra_config+=( --enable-ld=no --enable-gold=yes ) - ;; - ld,gold) - extra_config+=( --enable-ld=default --enable-gold=yes ) - ;; - gold,ld) - extra_config+=( --enable-ld=yes --enable-gold=default ) - ;; - esac - if [ "${CT_BINUTILS_GOLD_THREADS}" = "y" ]; then - extra_config+=( --enable-threads ) - fi + case "${CT_BINUTILS_LINKERS_LIST}" in + ld) + extra_config+=( --enable-ld=yes --enable-gold=no ) + ;; + gold) + extra_config+=( --enable-ld=no --enable-gold=yes ) + ;; + ld,gold) + extra_config+=( --enable-ld=default --enable-gold=yes ) + ;; + gold,ld) + extra_config+=( --enable-ld=yes --enable-gold=default ) + ;; + esac + if [ "${CT_BINUTILS_GOLD_THREADS}" = "y" ]; then + extra_config+=( --enable-threads ) fi if [ "${CT_BINUTILS_PLUGINS}" = "y" ]; then extra_config+=( --enable-plugins ) @@ -161,10 +159,8 @@ do_binutils_backend() { if [ "${CT_BINUTILS_DETERMINISTIC_ARCHIVES}" = "y" ]; then extra_config+=( --enable-deterministic-archives ) fi - if [ "${CT_BINUTILS_HAS_PKGVERSION_BUGURL}" = "y" ]; then - [ -n "${CT_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_PKGVERSION}") - [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}") - fi + [ -n "${CT_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_PKGVERSION}") + [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}") if [ "${CT_MULTILIB}" = "y" ]; then extra_config+=("--enable-multilib") else @@ -325,10 +321,8 @@ do_binutils_for_target() { CT_DoLog EXTRA "Configuring binutils for target" - if [ "${CT_BINUTILS_HAS_PKGVERSION_BUGURL}" = "y" ]; then - [ -n "${CT_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_PKGVERSION}") - [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}") - fi + [ -n "${CT_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_PKGVERSION}") + [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}") if [ "${CT_MULTILIB}" = "y" ]; then extra_config+=("--enable-multilib") else diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index 85f03eb..4afaba4 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -85,23 +85,21 @@ do_debug_gdb_build() CT_DoExecLog ALL make install-{pdf,html}-gdb fi - if [ "${CT_GDB_INSTALL_GDBINIT}" = "y" ]; then - CT_DoLog EXTRA "Installing '.gdbinit' template" - # See in scripts/build/internals.sh for why we do this - # TBD GCC 3.x and older not supported - if [ -f "${CT_SRC_DIR}/gcc/gcc/BASE-VER" ]; then - gcc_version=$(cat "${CT_SRC_DIR}/gcc/gcc/BASE-VER") - else - gcc_version=$(sed -r -e '/version_string/!d; s/^.+= "([^"]+)".*$/\1/;' \ - "${CT_SRC_DIR}/gcc/gcc/version.c" \ - ) - fi - sed -r \ - -e "s:@@PREFIX@@:${CT_PREFIX_DIR}:;" \ - -e "s:@@VERSION@@:${gcc_version}:;" \ - "${CT_LIB_DIR}/scripts/build/debug/gdbinit.in" \ - >"${CT_PREFIX_DIR}/share/gdb/gdbinit" - fi # Install gdbinit sample + CT_DoLog EXTRA "Installing '.gdbinit' template" + # See in scripts/build/internals.sh for why we do this + # TBD GCC 3.x and older not supported + if [ -f "${CT_SRC_DIR}/gcc/gcc/BASE-VER" ]; then + gcc_version=$(cat "${CT_SRC_DIR}/gcc/gcc/BASE-VER") + else + gcc_version=$(sed -r -e '/version_string/!d; s/^.+= "([^"]+)".*$/\1/;' \ + "${CT_SRC_DIR}/gcc/gcc/version.c" \ + ) + fi + sed -r \ + -e "s:@@PREFIX@@:${CT_PREFIX_DIR}:;" \ + -e "s:@@VERSION@@:${gcc_version}:;" \ + "${CT_LIB_DIR}/scripts/build/debug/gdbinit.in" \ + >"${CT_PREFIX_DIR}/share/gdb/gdbinit" CT_Popd CT_EndStep @@ -271,10 +269,8 @@ do_gdb_backend() CT_DoExecLog ALL cp gdb/proc_service.h gdb/gdbserver/proc_service.h fi - if [ "${CT_GDB_HAS_PKGVERSION_BUGURL}" = "y" ]; then - [ -n "${CT_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_PKGVERSION}") - [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}") - fi + [ -n "${CT_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_PKGVERSION}") + [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}") # Disable binutils options when building from the binutils-gdb repo. extra_config+=("--disable-binutils") |