antlr3 icon indicating copy to clipboard operation
antlr3 copied to clipboard

antlr3 C runtime generates incorrect ABI flags for non x86 with gcc

Open sternenseemann opened this issue 4 years ago • 1 comments
trafficstars

If --enable-64bit and --enable-abiflags are passed to the configure script, it'll decide on passing -m64. This option however implies x86 and will fail e. g. on aarch64. A similar thing will probably also happen on 32 bit non-x86 architectures when --enable-64bit is not passed.

See the gcc manual for -m32 and -m64.

This is the offending code:

https://github.com/antlr/antlr3/blob/5c2a916a10139cdb5c7c8851ee592ed9c3b3d4ff/runtime/C/configure.ac#L93-L108

sternenseemann avatar Aug 07 '21 09:08 sternenseemann

Run into this while building OpenModelica on aarch64 and manually changed GCCABIFLAGS="-m64" to GCCABIFLAGS="-march=armv8-a".

aptok avatar Dec 20 '21 11:12 aptok