Skip to content

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

Open
@sternenseemann

Description

@sternenseemann

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
;;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions