[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] '-e' parameter in gcc



One project I'm playing with uses configure in this way to check for default output (stripped):

m68k-atari-mint-gcc -nostdlib -e main conftest.c

conftest.c is classic dummy file with main() defined. It fails with:

/home/mikro/gnu-tools/lib/gcc/m68k-atari-mint/4.5.1/../../../../m68k-atari-mint/bin/ld: warning: cannot find entry symbol main; defaulting to 000000e4
/tmp/cc4HfuQ9.o:/tmp/cc4HfuQ9.o:(.text+0x6): undefined reference to `___main'
collect2: ld returned 1 exit status

what configure interprets as inability to create executable files. However, on Linux, it works flawesly (creates a.out but of course, it crashes when executed, but that's not the point here).

What causes it and how to solve it? Should I report it as bad practice for configure script to authors? (I don't know why they do it in this way, it's a system library, so maybe it's part of generic CFLAGS/LDFLAGS).

--
MiKRO / Mystic Bytes
http://mikro.atari.org