On Wed, 11 Jun 2025 at 19:00, Basile Starynkevitch <basile@xxxxxxxxxxxxxxxxx> wrote: > > On Wed, 2025-06-11 at 19:38 +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. > > > On which operating system are you compiling GCC? It probably should be easier on > some Linux variant, such as https://debian.org/ > > Some Linux distributions are already providing GCC cross-compilers like the one > you want. > > Current GCC is 15. I would recommend trying to build it. > > > > > Can somebody help me with this, please? > > The first thing to do is to have your source GCC tree different (and outside of) > the build tree. > > On my Debian desktop, the GCC source tree is on /usr/src/Lang/gcc-15.1.0/ and > the build tree is /usr/src/Lang/_Build-gcc-15 > > The configuration options I used are '/usr/src/Lang/gcc-15.1.0/configure' \ > '-v' '--prefix=/usr/local' '--with-gcc-major-version-only' \ > '--program-suffix=-15' '--enable-shared' '--enable-plugin' \ > '--enable-default-pie' '--with-system-zlib' '--disable-multilib' \ > '--with-tune=native' '--enable-checking=release' '--enable-host-shared' \ > '--build=x86_64-linux-gnu' '--host=x86_64-linux-gnu' \ > '--target=x86_64-linux-gnu' 'CFLAGS=-g -O2' 'CXXFLAGS=-g -O2' \ > 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' \ > 'target_alias=x86_64-linux-gnu' '--enable-languages=c,c++,jit,lto,rust' This is not a cross compiler, so not a helpful answer. (Also, most of these options are completely redundant and just add noise) > > > But of course you need to adapt them to your use case. > > Expect a build time of several hours, and expect to fail the first ones. > > Once a build is successful consider running make install or even better > make install DESTDIR=/tmp/gccinstall > > and once you are satisfied, > > sudo cp -va /tmp/gccinstall/usr/local/. /usr/local/. > > > You may want to read https://arxiv.org/abs/1109.0779 Why?! What has that got to do with arm cross compilers? > My current open source project is refpersys.org (inference engine, GPL licensed) What has this got to do with anything?