[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unable to build Gforth 0.7.9 on GNU/Linux ARM
From: |
Bernd Paysan |
Subject: |
Re: Unable to build Gforth 0.7.9 on GNU/Linux ARM |
Date: |
Fri, 20 Dec 2024 00:08:07 +0100 |
Am Donnerstag, 19. Dezember 2024, 21:57:15 Mitteleuropäische Normalzeit
schrieb shtps via Gforth discussion and announcements:
> Hello
>
> I am unable to build gforth-0.7.9_20241211 on GNU/Linux (Debian 12) with a
> Samsung's Exynos 5422 8-core 32bit ARMv7 CPU.
>
> $ uname -a
> Linux odroid 6.3.1-armmp-lpae #exynos5 SMP PREEMPT Mon May 8 15:27:00 UTC
> 2023 armv7l GNU/Linux
>
> I've followed the instructions in INSTALL.md for the tarball build with the
> default options. ./configure succeeds but make fails with:
>
> make[1]: Entering directory '/home/shtps/gforth-0.7.9_20241211/engine'
> CC -o io.o io.c
> cc1: error: ‘-mfloat-abi=hard’: selected architecture lacks an FPU
> make[1]: *** [Makefile:142: io.o] Error 1
> make[1]: Leaving directory '/home/shtps/gforth-0.7.9_20241211/engine'
> make: *** [Makefile:1457: engine/io.o] Error 2
>
> I've attempted to solve this by modifying configure.ac. I've changed the
> $host_cpu switch statement with the CFLAGS for gnueabihf from
>
> CFLAGS="$CFLAGS -marm -march=armv6"
>
> to
>
> CFLAGS="$CFLAGS -mcpu=generic-armv7-a"
>
> With this I was able to get it to proceed the build, however I now get a
> segfault during what seems to be the image generation for gforth-light.fi.
> I also tried various other flags, like -mcpu=native and various flags with
> and without hard floating point and also soft floating point. If the build
> proceeds without compiler errors the same image generation part always
> segfaults.
>
> Attached you will find the logs for both the defaults and with my custom
> CFLAGS listed above.
>
> Any idea what the issue may be?
From the configure script, which modifies the CFLAGS for Android (but not
Linux), I would suggest:
CFLAGS="$CFLAGS -march=armv7-a -mfloat-abi=softfp -mfpu=vfp"
This works on a wide range of Android phone CPUs, of which that Exynos is one.
That snapshot (20241211) had a problem with an uninitialized variable, so try
the latest one (20241218).
--
Bernd Paysan
"If you want it done right, you have to do it yourself"
net2o id: kQusJzA;7*?t=uy@X}1GWr!+0qqp_Cn176t4(dQ*
https://net2o.de/
signature.asc
Description: This is a digitally signed message part.