commit: daed4831fcde3f2144b5771e0077256d7e1df92a
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 25 22:03:50 2019 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Jul 25 22:31:53 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=daed4831
sys-libs/glibc: fix CPPFLAGS handling, bug #686248
Main triver of the change is an early cross-compilation of glibc headers
where we provide enough CPPFLAGS for a target to parse headers.
Unfortunately preprocessor was not always taking into accound CPPFLAGS.
This change fixes it. This chould make
'crossdev -t riscv64-unknown-linux-gnu'
just work.
Closes: https://bugs.gentoo.org/686248
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
sys-libs/glibc/Manifest | 3 +-
.../{glibc-9999.ebuild => glibc-2.29-r3.ebuild} | 37 +++++++---------------
sys-libs/glibc/glibc-9999.ebuild | 2 +-
3 files changed, 15 insertions(+), 27 deletions(-)
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest
index 9c53d323751..741bd5a02f4 100644
--- a/sys-libs/glibc/Manifest
+++ b/sys-libs/glibc/Manifest
@@ -15,5 +15,6 @@ DIST glibc-2.27.tar.xz 15395316 BLAKE2B
ea206d304c8c9aa86d69db981a14bea008602cea
DIST glibc-2.28-patches-9.tar.xz 98588 BLAKE2B
4ab583be712994f949dee2512da6e12fd7f7ad73e96393f21678552b43da98f49321b53b5b009551300cdb09ca135e7f6adc636ff750c251a1d6d7f262dbc410
SHA512
e3f40ae6e9d06471c1a11bd2bce7b5161d07c3d0a81791505a72aec4817e7faf9ef09841e98c6dcf62a0a00754dff87dd194d97ac6b6354aeb2497cf60900b96
DIST glibc-2.28.tar.xz 16484344 BLAKE2B
9aa8cbd5a145c2a6fde3a60b3d0a14b12b46ed79333ad1ca3e73464adcfe700277a17a9e7fd0ca36e355a0c5b0b27decfa091da320ba802741ad75cc955bbcc8
SHA512
521f820953ff07c69ece4c2186f59fc061a7f9747932cd70ef2995c2b2deee76eeb6de700d85071cdca5949179aa8ccee75eda7feca1394121ec7b821ad0a3f3
DIST glibc-2.29-patches-3.tar.xz 35812 BLAKE2B
90b8bc57b7a63f03617795c368b92e525eccfec462d638dbc25c581e5b7a2a72ffd5191842f5ac443a868cbc950838d7e5120e866d343a14b80c55dcbfa48f30
SHA512
4c9b78d9d1a8aa629418f2d758ef800857780b8a1fd8d3582b88348a513ca26ca7f6ac9110a8c6bae16949b360ba36840d184f42293cd4324760273592d1b438
+DIST glibc-2.29-patches-4.tar.xz 63576 BLAKE2B
4a9005326e16f8c6b9e1a38e596d66c9f8063572324bfde69c01d2eda3cb026425bcb8dc16ebfc75779e0a66d595f672501cfdafbac18a8a613b84b1d8e670ba
SHA512
64b2756169444a865afb20c6fec2b4534f6ae36082cf517c882c8e5e6f7335636a8f0da1b8faf476558664da460db20f5d50f526044a4c203bd7874ecd62d945
DIST glibc-2.29.tar.xz 16515488 BLAKE2B
b754e6825176538a2b8ca03fce014f0d87d333dc4d038bf0cda5ee8a2f484cd3ce93ad78ec126737e093ab64b55ceedf04cd08aecb4f8041daaa329e99717afa
SHA512
146bc0769fe853d9edbf93cea7f74c5b3d84d69cb7614c62588e7acdecd1ec789a9d8949f3e8b99f8f36f2ccac740a003bed94f32b07817baf780b06cfeb6ed0
-DIST glibc-9999-patches-12.tar.xz 17652 BLAKE2B
25a35eced3816dad02521b03f291292158e0c2f7c19aa416074d88ec719df9913b2d1e7e225a888a7b1f2455fc476c930f8e4b963d2439a2ba982ee038ce798b
SHA512
4e985100441e761c50d76ee591924d4ed8284e55b186738c1a40001422c2382cdcfa46ac35f747897861a80045f2b92a0cd4639cd603372227d164c47460762a
+DIST glibc-9999-patches-13.tar.xz 18316 BLAKE2B
c55359dda094dabfec85f53e48fcd43985d41211f29c0c3ba0d07c4ce28994f96c334c9fcc2a6b78e64123363253c701ed6e9335f4e74274c984734ac8881731
SHA512
627799f65f79e60ed3a9ba1a499d21e771f1b109934967c9fbdf3300b0c1509ef5382834e63c8ead23ffbaee80becf541da5b25e4e2cfa8f6baa801c3838c69d
diff --git a/sys-libs/glibc/glibc-9999.ebuild
b/sys-libs/glibc/glibc-2.29-r3.ebuild
similarity index 97%
copy from sys-libs/glibc/glibc-9999.ebuild
copy to sys-libs/glibc/glibc-2.29-r3.ebuild
index 0ba2efb974c..f94b65fed35 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-2.29-r3.ebuild
@@ -20,8 +20,7 @@ if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://sourceware.org/git/glibc.git"
inherit git-r3
else
- #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc
~ppc64 ~s390 ~sh ~sparc ~x86"
- KEYWORDS=""
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64
~riscv ~s390 ~sh ~sparc ~x86"
SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
fi
@@ -30,12 +29,12 @@ RELEASE_VER=${PV}
GCC_BOOTSTRAP_VER=20180511
# Gentoo patchset
-PATCH_VER=12
+PATCH_VER=4
SRC_URI+="
https://dev.gentoo.org/~slyfox/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
SRC_URI+=" multilib? (
https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
)"
-IUSE="audit caps cet compile-locales custom-cflags doc gd headers-only
+multiarch multilib nscd profile selinux +ssp +static-libs suid systemtap test
vanilla"
+IUSE="audit caps cet compile-locales doc gd headers-only +multiarch multilib
nscd profile selinux +ssp suid systemtap test vanilla"
# Minimum kernel version that glibc requires
MIN_KERN_VER="3.2.0"
@@ -357,18 +356,11 @@ setup_flags() {
ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
ASFLAGS=${ASFLAGS_BASE}
- # Allow users to explicitly avoid flag sanitization via
- # USE=custom-cflags.
- if ! use custom-cflags; then
- # Over-zealous CFLAGS can often cause problems. What may work
for one
- # person may not work for another. To avoid a large influx of
bugs
- # relating to failed builds, we strip most CFLAGS out to ensure
as few
- # problems as possible.
- strip-flags
- # Lock glibc at -O2; we want to be conservative here.
- filter-flags '-O?'
- append-flags -O2
- fi
+ # Over-zealous CFLAGS can often cause problems. What may work for one
+ # person may not work for another. To avoid a large influx of bugs
+ # relating to failed builds, we strip most CFLAGS out to ensure as few
+ # problems as possible.
+ strip-flags
strip-unsupported-flags
filter-flags -m32 -m64 '-mabi=*'
@@ -390,9 +382,10 @@ setup_flags() {
CBUILD_OPT=${CTARGET_OPT}
fi
- # glibc's headers disallow -O0 and fail at build time:
- # include/libc-symbols.h:75:3: #error "glibc cannot be compiled
without optimization"
- replace-flags -O0 -O1
+ # Lock glibc at -O2; we want to be conservative here.
+ # -fno-strict-aliasing is to work around #155906.
+ filter-flags '-O?'
+ append-flags -O2 -fno-strict-aliasing
filter-flags '-fstack-protector*'
}
@@ -1375,12 +1368,6 @@ src_install() {
fi
foreach_abi glibc_do_src_install
-
- if ! use static-libs ; then
- elog "Not installing static glibc libraries"
- find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
- fi
-
src_strip
}
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index 0ba2efb974c..0b6964c6a3b 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -30,7 +30,7 @@ RELEASE_VER=${PV}
GCC_BOOTSTRAP_VER=20180511
# Gentoo patchset
-PATCH_VER=12
+PATCH_VER=13
SRC_URI+="
https://dev.gentoo.org/~slyfox/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
SRC_URI+=" multilib? (
https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
)"