diff options
Diffstat (limited to 'sys-libs/glibc/files/eblits/src_configure.eblit')
-rw-r--r-- | sys-libs/glibc/files/eblits/src_configure.eblit | 63 |
1 files changed, 45 insertions, 18 deletions
diff --git a/sys-libs/glibc/files/eblits/src_configure.eblit b/sys-libs/glibc/files/eblits/src_configure.eblit index 72f39ea..5b50a53 100644 --- a/sys-libs/glibc/files/eblits/src_configure.eblit +++ b/sys-libs/glibc/files/eblits/src_configure.eblit @@ -1,6 +1,6 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_configure.eblit,v 1.2 2014/09/18 16:48:15 vapier Exp $ +# $Id$ dump_toolchain_settings() { echo @@ -8,23 +8,20 @@ dump_toolchain_settings() { einfo "$*" local v - for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC {AS,C,CPP,CXX,LD}FLAGS ; do + for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC LD {AS,C,CPP,CXX,LD}FLAGS ; do einfo " $(printf '%15s' ${v}:) ${!v}" done - export CC=$(tc-getCC ${CTARGET}) - # Glibc does not work with gold (for various reasons) #269274. - if $(tc-getLD ${CTARGET}) --version | grep -q 'GNU gold' ; then - local d="${T}/bfd-linker" - mkdir -p "${d}" - ln -sf $(which ${CTARGET}-ld.bfd) "${d}"/ld - CC+=" -B${d}" - fi + # The glibc configure script doesn't properly use LDFLAGS all the time. + export CC="$(tc-getCC ${CTARGET}) ${LDFLAGS}" einfo " $(printf '%15s' 'Manual CC:') ${CC}" echo } glibc_do_configure() { + # Glibc does not work with gold (for various reasons) #269274. + tc-ld-disable-gold + dump_toolchain_settings "Configuring glibc for $1" local myconf=() @@ -101,6 +98,7 @@ glibc_do_configure() { myconf+=( --without-cvs + --disable-werror --enable-bind-now --build=${CBUILD_OPT:-${CBUILD}} --host=${CTARGET_OPT:-${CTARGET}} @@ -117,12 +115,21 @@ glibc_do_configure() { --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion="$(glibc_banner)" $(use_multiarch || echo --disable-multi-arch) - --enable-obsolete-rpc + $(in_iuse rpc && use_enable rpc obsolete-rpc || echo --enable-obsolete-rpc) $(in_iuse systemtap && use_enable systemtap) $(in_iuse nscd && use_enable nscd) ${EXTRA_ECONF} ) + # We rely on sys-libs/timezone-data for timezone tools normally. + if version_is_at_least 2.23 ; then + myconf+=( $(use_enable vanilla timezone-tools) ) + fi + + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=$(in_iuse audit && usex audit || echo no) + ac_cv_lib_cap_cap_init=$(in_iuse caps && usex caps || echo no) + # There is no configure option for this and we need to export it # since the glibc build will re-run configure on itself export libc_cv_slibdir=${TPREFIX}/$(get_libdir) @@ -204,6 +211,9 @@ toolchain-glibc_headers_configure() { libc_cv_z_relro=yes libc_mips_abi=${ABI} libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=no + ac_cv_lib_cap_cap_init=no ) einfo "Forcing cached settings:" for v in "${vars[@]}" ; do @@ -211,14 +221,20 @@ toolchain-glibc_headers_configure() { export ${v} done - # Pick out the correct location for build headers - local ports="" myconf=() - [[ -d ${S}/ports ]] && ports=",ports" + # Blow away some random CC settings that screw things up. #550192 + if [[ -d ${S}/sysdeps/mips ]]; then + pushd "${S}"/sysdeps/mips >/dev/null + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die + popd >/dev/null + fi + + local myconf=() myconf+=( --disable-sanity-checks --enable-hacker-mode - --enable-add-ons=nptl${ports} --without-cvs + --disable-werror --enable-bind-now --build=${CBUILD_OPT:-${CBUILD}} --host=${CTARGET_OPT:-${CTARGET}} @@ -227,9 +243,16 @@ toolchain-glibc_headers_configure() { ${EXTRA_ECONF} ) + local addons + [[ -d ${S}/ports ]] && addons+=",ports" + # Newer versions require nptl, so there is no addon for it. + version_is_at_least 2.20 || addons+=",nptl" + myconf+=( --enable-add-ons="${addons#,}" ) + # Nothing is compiled here which would affect the headers for the target. # So forcing CC/CFLAGS is sane. set -- "${S}"/configure "${myconf[@]}" + echo "$@" CC="$(tc-getBUILD_CC)" \ CFLAGS="-O1 -pipe" \ CPPFLAGS="-U_FORTIFY_SOURCE" \ @@ -238,8 +261,12 @@ toolchain-glibc_headers_configure() { } toolchain-glibc_src_configure() { - want_linuxthreads && glibc_do_configure linuxthreads - want_nptl && glibc_do_configure nptl + if just_headers ; then + toolchain-glibc_headers_configure + else + want_linuxthreads && glibc_do_configure linuxthreads + want_nptl && glibc_do_configure nptl + fi } eblit-glibc-src_configure() { |