summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2018-04-03 21:20:45 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2018-04-03 21:21:19 +0100
commit3aa32984919c421909d2796a89f6cefe402c3fd8 (patch)
treee6885a0dce4aa98c4b07fe2221b7b04eb3d60acd /sys-libs
parentsys-libs/glibc: Add support for building RISC-V headers (diff)
downloadgentoo-3aa32984919c421909d2796a89f6cefe402c3fd8.tar.gz
gentoo-3aa32984919c421909d2796a89f6cefe402c3fd8.tar.bz2
gentoo-3aa32984919c421909d2796a89f6cefe402c3fd8.zip
sys-libs/glibc: apply riscv kludge to live ebuild
This pulls in commit from 2.27-r1 "sys-libs/glibc: Add support for building RISC-V headers" Package-Manager: Portage-2.3.28, Repoman-2.3.9
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/glibc/glibc-9999.ebuild17
1 files changed, 17 insertions, 0 deletions
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index 17f8cdafed54..e6d10969e8b3 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -762,6 +762,23 @@ src_prepare() {
sed -i '/CPPFLAGS=.*-mabi/s|.*|:|' ports/sysdeps/mips/preconfigure || die
find ports/sysdeps/mips/ -name Makefile -exec sed -i '/^CC.*-mabi=/s:-mabi=.*:-D_MIPS_SZPTR=32:' {} +
fi
+ if [[ -e sysdeps/riscv/preconfigure ]] ; then
+ # RISC-V interrogates the compiler to determine which target to
+ # build. If building the headers then we don't strictly need a
+ # RISC-V compiler, so the built-in definitions that are provided
+ # along with all RISC-V compiler might not exist. This causes
+ # glibc's RISC-V preconfigure script to blow up. Since we're just
+ # building the headers any value will actually work here, so just
+ # pick the standard one (rv64g/lp64d) to make the build scripts
+ # happy for now -- the headers are all the same anyway so it
+ # doesn't matter.
+ sed -i 's/^ xlen=.*/ xlen=64/g' sysdeps/riscv/preconfigure || die
+ sed -i 's/^ flen=.*/ flen=64/g' sysdeps/riscv/preconfigure || die
+ sed -i 's/^ float_abi=.*/ float_abi=double/g' sysdeps/riscv/preconfigure || die
+ sed -i 's/^ atomic=.*/ atomic=__riscv_atomic/g' sysdeps/riscv/preconfigure || die
+ sed -i 's/^libc_cv_riscv_float_abi=no/libc_cv_riscv_float_abi=d/g' sysdeps/unix/sysv/linux/riscv/configure.ac || die
+ sed -i 's/^libc_cv_riscv_float_abi=no/libc_cv_riscv_float_abi=d/g' sysdeps/unix/sysv/linux/riscv/configure || die
+ fi
fi
default