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.
Currently, GCC will generate an A.OUT executable (or DLL) if it is given the
-ooption w/o specifying the extension of the output file and there is also no-Zomfoption on the GCC command line. Can be easily reproduced with this: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
-Zomfpresence.This bug affects all
configure-based projects that compileconftest.cfiles not only to check for compiler errors but also to run them afterwards: an attempt to run an A.OUTconftestexecutable will end up inshinterpreting it as a shell script with a subsequent weird execution failure and configure abortion.