Skip to content

Prevent generation of a.out executables and DLLs #24

@dmik

Description

@dmik

Currently, GCC will generate an A.OUT executable (or DLL) if it is given the -o option w/o specifying the extension of the output file and there is also no -Zomf option on the GCC command line. Can be easily reproduced with this:

echo "int main() { return 0; }" > test.c
gcc -o test test.c

First, it is a bit weird that changing the output file extension changes the binary format. Second, there is no point in generating A.OUT binaries at all on OS/2 (at least until we fix the A.OUT loader for the OS/2 kernel which frozen in its deep alpha stage). We should make GCC always generate LX binaries, regardless of the extension or -Zomf presence.

This bug affects all configure-based projects that compile conftest.c files not only to check for compiler errors but also to run them afterwards: an attempt to run an A.OUT conftest executable will end up in sh interpreting it as a shell script with a subsequent weird execution failure and configure abortion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions