Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 883769 - sys-devel/gcc: failed to cross-compile for aarch64-unknown-linux-gnu (libgcc2.c:1874:18: error: '__LIBGCC_SF_MAX__' undeclared (first use in this function))
Summary: sys-devel/gcc: failed to cross-compile for aarch64-unknown-linux-gnu (libgcc2...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-30 18:24 UTC by zen
Modified: 2024-01-20 06:04 UTC (History)
2 users (show)

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


Attachments
gcc build log, emerge info (build.7z,56.73 KB, application/x-7z-compressed)
2022-11-30 18:24 UTC, zen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zen 2022-11-30 18:24:40 UTC
Created attachment 838585 [details]
gcc build log, emerge info

I'm following this guide: /wiki/Cross_build_environment and the build fails with the default make.conf which contains ~{ARCH} in the ACCEPT_KEYWORDS field.  Additionally, the following use change was needed to build @system: sys-apps/util-linux -su.

The attached emerge info was from after I made the changes, so it may not be totally relevant, but the build log is from the failed build.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-01 06:54:48 UTC
/usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libgcc/libgcc2.c: In function '__divsc3':
/usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libgcc/libgcc2.c:1874:18: error: '__LIBGCC_SF_MAX__' undeclared (first use in this function)
 1874 | # define RBIG   (__LIBGCC_SF_MAX__ / 2)
      |                  ^~~~~~~~~~~~~~~~~
/usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libgcc/libgcc2.c:2063:23: note: in expansion of macro 'RBIG'
 2063 |       if (FABS (d) >= RBIG)
      |                       ^~~~
/usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libgcc/libgcc2.c:1874:18: note: each undeclared identifier is reported only once for each function it appears in
 1874 | # define RBIG   (__LIBGCC_SF_MAX__ / 2)
      |                  ^~~~~~~~~~~~~~~~~
/usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libgcc/libgcc2.c:2063:23: note: in expansion of macro 'RBIG'
 2063 |       if (FABS (d) >= RBIG)
      |                       ^~~~
/usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libgcc/libgcc2.c:1876:18: error: '__LIBGCC_SF_EPSILON__' undeclared (first use in this function)
 1876 | # define RMIN2  (__LIBGCC_SF_EPSILON__)
      |                  ^~~~~~~~~~~~~~~~~~~~~
/usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libgcc/libgcc2.c:2073:22: note: in expansion of macro 'RMIN2'
 2073 |       if (FABS (d) < RMIN2)
      |                      ^~~~~
/usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libgcc/libgcc2.c:1875:18: error: '__LIBGCC_SF_MIN__' undeclared (first use in this function)
 1875 | # define RMIN   (__LIBGCC_SF_MIN__)
      |                  ^~~~~~~~~~~~~~~~~
/usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libgcc/libgcc2.c:2082:28: note: in expansion of macro 'RMIN'
 2082 |           if (((FABS (a) < RMIN) && (FABS (b) < RMAX2) && (FABS (d) < RMAX2))
      |                            ^~~~
make[2]: *** [Makefile:501: _divsc3.o] Error 1