| 6 |
6 |
# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
|
| 7 |
7 |
# Please read & adapt the page as necessary if obsolete.
|
| 8 |
8 |
|
| 9 |
|
PYTHON_COMPAT=( python3_{11..14} )
|
|
9 |
PYTHON_COMPAT=( python3_{10..14} )
|
| 10 |
10 |
TMPFILES_OPTIONAL=1
|
| 11 |
11 |
|
| 12 |
12 |
EMULTILIB_PKG="true"
|
| 13 |
13 |
|
| 14 |
14 |
# Gentoo patchset (ignored for live ebuilds)
|
| 15 |
|
PATCH_VER=7
|
|
15 |
PATCH_VER=1
|
| 16 |
16 |
PATCH_DEV=dilfridge
|
| 17 |
17 |
|
| 18 |
18 |
# gcc mulitilib bootstrap files version
|
| ... | ... | |
| 43 |
43 |
if [[ ${PV} == *9999 ]]; then
|
| 44 |
44 |
inherit git-r3
|
| 45 |
45 |
else
|
| 46 |
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86"
|
|
46 |
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
| 47 |
47 |
SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
|
| 48 |
48 |
SRC_URI+=" verify-sig? ( mirror://gnu/glibc/${P}.tar.xz.sig )"
|
| 49 |
49 |
SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
|
| ... | ... | |
| 54 |
54 |
|
| 55 |
55 |
LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
|
| 56 |
56 |
SLOT="2.2"
|
| 57 |
|
IUSE="audit caps cet compile-locales custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux sframe +ssp stack-realign +static-libs suid systemd systemtap test vanilla"
|
|
57 |
IUSE="audit caps cet clang compile-locales custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux sframe +ssp stack-realign +static-libs suid systemd systemtap test vanilla"
|
| 58 |
58 |
|
| 59 |
59 |
# Here's how the cross-compile logic breaks down ...
|
| 60 |
60 |
# CTARGET - machine that will target the binaries
|
| ... | ... | |
| 155 |
155 |
else
|
| 156 |
156 |
BDEPEND+="
|
| 157 |
157 |
>=sys-devel/binutils-2.27
|
| 158 |
|
>=sys-devel/gcc-6.2
|
|
158 |
clang? ( || ( ( >=sys-devel/gcc-6.2 )
|
|
159 |
( >=sys-devel/gcc-6.2 >=llvm-core/clang-18 )
|
|
160 |
( >=llvm-core/clang-18 >=llvm-runtimes/libgcc-18 ) ) )
|
|
161 |
!clang? ( >=sys-devel/gcc-6.2 )
|
| 159 |
162 |
"
|
| 160 |
163 |
DEPEND+=" virtual/os-headers "
|
| 161 |
164 |
RDEPEND+="
|
| ... | ... | |
| 479 |
482 |
append-ldflags '-Wl,--hash-style=both'
|
| 480 |
483 |
fi
|
| 481 |
484 |
|
|
485 |
# clang warns about linker flags unused during compilation, but we don't
|
|
486 |
# want that to turn into errors!
|
|
487 |
# Let's turn the warning off entirely since it spams.
|
|
488 |
append-flags -Wno-unused-command-line-argument
|
|
489 |
|
| 482 |
490 |
# #492892
|
| 483 |
491 |
filter-flags -frecord-gcc-switches
|
| 484 |
492 |
|
| ... | ... | |
| 610 |
618 |
export glibc__ORIG_CXX=${CXX}
|
| 611 |
619 |
export glibc__ORIG_CPP=${CPP}
|
| 612 |
620 |
|
| 613 |
|
if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then
|
|
621 |
if tc-is-clang && ! ( use clang || use custom-cflags ) && ! is_crosscompile ; then
|
| 614 |
622 |
export glibc__force_gcc=yes
|
| 615 |
623 |
# once this is toggled on, it needs to stay on, since with CPP manipulated
|
| 616 |
624 |
# tc-is-clang does not work correctly anymore...
|
| ... | ... | |
| 621 |
629 |
# recover the proper gcc and binutils settings here, at least until glibc
|
| 622 |
630 |
# is finally building with clang. So let's override everything that is
|
| 623 |
631 |
# set in the clang profiles.
|
| 624 |
|
# Want to shoot yourself into the foot? Set USE=custom-cflags, that's always
|
| 625 |
|
# a good start into that direction.
|
| 626 |
|
# Also, if you're crosscompiling, let's assume you know what you are doing.
|
|
632 |
# Want to shoot yourself into the foot? Set USE="clang" or USE="custom-cflags".
|
|
633 |
# Also, if you are crosscompiling, let's assume you know what you are doing.
|
| 627 |
634 |
# Hopefully.
|
| 628 |
635 |
# Last, we need the settings of the *build* environment, not of the
|
| 629 |
636 |
# target environment...
|
| ... | ... | |
| 652 |
659 |
filter-flags '-D_FORTIFY_SOURCE=*'
|
| 653 |
660 |
|
| 654 |
661 |
else
|
| 655 |
|
|
| 656 |
662 |
# this is the "normal" case
|
| 657 |
663 |
|
| 658 |
|
export CC="$(tc-getCC ${CTARGET})"
|
| 659 |
|
export CXX="$(tc-getCXX ${CTARGET})"
|
| 660 |
|
export CPP="$(tc-getCPP ${CTARGET})"
|
| 661 |
|
|
| 662 |
664 |
# Always use tuple-prefixed toolchain. For non-native ABI glibc's configure
|
| 663 |
665 |
# can't detect them automatically due to ${CHOST} mismatch and fallbacks
|
| 664 |
666 |
# to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup().
|
|
667 |
export CC="$(tc-getCC ${CTARGET})"
|
|
668 |
export CXX="$(tc-getCXX ${CTARGET})"
|
|
669 |
export CPP="$(tc-getCPP ${CTARGET})"
|
| 665 |
670 |
export NM="$(tc-getNM ${CTARGET})"
|
| 666 |
671 |
export READELF="$(tc-getREADELF ${CTARGET})"
|
| 667 |
672 |
|
| 668 |
673 |
fi
|
| 669 |
674 |
|
| 670 |
|
# We need to export CFLAGS with abi information in them because glibc's
|
| 671 |
|
# configure script checks CFLAGS for some targets (like mips). Keep
|
| 672 |
|
# around the original clean value to avoid appending multiple ABIs on
|
| 673 |
|
# top of each other. (Why does the comment talk about CFLAGS if the code
|
| 674 |
|
# acts on CC?)
|
|
675 |
# We need to move CFLAGS with abi information into CC etc per glibc upstream
|
|
676 |
# requirement. Keep around the original clean value to avoid appending
|
|
677 |
# multiple ABIs on top of each other.
|
| 675 |
678 |
export glibc__GLIBC_CC=${CC}
|
| 676 |
679 |
export glibc__GLIBC_CXX=${CXX}
|
| 677 |
680 |
export glibc__GLIBC_CPP=${CPP}
|