diff options
Diffstat (limited to 'scripts/build')
-rw-r--r-- | scripts/build/cc/100-gcc.sh | 6 | ||||
-rw-r--r-- | scripts/build/companion_libs/121-isl.sh | 15 | ||||
-rw-r--r-- | scripts/build/libc/glibc.sh | 52 |
3 files changed, 41 insertions, 32 deletions
diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh index 56b6e21d..05b54561 100644 --- a/scripts/build/cc/100-gcc.sh +++ b/scripts/build/cc/100-gcc.sh @@ -207,17 +207,17 @@ do_gcc_core_backend() { extra_config+=("--with-newlib") extra_config+=("--enable-threads=no") extra_config+=("--disable-shared") - extra_user_config=( "${CT_CC_CORE_EXTRA_CONFIG_ARRAY[@]}" ) + extra_user_config=( "${CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY[@]}" ) ;; shared) extra_config+=("--enable-shared") - extra_user_config=( "${CT_CC_CORE_EXTRA_CONFIG_ARRAY[@]}" ) + extra_user_config=( "${CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY[@]}" ) ;; baremetal) extra_config+=("--with-newlib") extra_config+=("--enable-threads=no") extra_config+=("--disable-shared") - extra_user_config=( "${CT_CC_EXTRA_CONFIG_ARRAY[@]}" ) + extra_user_config=( "${CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY[@]}" ) ;; *) CT_Abort "Internal Error: 'mode' must be one of: 'static', 'shared' or 'baremetal', not '${mode:-(empty)}'" diff --git a/scripts/build/companion_libs/121-isl.sh b/scripts/build/companion_libs/121-isl.sh index 6c06ab0e..5a623e11 100644 --- a/scripts/build/companion_libs/121-isl.sh +++ b/scripts/build/companion_libs/121-isl.sh @@ -87,6 +87,7 @@ do_isl_backend() { local cflags local cxxflags local ldflags + local -a extra_config local arg for arg in "$@"; do @@ -95,6 +96,15 @@ do_isl_backend() { CT_DoLog EXTRA "Configuring ISL" + if [ "${CT_ISL_V_0_12_or_later}" != "y" ]; then + extra_config+=("--with-libgmp-prefix=${prefix}") + extra_config+=("--with-libgmpxx-prefix=${prefix}") + fi + + if [ "${CT_ISL_V_0_14_or_later}" != "y" ]; then + extra_config+=("--with-piplib=no") + fi + CT_DoExecLog CFG \ CFLAGS="${cflags}" \ CXXFLAGS="${cxxflags}" \ @@ -103,14 +113,11 @@ do_isl_backend() { --build=${CT_BUILD} \ --host=${host} \ --prefix="${prefix}" \ - --with-libgmp-prefix="${prefix}" \ - --with-libgmpxx-prefix="${prefix}" \ - --with-gmp-prefix="${prefix}" \ + "${extra_config[@]}" \ --disable-shared \ --enable-static \ --with-gmp=system \ --with-gmp-prefix="${prefix}" \ - --with-piplib=no \ --with-clang=no CT_DoLog EXTRA "Building ISL" diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index 39dbe01d..6a840174 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -17,37 +17,39 @@ do_libc_extract() { CT_Patch nochdir "${CT_LIBC}" "${CT_LIBC_VERSION}" fi - # Extract the add-opns - for addon in $(do_libc_add_ons_list " "); do - # If the addon was bundled with the main archive, we do not - # need to extract it. Worse, if we were to try to extract - # it, we'd get an error. - if [ -d "${addon}" ]; then - CT_DoLog DEBUG "Add-on '${addon}' already present, skipping extraction" - continue - fi + # Extract the add-opns if => 2.17 + if [ "${CT_LIBC_GLIBC_2_17_or_later}" != "y" ]; then + for addon in $(do_libc_add_ons_list " "); do + # If the addon was bundled with the main archive, we do not + # need to extract it. Worse, if we were to try to extract + # it, we'd get an error. + if [ -d "${addon}" ]; then + CT_DoLog DEBUG "Add-on '${addon}' already present, skipping extraction" + continue + fi - CT_Extract nochdir "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" + CT_Extract nochdir "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" - CT_TestAndAbort "Error in add-on '${addon}': both short and long names in tarball" \ - -d "${addon}" -a -d "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" + CT_TestAndAbort "Error in add-on '${addon}': both short and long names in tarball" \ + -d "${addon}" -a -d "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" - # Some addons have the 'long' name, while others have the - # 'short' name, but patches are non-uniformly built with - # either the 'long' or 'short' name, whatever the addons name - # but we prefer the 'short' name and avoid duplicates. - if [ -d "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" ]; then - CT_DoExecLog FILE mv "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" "${addon}" - fi + # Some addons have the 'long' name, while others have the + # 'short' name, but patches are non-uniformly built with + # either the 'long' or 'short' name, whatever the addons name + # but we prefer the 'short' name and avoid duplicates. + if [ -d "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" ]; then + CT_DoExecLog FILE mv "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" "${addon}" + fi - CT_DoExecLog FILE ln -s "${addon}" "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" + CT_DoExecLog FILE ln -s "${addon}" "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" - CT_Patch nochdir "${CT_LIBC}" "${addon}-${CT_LIBC_VERSION}" + CT_Patch nochdir "${CT_LIBC}" "${addon}-${CT_LIBC_VERSION}" - # Remove the long name since it can confuse configure scripts to run - # the same source twice. - rm "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" - done + # Remove the long name since it can confuse configure scripts to run + # the same source twice. + rm "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" + done + fi # The configure files may be older than the configure.in files # if using a snapshot (or even some tarballs). Fake them being |