diff options
Diffstat (limited to 'scripts/build/libc/glibc.sh')
-rw-r--r-- | scripts/build/libc/glibc.sh | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index 3eac3ba7..e8f04458 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -10,9 +10,9 @@ do_libc_get() { addons_list=($(do_libc_add_ons_list " ")) # Main source - if [ "${CT_LIBC_GLIBC_CUSTOM}" = "y" ]; then - CT_GetCustom "glibc" "${CT_LIBC_GLIBC_CUSTOM_VERSION}" \ - "${CT_LIBC_GLIBC_CUSTOM_LOCATION}" + if [ "${CT_GLIBC_CUSTOM}" = "y" ]; then + CT_GetCustom "glibc" "${CT_GLIBC_CUSTOM_VERSION}" \ + "${CT_GLIBC_CUSTOM_LOCATION}" else case "${CT_LIBC_VERSION}" in linaro-*) @@ -34,7 +34,7 @@ do_libc_get() { nptl) continue;; esac - case "${addon}:${CT_LIBC_GLIBC_PORTS_EXTERNAL}" in + case "${addon}:${CT_GLIBC_PORTS_EXTERNAL}" in ports:y) ;; ports:*) continue;; esac @@ -209,7 +209,7 @@ do_libc_backend_once() { # 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 - # values, as they CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY is passed after + # values, as they CT_GLIBC_EXTRA_CONFIG_ARRAY is passed after # extra_config extra_config+=("$(do_libc_min_kernel_config)") @@ -218,7 +218,7 @@ do_libc_backend_once() { nptl) extra_config+=("--with-__thread" "--with-tls");; linuxthreads) extra_config+=("--with-__thread" "--without-tls" "--without-nptl");; none) extra_config+=("--without-__thread" "--without-nptl") - case "${CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY[*]}" in + case "${CT_GLIBC_EXTRA_CONFIG_ARRAY[*]}" in *-tls*) ;; *) extra_config+=("--without-tls");; esac @@ -230,12 +230,12 @@ do_libc_backend_once() { *) extra_config+=("--disable-shared");; esac - if [ "${CT_LIBC_DISABLE_VERSIONING}" = "y" ]; then + if [ "${CT_GLIBC_DISABLE_VERSIONING}" = "y" ]; then extra_config+=("--disable-versioning") fi - if [ "${CT_LIBC_OLDEST_ABI}" != "" ]; then - extra_config+=("--enable-oldest-abi=${CT_LIBC_OLDEST_ABI}") + if [ "${CT_GLIBC_OLDEST_ABI}" != "" ]; then + extra_config+=("--enable-oldest-abi=${CT_GLIBC_OLDEST_ABI}") fi case "$(do_libc_add_ons_list ,)" in @@ -251,25 +251,25 @@ do_libc_backend_once() { # Hide host C++ binary from configure echo "ac_cv_prog_ac_ct_CXX=${CT_TARGET}-g++" >>config.cache - if [ "${CT_LIBC_GLIBC_FORCE_UNWIND}" = "y" ]; then + if [ "${CT_GLIBC_FORCE_UNWIND}" = "y" ]; then echo "libc_cv_forced_unwind=yes" >>config.cache echo "libc_cv_c_cleanup=yes" >>config.cache fi # Pre-seed the configparms file with values from the config option - printf "%s\n" "${CT_LIBC_GLIBC_CONFIGPARMS}" > configparms + printf "%s\n" "${CT_GLIBC_CONFIGPARMS}" > configparms # glibc can't be built without -O2 (reference needed!) glibc_cflags+=" -O2" - case "${CT_LIBC_ENABLE_FORTIFIED_BUILD}" in + case "${CT_GLIBC_ENABLE_FORTIFIED_BUILD}" in y) ;; *) glibc_cflags+=" -U_FORTIFY_SOURCE";; esac # In the order of increasing precedence. Flags common to compiler and linker. glibc_cflags+=" ${CT_TARGET_CFLAGS}" - glibc_cflags+=" ${CT_LIBC_GLIBC_EXTRA_CFLAGS}" + glibc_cflags+=" ${CT_GLIBC_EXTRA_CFLAGS}" glibc_cflags+=" ${multi_flags}" # Analyze the resulting options for any extra configure switches to throw in. @@ -336,7 +336,7 @@ do_libc_backend_once() { --without-gd \ --with-headers="${CT_HEADERS_DIR}" \ "${extra_config[@]}" \ - "${CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY[@]}" + "${CT_GLIBC_EXTRA_CONFIG_ARRAY[@]}" # build hacks case "${CT_ARCH},${CT_ARCH_CPU}" in @@ -475,7 +475,7 @@ do_libc_backend_once() { ${CT_PREFIX_DIR}/share/doc fi - if [ "${CT_LIBC_LOCALES}" = "y" -a "${multi_index}" = "${multi_count}" ]; then + if [ "${CT_GLIBC_LOCALES}" = "y" -a "${multi_index}" = "${multi_count}" ]; then do_libc_locales fi fi # libc_mode = final @@ -486,16 +486,16 @@ do_libc_backend_once() { # Build up the addons list, separated with $1 do_libc_add_ons_list() { local sep="$1" - local addons_list="$( echo "${CT_LIBC_ADDONS_LIST}" \ + local addons_list="$( echo "${CT_GLIBC_ADDONS_LIST}" \ |sed -r -e "s/[[:space:],]/${sep}/g;" \ )" - if [ "${CT_LIBC_GLIBC_2_20_or_later}" != "y" ]; then + if [ "${GLIBC_HAS_NPTL_ADDON}" = "y" ]; then case "${CT_THREADS}" in none) ;; *) addons_list="${addons_list}${sep}${CT_THREADS}";; esac fi - [ "${CT_LIBC_GLIBC_USE_PORTS}" = "y" ] && addons_list="${addons_list}${sep}ports" + [ "${CT_GLIBC_USE_PORTS}" = "y" ] && addons_list="${addons_list}${sep}ports" # Remove duplicate, leading and trailing separators echo "${addons_list}" |sed -r -e "s/${sep}+/${sep}/g; s/^${sep}//; s/${sep}\$//;" } @@ -504,9 +504,9 @@ do_libc_add_ons_list() { do_libc_min_kernel_config() { local min_kernel_config - case "${CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY[*]}" in + case "${CT_GLIBC_EXTRA_CONFIG_ARRAY[*]}" in *--enable-kernel*) ;; - *) if [ "${CT_LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS}" = "y" ]; then + *) if [ "${CT_GLIBC_KERNEL_VERSION_AS_HEADERS}" = "y" ]; then # We can't rely on the kernel version from the configuration, # because it might not be available if the user uses pre-installed # headers. On the other hand, both method will have the kernel @@ -523,9 +523,9 @@ do_libc_min_kernel_config() { patchlevel=$(((version_code>>8)&0xFF)) sublevel=$((version_code&0xFF)) min_kernel_config="${version}.${patchlevel}.${sublevel}" - elif [ "${CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN}" = "y" ]; then + elif [ "${CT_GLIBC_KERNEL_VERSION_CHOSEN}" = "y" ]; then # Trim the fourth part of the linux version, keeping only the first three numbers - min_kernel_config="$( echo "${CT_LIBC_GLIBC_MIN_KERNEL_VERSION}" \ + min_kernel_config="$( echo "${CT_GLIBC_MIN_KERNEL_VERSION}" \ |sed -r -e 's/^([^.]+\.[^.]+\.[^.]+)(|\.[^.]+)$/\1/;' \ )" fi @@ -567,7 +567,7 @@ do_libc_locales() { CT_DoLog DEBUG "Extra config args passed: '${extra_config[*]}'" glibc_cflags="-O2 -fno-stack-protector" - case "${CT_LIBC_ENABLE_FORTIFIED_BUILD}" in + case "${CT_GLIBC_ENABLE_FORTIFIED_BUILD}" in y) ;; *) glibc_cflags+=" -U_FORTIFY_SOURCE";; esac |