summaryrefslogtreecommitdiff
path: root/sys-libs/glibc/glibc-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-23 23:30:45 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-23 23:30:45 +0100
commitf892e24578e434bbea68c4f1c9a8eef429461268 (patch)
tree5fc6072a72fd5ca8397e89183bad49896e6bf372 /sys-libs/glibc/glibc-9999.ebuild
parent0e7ef53ddcc33809bcb2644d3649617113b78ea3 (diff)
gentoo auto-resync : 23:09:2022 - 23:30:45
Diffstat (limited to 'sys-libs/glibc/glibc-9999.ebuild')
-rw-r--r--sys-libs/glibc/glibc-9999.ebuild42
1 files changed, 26 insertions, 16 deletions
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index 68785ea5f6e6..8456c2a16fe4 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -183,6 +183,15 @@ XFAIL_TEST_LIST=(
# Small helper functions
#
+dump_build_environment() {
+ einfo ==== glibc build environment ========================================================
+ local v
+ for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX CPP LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM AR AS STRIP RANLIB OBJCOPY STRINGS OBJDUMP READELF; do
+ einfo " $(printf '%15s' ${v}:) ${!v}"
+ done
+ einfo =====================================================================================
+}
+
is_crosscompile() {
[[ ${CHOST} != ${CTARGET} ]]
}
@@ -523,15 +532,20 @@ setup_env() {
fi
# Reset CC and CXX to the value at start of emerge
- export CC=${__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}}
- export CXX=${__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}}
+ export CC=${glibc__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}}
+ export CXX=${glibc__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}}
- # and make sure __ORIC_CC and __ORIG_CXX is defined now.
- export __ORIG_CC=${CC}
- export __ORIG_CXX=${CXX}
+ # and make sure glibc__ORIG_CC and glibc__ORIG_CXX is defined now.
+ export glibc__ORIG_CC=${CC}
+ export glibc__ORIG_CXX=${CXX}
if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then
+ export glibc__force_gcc=yes
+ # once this is toggled on, it needs to stay on, since with CPP manipulated
+ # tc-is-clang does not work correctly anymore...
+ fi
+ if [[ ${glibc__force_gcc} == "yes" ]] ; then
# If we are running in an otherwise clang/llvm environment, we need to
# recover the proper gcc and binutils settings here, at least until glibc
# is finally building with clang. So let's override everything that is
@@ -548,6 +562,7 @@ setup_env() {
einfo "Overriding clang configuration, since it won't work here"
export CC="${current_gcc_path}/gcc"
+ export CPP="${current_gcc_path}/cpp"
export CXX="${current_gcc_path}/g++"
export LD="${current_binutils_path}/ld.bfd"
export AR="${current_binutils_path}/ar"
@@ -585,10 +600,10 @@ setup_env() {
# around the original clean value to avoid appending multiple ABIs on
# top of each other. (Why does the comment talk about CFLAGS if the code
# acts on CC?)
- export __GLIBC_CC=${CC}
- export __GLIBC_CXX=${CXX}
+ export glibc__GLIBC_CC=${CC}
+ export glibc__GLIBC_CXX=${CXX}
- export __abi_CFLAGS="$(get_abi_CFLAGS)"
+ export glibc__abi_CFLAGS="$(get_abi_CFLAGS)"
# CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760
# To build .S (assembly) files with the same ABI-specific flags
@@ -597,10 +612,10 @@ setup_env() {
# Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS
# and breaks multiarch support. See 659030#c3 for an example.
# The glibc configure script doesn't properly use LDFLAGS all the time.
- export CC="${__GLIBC_CC} ${__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}"
+ export CC="${glibc__GLIBC_CC} ${glibc__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}"
# Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548
- export CXX="${__GLIBC_CXX} ${__abi_CFLAGS} ${CFLAGS}"
+ export CXX="${glibc__GLIBC_CXX} ${glibc__abi_CFLAGS} ${CFLAGS}"
if is_crosscompile; then
# Assume worst-case bootstrap: glibc is buil first time
@@ -914,13 +929,8 @@ src_prepare() {
}
glibc_do_configure() {
+ dump_build_environment
- local v
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM AR AS STRIP RANLIB OBJCOPY STRINGS OBJDUMP READELF; do
- einfo " $(printf '%15s' ${v}:) ${!v}"
- done
-
- echo
local myconf=()
# Use '=strong' instead of '=all' to protect only functions