Lines 16-31
SLOT="2.2"
Link Here
|
16 |
EMULTILIB_PKG="true" |
16 |
EMULTILIB_PKG="true" |
17 |
|
17 |
|
18 |
# Gentoo patchset (ignored for live ebuilds) |
18 |
# Gentoo patchset (ignored for live ebuilds) |
19 |
PATCH_VER=16 |
19 |
PATCH_VER=2 |
20 |
PATCH_DEV=slyfox |
20 |
PATCH_DEV=dilfridge |
21 |
|
21 |
|
22 |
if [[ ${PV} == 9999* ]]; then |
22 |
if [[ ${PV} == 9999* ]]; then |
23 |
inherit git-r3 |
23 |
inherit git-r3 |
24 |
else |
24 |
else |
25 |
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
25 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
26 |
KEYWORDS="" |
|
|
27 |
SRC_URI="mirror://gnu/glibc/${P}.tar.xz" |
26 |
SRC_URI="mirror://gnu/glibc/${P}.tar.xz" |
28 |
SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" |
27 |
SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" |
|
|
28 |
SRC_URI+=" riscv? ( https://dev.gentoo.org/~dilfridge/distfiles/backport-rv32.txz )" |
29 |
fi |
29 |
fi |
30 |
|
30 |
|
31 |
RELEASE_VER=${PV} |
31 |
RELEASE_VER=${PV} |
Lines 133-145
RESTRICT="!test? ( test )"
Link Here
|
133 |
|
133 |
|
134 |
if [[ ${CATEGORY} == cross-* ]] ; then |
134 |
if [[ ${CATEGORY} == cross-* ]] ; then |
135 |
BDEPEND+=" !headers-only? ( |
135 |
BDEPEND+=" !headers-only? ( |
136 |
>=${CATEGORY}/binutils-2.27 |
136 |
>=${CATEGORY}/binutils-2.24 |
137 |
>=${CATEGORY}/gcc-6 |
137 |
>=${CATEGORY}/gcc-6 |
138 |
)" |
138 |
)" |
139 |
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers" |
139 |
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers" |
140 |
else |
140 |
else |
141 |
BDEPEND+=" |
141 |
BDEPEND+=" |
142 |
>=sys-devel/binutils-2.27 |
142 |
>=sys-devel/binutils-2.24 |
143 |
>=sys-devel/gcc-6 |
143 |
>=sys-devel/gcc-6 |
144 |
" |
144 |
" |
145 |
DEPEND+=" virtual/os-headers " |
145 |
DEPEND+=" virtual/os-headers " |
Lines 765-770
src_unpack() {
Link Here
|
765 |
|
765 |
|
766 |
cd "${WORKDIR}" || die |
766 |
cd "${WORKDIR}" || die |
767 |
unpack locale-gen-${LOCALE_GEN_VER}.tar.gz |
767 |
unpack locale-gen-${LOCALE_GEN_VER}.tar.gz |
|
|
768 |
use riscv && unpack backport-rv32.txz |
768 |
} |
769 |
} |
769 |
|
770 |
|
770 |
src_prepare() { |
771 |
src_prepare() { |
Lines 778-783
src_prepare() {
Link Here
|
778 |
elog "Applying Gentoo Glibc Patchset ${patchsetname}" |
779 |
elog "Applying Gentoo Glibc Patchset ${patchsetname}" |
779 |
eapply "${WORKDIR}"/patches |
780 |
eapply "${WORKDIR}"/patches |
780 |
einfo "Done." |
781 |
einfo "Done." |
|
|
782 |
|
783 |
if use riscv ; then |
784 |
elog "Adding rv32 backport patchset for glibc-2.32 (experimental)" |
785 |
eapply "${WORKDIR}"/backport-rv32 |
786 |
einfo "Done." |
787 |
fi |
781 |
fi |
788 |
fi |
782 |
|
789 |
|
783 |
default |
790 |
default |
Lines 863-868
glibc_do_configure() {
Link Here
|
863 |
# https://sourceware.org/PR24202 |
870 |
# https://sourceware.org/PR24202 |
864 |
myconf+=( --enable-stack-protector=no ) |
871 |
myconf+=( --enable-stack-protector=no ) |
865 |
;; |
872 |
;; |
|
|
873 |
powerpc-*) |
874 |
# Currently gcc on powerpc32 generates invalid code for |
875 |
# __builtin_return_address(0) calls. Normally programs |
876 |
# don't do that but malloc hooks in glibc do: |
877 |
# https://gcc.gnu.org/PR81996 |
878 |
# https://bugs.gentoo.org/629054 |
879 |
myconf+=( --enable-stack-protector=no ) |
880 |
;; |
866 |
*) |
881 |
*) |
867 |
# Use '=strong' instead of '=all' to protect only functions |
882 |
# Use '=strong' instead of '=all' to protect only functions |
868 |
# worth protecting from stack smashes. |
883 |
# worth protecting from stack smashes. |
Lines 943-948
glibc_do_configure() {
Link Here
|
943 |
$(use_enable static-pie) |
958 |
$(use_enable static-pie) |
944 |
$(use_enable systemtap) |
959 |
$(use_enable systemtap) |
945 |
$(use_enable nscd) |
960 |
$(use_enable nscd) |
|
|
961 |
|
962 |
# locale data is arch-independent |
963 |
# https://bugs.gentoo.org/753740 |
964 |
libc_cv_complocaledir='${exec_prefix}/lib/locale' |
965 |
|
946 |
${EXTRA_ECONF} |
966 |
${EXTRA_ECONF} |
947 |
) |
967 |
) |
948 |
|
968 |
|
Lines 1328-1353
glibc_do_src_install() {
Link Here
|
1328 |
insinto /etc |
1348 |
insinto /etc |
1329 |
doins locale.gen |
1349 |
doins locale.gen |
1330 |
|
1350 |
|
1331 |
# Make sure all the ABI's can find the locales and so we only |
1351 |
keepdir /usr/lib/locale |
1332 |
# have to generate one set |
|
|
1333 |
local a |
1334 |
keepdir /usr/$(get_libdir)/locale |
1335 |
for a in $(get_install_abis) ; do |
1336 |
if [[ ! -e ${ED}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then |
1337 |
dosym ../$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale |
1338 |
fi |
1339 |
done |
1340 |
|
1341 |
# HACK: If we're building for riscv, we need to additionally make sure that |
1342 |
# we can find the locale archive afterwards |
1343 |
case ${CTARGET} in |
1344 |
riscv*) |
1345 |
if [[ ! -e ${ED}/usr/lib/locale ]] ; then |
1346 |
dosym ../$(get_libdir)/locale /usr/lib/locale |
1347 |
fi |
1348 |
;; |
1349 |
*) ;; |
1350 |
esac |
1351 |
|
1352 |
|
1352 |
cd "${S}" |
1353 |
cd "${S}" |
1353 |
|
1354 |
|
Lines 1474-1479
pkg_preinst() {
Link Here
|
1474 |
[[ -n ${ROOT} ]] && return 0 |
1475 |
[[ -n ${ROOT} ]] && return 0 |
1475 |
[[ -d ${ED}/$(get_libdir) ]] || return 0 |
1476 |
[[ -d ${ED}/$(get_libdir) ]] || return 0 |
1476 |
[[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check |
1477 |
[[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check |
|
|
1478 |
|
1479 |
if [[ -L ${EROOT}/usr/lib/locale ]]; then |
1480 |
# Help portage migrate this to a directory |
1481 |
# https://bugs.gentoo.org/753740 |
1482 |
rm "${EROOT}"/usr/lib/locale || die |
1483 |
fi |
1477 |
} |
1484 |
} |
1478 |
|
1485 |
|
1479 |
pkg_postinst() { |
1486 |
pkg_postinst() { |