在 2006-06-25日的 15:29 +0800,Zhang Weiwu写道: > an example of trying to run gcc with -m64 on 32bit system: > > sappho ~ # touch abc #creates 0byte file abc > sappho ~ # gcc -O2 -m64 -mcpu=ultrasparc -fomit-frame-pointer -pipe abc > /usr/lib/gcc/sparc-unknown-linux-gnu/3.4.4/../../../crt1.o(.text+0x10): > In function `_start': > : undefined reference to `main' > /usr/lib/gcc/sparc-unknown-linux-gnu/3.4.4/../../../crt1.o(.text+0x1c): > In function `_start': > : undefined reference to `main' > collect2: ld returned 1 exit status >
How stupid. I pasted the result without thinking. My idea is first to test empty file to see if gcc can actually run instead of quitting immediatly. The output is actually very sane, empty files don't have main(). Shame! Hope my CS lecturer (when I was a CS student) didn't see this post. Here is a not-so-stupid test: sappho tmp # gcc -O2 -m64 -mcpu=ultrasparc -fomit-frame-pointer -pipe helloworld.c helloworld.c:1: error: -m64 is not supported by this configuration helloworld.c:1: error: -mlong-double-64 not allowed with -m64 -- [email protected] mailing list
