Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sternenseemann opened this issue Aug 7, 2021 · 1 comment

Comments

@sternenseemann
Copy link

sternenseemann commented Aug 7, 2021

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:

gcc*)
CPPCMNTFLAGS=
if test x"$enable_64bit" = xyes; then
GCCABIFLAGS="-m64"
else
GCCABIFLAGS="-m32"
fi
if test x"$enable_abiflags" = xyes; then
CCFLAGS64=$GCCABIFLAGS
fi
OPTIMFLAGS="-O2"
if test x"$enable_debuginfo" = xyes; then
DEBUGFLAGS="-g"
fi
WARNFLAGS=-Wall
;;

@aptok
Copy link

aptok commented Dec 20, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants