Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 686248 - >=cross-riscv64-unknown-linux-gnu/glibc-2.28 fails crossdev bootstrap (USE=headers-only): sysdeps/riscv/bits/wordsize.h:28:3: error: #error "rv32i-based targets are not supported"
Summary: >=cross-riscv64-unknown-linux-gnu/glibc-2.28 fails crossdev bootstrap (USE=he...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://sourceware.org/PR24577
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-05-18 19:08 UTC by Sergei Trofimovich (RETIRED)
Modified: 2019-09-01 17:05 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
cross-riscv64-unknown-linux-gnu:glibc-2.28-r6:20190518-190346.log (cross-riscv64-unknown-linux-gnu:glibc-2.28-r6:20190518-190346.log,949.49 KB, text/x-log)
2019-05-18 19:08 UTC, Sergei Trofimovich (RETIRED)
Details
glibc-2.28-cppflags.patch (glibc-2.28-cppflags.patch,963 bytes, patch)
2019-05-18 19:13 UTC, Sergei Trofimovich (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-18 19:08:00 UTC
Created attachment 577214 [details]
cross-riscv64-unknown-linux-gnu:glibc-2.28-r6:20190518-190346.log

crossdev riscv64-unknown-linux-gnu
which runs equivalent of
    LANG=C MAKEOPTS=-j1 USE=headers-only ebuild glibc-2.28-r6.ebuild clean install
fails as:

x86_64-pc-linux-gnu-gcc -E -dM -MD -MP -MF /tmp/portage/cross-riscv64-unknown-linux-gnu/glibc-2.28-r6/work/build-default-riscv64-unknown-linux-gnu-headers/bits/stdio_lim.dT -MT '/tmp/portage/cross-riscv64-unknown-linux-gnu/glibc-2.28-r6/work/build-default-riscv64-unknown-linux-gnu-headers/bits/stdio_lim.h /tmp/portage/cross-riscv64-unknown-linux-gnu/glibc-2.28-r6/work/build-default-riscv64-unknown-linux-gnu-headers/bits/stdio_lim.d'    \
       -I../include -I/tmp/portage/cross-riscv64-unknown-linux-gnu/glibc-2.28-r6/work/build-default-riscv64-unknown-linux-gnu-headers/stdio-common  -I/tmp/portage/cross-riscv64-unknown-linux-gnu/glibc-2.28-r6/work/build-default-riscv64-unknown-linux-gnu-headers  -I../sysdeps/unix/sysv/linux/riscv/rv64  -I../sysdeps/unix/sysv/linux/riscv  -I../sysdeps/riscv/nptl  -I../sysdeps/unix/sysv/linux/generic  -I../sysdeps/unix/sysv/linux/wordsize-64  -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux  -I../sysdeps/nptl  -I../sysdeps/pthread  -I../sysdeps/gnu  -I../sysdeps/unix/inet  -I../sysdeps/unix/sysv  -I../sysdeps/unix  -I../sysdeps/posix  -I../sysdeps/riscv/rv64/rvd  -I../sysdeps/riscv/rv64/rvf  -I../sysdeps/riscv/rvf  -I../sysdeps/riscv/rvd  -I../sysdeps/riscv/rv64  -I../sysdeps/riscv  -I../sysdeps/init_array  -I../sysdeps/ieee754/ldbl-128  -I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754/flt-32  -I../sysdeps/wordsize-64  -I../sysdeps/ieee754  -I../sysdeps/generic  -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/include -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/include-fixed -isystem /usr/riscv64-unknown-linux-gnu/usr/include -xc - -o /tmp/portage/cross-riscv64-unknown-linux-gnu/glibc-2.28-r6/work/build-default-riscv64-unknown-linux-gnu-headers/bits/stdio_lim.hT
In file included from ../posix/bits/posix1_lim.h:27,
                 from <stdin>:1:
../sysdeps/riscv/bits/wordsize.h:22:3: error: #error unsupported ABI
   22 | # error unsupported ABI
      |   ^~~~~
../sysdeps/riscv/bits/wordsize.h:28:3: error: #error "rv32i-based targets are not supported"
   28 | # error "rv32i-based targets are not supported"
      |   ^~~~~
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-18 19:13:03 UTC
Created attachment 577216 [details, diff]
glibc-2.28-cppflags.patch

glibc-2.28-cppflags.patch allows bootstrap to succeed.
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-18 19:27:22 UTC
Filed bug upstream as https://sourceware.org/PR24577
Comment 3 Larry the Git Cow gentoo-dev 2019-07-25 22:32:00 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=daed4831fcde3f2144b5771e0077256d7e1df92a

commit daed4831fcde3f2144b5771e0077256d7e1df92a
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-07-25 22:03:50 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-07-25 22:31:53 +0000

    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@gentoo.org>

 sys-libs/glibc/Manifest             |    3 +-
 sys-libs/glibc/glibc-2.29-r3.ebuild | 1460 +++++++++++++++++++++++++++++++++++
 sys-libs/glibc/glibc-9999.ebuild    |    2 +-
 3 files changed, 1463 insertions(+), 2 deletions(-)
Comment 4 Larry the Git Cow gentoo-dev 2019-09-01 16:14:53 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=7283a01fc3dd7523793c28d8acd04ce7fd049389

commit 7283a01fc3dd7523793c28d8acd04ce7fd049389
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-09-01 16:08:26 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-09-01 16:14:27 +0000

    crossdev: set --without-headers by default
    
    In https://sourceware.org/PR24577 we discovered that riscv
    can't really install libc headers as it needs a cross-compiler.
    
    Before this change we had the following default build order:
    - cross-binutils
    - kernel/libc headers
    - stage1 gcc
    - glibc
    - stage2 gcc
    
    After this change it's:
    - cross-binutils
    - stage1 gcc
    - kernel headers
    - glibc
    - stage2 gcc
    
    Users can still fors headers installation with '--ith-headers' option.
    
    Bug: https://sourceware.org/PR24577
    Bug: https://bugs.gentoo.org/692052
    Bug: https://bugs.gentoo.org/686248
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 crossdev | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
Comment 5 Larry the Git Cow gentoo-dev 2019-09-01 16:50:47 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8893df0d11de029e26b31bc3310e43ccb6b35dc3

commit 8893df0d11de029e26b31bc3310e43ccb6b35dc3
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-09-01 16:47:47 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-09-01 16:50:41 +0000

    sys-libs/glibc: revert CPPFLAGS fix for cross-compilers
    
    In https://sourceware.org/PR24577 we discovered that riscv
    can't really install libc headers as it needs a cross-compiler.
    
    This revert reintroduces riscv bootstrap on crossdev.
    To workaround it use the -without-headers option until
    it's a crossdev's default.
    
    Bug: https://sourceware.org/PR24577
    Bug: https://bugs.gentoo.org/692052
    Bug: https://bugs.gentoo.org/686248
    Package-Manager: Portage-2.3.74, Repoman-2.3.17
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-libs/glibc/Manifest             |    4 +-
 sys-libs/glibc/glibc-2.29-r5.ebuild | 1473 ++++++++++++++++++++++++++++++++++
 sys-libs/glibc/glibc-2.30-r1.ebuild | 1482 +++++++++++++++++++++++++++++++++++
 sys-libs/glibc/glibc-9999.ebuild    |    2 +-
 4 files changed, 2959 insertions(+), 2 deletions(-)
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2019-09-01 16:51:31 UTC
Reopening until crossdev's --without-headers-by-default gets released.
Comment 7 Larry the Git Cow gentoo-dev 2019-09-01 17:05:54 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d3ba8bbca17e9a7cc21c7211491f3848af92e5d

commit 6d3ba8bbca17e9a7cc21c7211491f3848af92e5d
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-09-01 17:05:37 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-09-01 17:05:48 +0000

    sys-devel/crossdev: bump up to 20190901
    
    Set --without-headers by default
    
    In https://sourceware.org/PR24577 we discovered that riscv
    can't really install libc headers as it needs a cross-compiler.
    
    Before this change we had the following default build order:
    - cross-binutils
    - kernel/libc headers
    - stage1 gcc
    - glibc
    - stage2 gcc
    
    After this change it's:
    - cross-binutils
    - stage1 gcc
    - kernel headers
    - glibc
    - stage2 gcc
    
    Users can still use old headers installation with '--with-headers' option.
    
    Bug: https://sourceware.org/PR24577
    Bug: https://bugs.gentoo.org/692052
    Closes: https://bugs.gentoo.org/686248
    Package-Manager: Portage-2.3.74, Repoman-2.3.17
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-devel/crossdev/Manifest                 |  1 +
 sys-devel/crossdev/crossdev-20190901.ebuild | 36 +++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+)