summaryrefslogtreecommitdiff
path: root/sys-libs/glibc/glibc-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-03-31 10:55:17 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-03-31 10:55:17 +0100
commit75fc75ae1f0481ffdb78450e801a9b443ba641bd (patch)
treecef96ea0860ae39a202bbf1e226100335209627d /sys-libs/glibc/glibc-9999.ebuild
parent1173ad5704ce725916e0c332416aff326d850d06 (diff)
gentoo resync : 31.03.2018
Diffstat (limited to 'sys-libs/glibc/glibc-9999.ebuild')
-rw-r--r--sys-libs/glibc/glibc-9999.ebuild26
1 files changed, 22 insertions, 4 deletions
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index a978eaf1970b..17f8cdafed54 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -450,12 +450,20 @@ setup_env() {
# and fall back on CFLAGS.
local VAR=CFLAGS_${CTARGET//[-.]/_}
CFLAGS=${!VAR-${CFLAGS}}
+ einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}"
fi
setup_flags
export ABI=${ABI:-${DEFAULT_ABI:-default}}
+ if use headers-only ; then
+ # Avoid mixing host's CC and target's CFLAGS_${ABI}:
+ # At this bootstrap stage we have only binutils for
+ # target but not compiler yet.
+ einfo "Skip CC ABI injection. We can't use (cross-)compiler yet."
+ return 0
+ fi
local VAR=CFLAGS_${ABI}
# We need to export CFLAGS with abi information in them because glibc's
# configure script checks CFLAGS for some targets (like mips). Keep
@@ -463,6 +471,7 @@ setup_env() {
# top of each other.
: ${__GLIBC_CC:=$(tc-getCC ${CTARGET_OPT:-${CTARGET}})}
export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}"
+ einfo " $(printf '%15s' 'Manual CC:') ${CC}"
}
foreach_abi() {
@@ -1022,11 +1031,20 @@ glibc_headers_configure() {
# Nothing is compiled here which would affect the headers for the target.
# So forcing CC/CFLAGS is sane.
+ local headers_only_CC=$(tc-getBUILD_CC)
+ local headers_only_CFLAGS="-O1 -pipe"
+ local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE"
+ local headers_only_LDFLAGS=""
set -- "${S}"/configure "${myconf[@]}"
- echo "$@"
- CC="$(tc-getBUILD_CC)" \
- CFLAGS="-O1 -pipe" \
- CPPFLAGS="-U_FORTIFY_SOURCE" \
+ echo \
+ "CC=${headers_only_CC}" \
+ "CFLAGS=${headers_only_CFLAGS}" \
+ "CPPFLAGS=${headers_only_CPPFLAGS}" \
+ "LDFLAGS=${headers_only_LDFLAGS}" \
+ "$@"
+ CC=${headers_only_CC} \
+ CFLAGS=${headers_only_CFLAGS} \
+ CPPFLAGS=${headers_only_CPPFLAGS} \
LDFLAGS="" \
"$@" || die "failed to configure glibc"
}