antlr3 C runtime generates incorrect ABI flags for non x86 with gcc
- Dominant language
- Java
- Stars
- 253
- Forks
- 178
- PR merge metrics
- No merged PRs in 30d
Description
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](https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#x86-Options) for `-m32` and `-m64`.
This is the offending code:
https://github.com/antlr/antlr3/blob/5c2a916a10139cdb5c7c8851ee592ed9c3b3d4ff/runtime/C/configure.ac#L93-L108
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with runtime/C/configure.ac lines 93-108 and compare the ABI flag logic with the GCC manual linked in the issue. Validate configure behavior on aarch64 and on a 32-bit non-x86 architecture; done means non-x86 builds no longer receive inappropriate -m64 or -m32 flags while x86 behavior remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100