summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build')
-rw-r--r--scripts/build/binutils/binutils.sh2
-rw-r--r--scripts/build/cc/gcc.sh18
-rw-r--r--scripts/build/libc/glibc.sh17
-rw-r--r--scripts/build/libc/mingw-w64.sh6
4 files changed, 30 insertions, 13 deletions
diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh
index 8fb51b8..e0fe7f4 100644
--- a/scripts/build/binutils/binutils.sh
+++ b/scripts/build/binutils/binutils.sh
@@ -188,7 +188,7 @@ do_binutils_backend() {
--disable-werror \
"${extra_config[@]}" \
${CT_ARCH_WITH_FLOAT} \
- ${BINUTILS_SYSROOT_ARG} \
+ ${CT_BINUTILS_SYSROOT_ARG} \
"${CT_BINUTILS_EXTRA_CONFIG_ARRAY[@]}"
if [ "${static_build}" = "y" ]; then
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index 6019b35..54dd514 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -14,7 +14,7 @@ do_cc_get() {
# GCC source tree, which will not be there unless we get it and
# put it there ourselves
if [ "${CT_CC_LANG_JAVA_USE_ECJ}" = "y" ]; then
- if ! CT_GetFile ecj-latest .jar $(CT_Mirrors sourceware java); then
+ if ! CT_GetFile ecj ecj-latest .jar $(CT_Mirrors sourceware java); then
# Should be a package, too - but with Java retirement in GCC,
# it may not make sense.
CT_Abort "Failed to download ecj-latest.jar"
@@ -453,6 +453,18 @@ do_gcc_core_backend() {
extra_config+=("--disable-libstdcxx-pch")
fi
+ if [ "${CT_LIBC_GLIBC}" = "y" ]; then
+ # Report GLIBC's version to GCC, it affects the defaults on other options.
+ # Pass-2 should be able to get it from the headers, but for some options
+ # (such as --with-long-double-128) we need to get it right even in pass-1.
+ # GCC expects just two numbers separated by a dot.
+ local glibc_version
+
+ CT_GetPkgVersion GLIBC glibc_version
+ glibc_version=`echo "${glibc_version}" | sed 's/\([1-9][0-9]*\.[1-9][0-9]*\).*/\1/'`
+ extra_config+=("--with-glibc-version=${glibc_version}")
+ fi
+
case "${CT_CC_GCC_LDBL_128}" in
y) extra_config+=("--with-long-double-128");;
m) ;;
@@ -560,7 +572,7 @@ do_gcc_core_backend() {
--target=${CT_TARGET} \
--prefix="${prefix}" \
--with-local-prefix="${CT_SYSROOT_DIR}" \
- ${CC_CORE_SYSROOT_ARG} \
+ ${CT_CC_CORE_SYSROOT_ARG} \
"${extra_config[@]}" \
--enable-languages="${lang_list}" \
"${extra_user_config[@]}"
@@ -1105,7 +1117,7 @@ do_gcc_backend() {
--host=${host} \
--target=${CT_TARGET} \
--prefix="${prefix}" \
- ${CC_SYSROOT_ARG} \
+ ${CT_CC_SYSROOT_ARG} \
"${extra_config[@]}" \
--with-local-prefix="${CT_SYSROOT_DIR}" \
--enable-long-long \
diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh
index eae64bc..c09ff5c 100644
--- a/scripts/build/libc/glibc.sh
+++ b/scripts/build/libc/glibc.sh
@@ -5,7 +5,6 @@
do_libc_get() {
local date
local version
- local -a addons_list
CT_Fetch GLIBC
if [ "${CT_GLIBC_USE_PORTS_EXTERNAL}" = "y" ]; then
@@ -15,13 +14,18 @@ do_libc_get() {
}
do_libc_extract() {
- local addon
-
CT_ExtractPatch GLIBC
if [ "${CT_GLIBC_USE_PORTS_EXTERNAL}" = "y" ]; then
CT_ExtractPatch GLIBC_PORTS
+
+ # This may create a bogus symlink if glibc-ports is using custom
+ # sources or has an overlay (and glibc is shared). However,
+ # we do not support concurrent use of the source directory
+ # and next run, if using different glibc-ports source, will override
+ # this symlink anyway.
+ CT_DoExecLog ALL ln -sf "${CT_GLIBC_PORTS_SRC_DIR}/${CT_GLIBC_PORTS_BASENAME}" \
+ "${CT_GLIBC_SRC_DIR}/${CT_GLIBC_BASENAME}/ports"
fi
- # TBD make patches for addons (ports? anything else?) uniformly using short names
# TBD make the configure timestamp fix in all patched packages (e.g. part of CT_ExtractPatch)
}
@@ -124,8 +128,9 @@ do_libc_backend_once() {
# Also, if those two are missing, iconv build breaks
extra_config+=( --disable-debug --disable-sanity-checks )
- # always include rpc, the user can still override it with TI-RPC
- extra_config+=( --enable-obsolete-rpc )
+ if [ "${CT_GLIBC_ENABLE_OBSOLETE_RPC}" = "y" ]; then
+ extra_config+=( --enable-obsolete-rpc )
+ fi
# Add some default glibc config options if not given by user.
# We don't need to be conditional on whether the user did set different
diff --git a/scripts/build/libc/mingw-w64.sh b/scripts/build/libc/mingw-w64.sh
index 295b313..21afb29 100644
--- a/scripts/build/libc/mingw-w64.sh
+++ b/scripts/build/libc/mingw-w64.sh
@@ -63,10 +63,10 @@ do_libc_start_files() {
do_check_mingw_vendor_tuple()
{
- if [ "${CT_MINGW_W64_VERSION%%.*}" -ge 4 ]; then
+ if [ "${CT_MINGW_W64_REQUIRES_W64_VENDOR}" = "y" ]; then
CT_DoStep INFO "Checking configured vendor tuple"
- if [ ${CT_TARGET_VENDOR} == w64 ]; then
- CT_DoLog EXTRA "The tuple is set to '${CT_TARGET_VENDOR}', as recommended by mingw-64 developers."
+ if [ ${CT_TARGET_VENDOR} = "w64" ]; then
+ CT_DoLog DEBUG "The tuple is set to '${CT_TARGET_VENDOR}', as recommended by mingw-64 developers."
else
CT_DoLog WARN "The tuple vendor is '${CT_TARGET_VENDOR}', not equal to 'w64' and might break the toolchain!"
fi