From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A4D32138334 for ; Thu, 18 Apr 2019 23:45:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6E029E0896; Thu, 18 Apr 2019 23:45:20 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 35BD3E0896 for ; Thu, 18 Apr 2019 23:45:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4D83D3418B5 for ; Thu, 18 Apr 2019 23:45:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 31993567 for ; Thu, 18 Apr 2019 23:45:16 +0000 (UTC) From: "Andreas K. Hüttel" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas K. Hüttel" Message-ID: <1555631111.08ac6a89ea72d4cdcb02383410b58e76e69913a4.dilfridge@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/glibc/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/glibc/glibc-2.29-r2.ebuild sys-libs/glibc/glibc-9999.ebuild X-VCS-Directories: sys-libs/glibc/ X-VCS-Committer: dilfridge X-VCS-Committer-Name: Andreas K. Hüttel X-VCS-Revision: 08ac6a89ea72d4cdcb02383410b58e76e69913a4 X-VCS-Branch: master Date: Thu, 18 Apr 2019 23:45:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 040d7c46-85db-48af-bd6c-529724946801 X-Archives-Hash: be392810416646818c4c0f861ff8010a commit: 08ac6a89ea72d4cdcb02383410b58e76e69913a4 Author: Andreas K. Hüttel gentoo org> AuthorDate: Thu Apr 18 23:44:46 2019 +0000 Commit: Andreas K. Hüttel gentoo org> CommitDate: Thu Apr 18 23:45:11 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08ac6a89 sys-libs/glibc: Fix headers-only cross-build for riscv Package-Manager: Portage-2.3.63, Repoman-2.3.12 Signed-off-by: Andreas K. Hüttel gentoo.org> sys-libs/glibc/glibc-2.29-r2.ebuild | 37 ++++++++++++++++++------------------- sys-libs/glibc/glibc-9999.ebuild | 37 ++++++++++++++++++------------------- 2 files changed, 36 insertions(+), 38 deletions(-) diff --git a/sys-libs/glibc/glibc-2.29-r2.ebuild b/sys-libs/glibc/glibc-2.29-r2.ebuild index 093ffc207eb..fe9feab7f75 100644 --- a/sys-libs/glibc/glibc-2.29-r2.ebuild +++ b/sys-libs/glibc/glibc-2.29-r2.ebuild @@ -1006,25 +1006,6 @@ glibc_headers_configure() { popd >/dev/null fi - case ${CTARGET} in - riscv*) - # 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. - headers_only_arch_CPPFLAGS+=( - -D__riscv_xlen=64 - -D__riscv_flen=64 - -D__riscv_float_abi_double=1 - -D__riscv_atomic=1 - ) ;; - esac - local myconf=() myconf+=( --disable-sanity-checks @@ -1042,6 +1023,24 @@ glibc_headers_configure() { # Nothing is compiled here which would affect the headers for the target. # So forcing CC/CFLAGS is sane. local headers_only_CC=$(tc-getBUILD_CC) + + case ${CTARGET} in + riscv*) + # 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. + # It's not sufficient to shove the flags into CPPFLAGS, they need + # to really go *everywhere*. + headers_only_CC="${headers_only_CC} -D__riscv_xlen=64 -D__riscv_flen=64 -D__riscv_float_abi_double=1 -D__riscv_atomic=1" + ;; + esac + local headers_only_CFLAGS="-O1 -pipe" local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" local headers_only_LDFLAGS="" diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index 142153734f9..20846e05faf 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -1007,25 +1007,6 @@ glibc_headers_configure() { popd >/dev/null fi - case ${CTARGET} in - riscv*) - # 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. - headers_only_arch_CPPFLAGS+=( - -D__riscv_xlen=64 - -D__riscv_flen=64 - -D__riscv_float_abi_double=1 - -D__riscv_atomic=1 - ) ;; - esac - local myconf=() myconf+=( --disable-sanity-checks @@ -1043,6 +1024,24 @@ glibc_headers_configure() { # Nothing is compiled here which would affect the headers for the target. # So forcing CC/CFLAGS is sane. local headers_only_CC=$(tc-getBUILD_CC) + + case ${CTARGET} in + riscv*) + # 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. + # It's not sufficient to shove the flags into CPPFLAGS, they need + # to really go *everywhere*. + headers_only_CC="${headers_only_CC} -D__riscv_xlen=64 -D__riscv_flen=64 -D__riscv_float_abi_double=1 -D__riscv_atomic=1" + ;; + esac + local headers_only_CFLAGS="-O1 -pipe" local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" local headers_only_LDFLAGS=""