diff options
author | Ray Donnelly <mingw.android@gmail.com> | 2015-05-29 21:40:52 +0100 |
---|---|---|
committer | Ray Donnelly <mingw.android@gmail.com> | 2015-06-02 00:01:31 +0100 |
commit | afbd17874a802b0903e47f0923ef520200c2baf6 (patch) | |
tree | c142054f30c5c5249dc8eda8af937ff424a47ca8 /scripts | |
parent | 9cdbc7b1998c24b501af9b6a9c6730cc716fb220 (diff) | |
download | crosstool-ng-afbd17874a802b0903e47f0923ef520200c2baf6.tar.gz crosstool-ng-afbd17874a802b0903e47f0923ef520200c2baf6.tar.bz2 crosstool-ng-afbd17874a802b0903e47f0923ef520200c2baf6.zip |
scripts: Update crosstool-NG internals for multiple compilers.
This change updates the CC.* references to CC_GCC.* in the internal
scripts.
Signed-off-by: Ray Donnelly <mingw.android@gmail.com>
Reviewed-by: Bryan Hundven <bryanhundven@gmail.com>
Reviewed-by: Yann Diorcet <diorcetyann@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/build/internals.sh | 54 | ||||
-rw-r--r-- | scripts/crosstool-NG.sh.in | 8 |
2 files changed, 32 insertions, 30 deletions
diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh index c7eb4c80..21f64728 100644 --- a/scripts/build/internals.sh +++ b/scripts/build/internals.sh @@ -28,33 +28,35 @@ do_finish() { CT_DoExecLog ALL "${CT_TARGET}-strip" ${strip_args} \ "${CT_TARGET}/debug-root/usr/bin/gdbserver" fi - # We can not use the version in CT_CC_VERSION because - # of the Linaro stuff. So, harvest the version string - # directly from the gcc sources... - # All gcc 4.x seem to have the version in gcc/BASE-VER - # while version prior to 4.x have the version in gcc/version.c - # Of course, here is not the better place to do that... - if [ -f "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/BASE-VER" ]; then - gcc_version=$( cat "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/BASE-VER" ) - else - gcc_version=$( sed -r -e '/version_string/!d; s/^.+= "([^"]+)".*$/\1/;' \ - "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/version.c" \ - ) + if [ "${CT_CC_gcc}" = "y" ]; then + # We can not use the version in CT_CC_GCC_VERSION because + # of the Linaro stuff. So, harvest the version string + # directly from the gcc sources... + # All gcc 4.x seem to have the version in gcc/BASE-VER + # while version prior to 4.x have the version in gcc/version.c + # Of course, here is not the better place to do that... + if [ -f "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/BASE-VER" ]; then + gcc_version=$( cat "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/BASE-VER" ) + else + gcc_version=$( sed -r -e '/version_string/!d; s/^.+= "([^"]+)".*$/\1/;' \ + "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/version.c" \ + ) + fi + for _t in "bin/${CT_TARGET}-"* \ + "${CT_TARGET}/bin/"* \ + "libexec/gcc/${CT_TARGET}/${gcc_version}/"* \ + "libexec/gcc/${CT_TARGET}/${gcc_version}/install-tools/"* \ + ; do + _type="$( file "${_t}" |cut -d ' ' -f 2- )" + case "${_type}" in + *script*executable*) + ;; + *executable*) + CT_DoExecLog ALL ${CT_HOST}-strip ${strip_args} "${_t}" + ;; + esac + done fi - for _t in "bin/${CT_TARGET}-"* \ - "${CT_TARGET}/bin/"* \ - "libexec/gcc/${CT_TARGET}/${gcc_version}/"* \ - "libexec/gcc/${CT_TARGET}/${gcc_version}/install-tools/"* \ - ; do - _type="$( file "${_t}" |cut -d ' ' -f 2- )" - case "${_type}" in - *script*executable*) - ;; - *executable*) - CT_DoExecLog ALL ${CT_HOST}-strip ${strip_args} "${_t}" - ;; - esac - done CT_Popd fi diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index 78abd96b..ab654da7 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -165,8 +165,8 @@ CT_PREFIX_DIR="$( "${sed}" -r -e 's:/+:/:g; s:/*$::;' <<<"${CT_PREFIX_DIR}" )" # Put user-supplied flags at the end, so that they take precedence. CT_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_TARGET_CFLAGS}" CT_TARGET_LDFLAGS="${CT_ARCH_TARGET_LDFLAGS} ${CT_TARGET_LDFLAGS}" -CT_CC_CORE_EXTRA_CONFIG_ARRAY=( ${CT_ARCH_CC_CORE_EXTRA_CONFIG} "${CT_CC_CORE_EXTRA_CONFIG_ARRAY[@]}" ) -CT_CC_EXTRA_CONFIG_ARRAY=( ${CT_ARCH_CC_EXTRA_CONFIG} "${CT_CC_EXTRA_CONFIG_ARRAY[@]}" ) +CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY=( ${CT_ARCH_CC_CORE_EXTRA_CONFIG} "${CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY[@]}" ) +CT_CC_GCC_EXTRA_CONFIG_ARRAY=( ${CT_ARCH_CC_EXTRA_CONFIG} "${CT_CC_GCC_EXTRA_CONFIG_ARRAY[@]}" ) # Compute the package version string CT_PKGVERSION="crosstool-NG ${CT_VERSION}${CT_TOOLCHAIN_PKGVERSION:+ - ${CT_TOOLCHAIN_PKGVERSION}}" @@ -548,8 +548,8 @@ if [ -z "${CT_RESTART}" ]; then CT_EndStep fi - if [ "${CT_CC_STATIC_LIBSTDCXX}" = "y" ]; then - CT_DoStep DEBUG "Checking that gcc can statically link libstdc++ (CT_CC_STATIC_LIBSTDCXX)" + if [ "${CT_CC_GCC_STATIC_LIBSTDCXX}" = "y" ]; then + CT_DoStep DEBUG "Checking that gcc can statically link libstdc++ (CT_CC_GCC_STATIC_LIBSTDCXX)" CT_DoLog DEBUG "You may need to ensure that libstdc++.a is installed on your system" CT_DoExecLog DEBUG "${CT_HOST}-gcc" ${CT_CFLAGS_FOR_HOST} ${CT_LDFLAGS_FOR_HOST} "${testc}" -static -lstdc++ -o "${gccout}" rm -f "${gccout}" |