Good evening,
Thanks for your reply.
El 11/6/25 a las 19:55, Segher Boessenkool escribió:
On Wed, Jun 11, 2025 at 07:38:39PM +0200, Jose Gomez via Gcc-help wrote:
Good evening,
I am trying to cross compile gcc 14 (c, c++) in an Intel platform for
armhf and arm64. I am trying with multiple option sets without success.
Can somebody help me with this, please?
It helps if you tell us what you tried, what that returns in, and what
you expected or wanted instead?
I tried to cross compile in Debian Bookworm in Intel.
I installed
binutils-arm-linux-gnueabi \
linux-libc-dev-armhf-cross \
crossbuild-essential-armhf \
build-essential \
gcc-arm-linux-gnueabihf \
g++-arm-linux-gnueabihf \
libc6-dev-armhf-cross \
dpkg-dev \
debhelper \
fakeroot \
devscripts \
dh-make \
flex \
bison \
libgmp-dev \
libmpfr-dev \
libmpc-dev \
libgmp-dev:armhf \
libmpfr-dev:armhf \
libmpc-dev:armhf \
libunwind-dev:armhf \
zlib1g-dev \
wget
The command I run was:
SOURCE_DIR=~/gcc-host/source
BUILD_DIR="~/gcc-host/build/armhf"
INSTALL_DIR="~/gcc-host/install/armhf"
GCC_VERSION=14.2.0
MACHTYPE=x86_64-linux-gnu
cd "$BUILD_DIR"
$SOURCE_DIR/gcc-$GCC_VERSION/configure --prefix="$INSTALL_DIR"
--build=$MACHTYPE --host=arm-linux-gnueabihf
--target=arm-linux-gnueabihf --enable-languages=c,c++ --enable-multilib
--with-sysroot=/usr/arm-linux-gnueabihf
--with-native-system-header-dir=/include
make V=1 -j$(nproc)
Make command stops:
arm-linux-gnueabihf-gcc -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC
-fno-inline -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector
-fPIC -fno-inline -I. -I. -I../.././gcc
-I/gcc-host/source/gcc-14.2.0/libgcc
-I/gcc-host/source/gcc-14.2.0/libgcc/.
-I/gcc-host/source/gcc-14.2.0/libgcc/../gcc
-I/gcc-host/source/gcc-14.2.0/libgcc/../include -DHAVE_CC_TLS -o
pr-support.o -MT pr-support.o -MD -MP -MF pr-support.dep -fexceptions -c
/gcc-host/source/gcc-14.2.0/libgcc/config/arm/pr-support.c
-fvisibility=hidden -DHIDE_EXPORTS
/gcc-host/source/gcc-14.2.0/libgcc/config/arm/pr-support.c: In function
'__gnu_unwind_execute':
/gcc-host/source/gcc-14.2.0/libgcc/config/arm/pr-support.c:260:45:
error: '_UVRSC_PAC' undeclared (first use in this function); did you
mean '_UVRSC_FPA'?
260 | if (_Unwind_VRS_Pop (context, _UVRSC_PAC, 0,
_UVRSD_UINT32)
| ^~~~~~~~~~
| _UVRSC_FPA
/gcc-host/source/gcc-14.2.0/libgcc/config/arm/pr-support.c:260:45: note:
each undeclared identifier is reported only once for each function it
appears in
make[2]: *** [/gcc-host/source/gcc-14.2.0/libgcc/shared-object.mk:14:
pr-support.o] Error 1
make[2]: *** Waiting for unfinished jobs....
config.status: creating auto-target.h
config.status: auto-target.h is unchanged
config.status: executing default commands
In file included from
/gcc-host/source/gcc-14.2.0/libgcc/config/arm/unwind-arm.c:154:
/gcc-host/source/gcc-14.2.0/libgcc/unwind-arm-common.inc: In function
'get_eit_entry':
/gcc-host/source/gcc-14.2.0/libgcc/unwind-arm-common.inc:374:29:
warning: cast discards 'const' qualifier from pointer target type
[-Wcast-qual]
374 | ucbp->pr_cache.ehtp = (_Unwind_EHT_Header *)&eitp->content;
| ^
/gcc-host/source/gcc-14.2.0/libgcc/config/arm/unwind-arm.c: In function
'_Unwind_VRS_Get':
/gcc-host/source/gcc-14.2.0/libgcc/config/arm/unwind-arm.c:188:10:
error: '_UVRSC_PAC' undeclared (first use in this function); did you
mean '_UVRSC_FPA'?
188 | case _UVRSC_PAC:
| ^~~~~~~~~~
| _UVRSC_FPA
/gcc-host/source/gcc-14.2.0/libgcc/config/arm/unwind-arm.c:188:10: note:
each undeclared identifier is reported only once for each function it
appears in
/gcc-host/source/gcc-14.2.0/libgcc/config/arm/unwind-arm.c: In function
'_Unwind_VRS_Set':
/gcc-host/source/gcc-14.2.0/libgcc/config/arm/unwind-arm.c:223:10:
error: '_UVRSC_PAC' undeclared (first use in this function); did you
mean '_UVRSC_FPA'?
223 | case _UVRSC_PAC:
| ^~~~~~~~~~
| _UVRSC_FPA
/gcc-host/source/gcc-14.2.0/libgcc/config/arm/unwind-arm.c: In function
'_Unwind_VRS_Pop':
/gcc-host/source/gcc-14.2.0/libgcc/config/arm/unwind-arm.c:267:10:
error: '_UVRSC_PAC' undeclared (first use in this function); did you
mean '_UVRSC_FPA'?
267 | case _UVRSC_PAC:
| ^~~~~~~~~~
| _UVRSC_FPA
make[2]: *** [/gcc-host/source/gcc-14.2.0/libgcc/shared-object.mk:14:
unwind-arm.o] Error 1
make[3]: Leaving directory
'/gcc-host/build/armhf/arm-linux-gnueabihf/libgcc'
make[2]: Leaving directory
'/gcc-host/build/armhf/arm-linux-gnueabihf/libgcc'
make[1]: *** [Makefile:14662: all-target-libgcc] Error 2
make[1]: Leaving directory '/gcc-host/build/armhf'
make: *** [Makefile:1062: all] Error 2
I hope it can be helpful
And something that makes us believe you actually read the installation
instructions, and tried to follow them, of course ;-)
<https://gcc.gnu.org/install/>
Segher