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

gcc 4.3 and -m68020



Hi All,

I've run into a problem with gcc 4.3-20070831 -- it can't assemble some .S 
files because of the way it invokes gas (or so it seems).

I used the same command to run various compilers (all using binutils 
2.17.50.0.18) and found that depending on gcc version, cc1 is invoked 
differently and this affects gas. So, for gcc 3.4, 4.0, 4.1, and 4.2,

$ m68k-linux-gnu-gcc -c -o /tmp/f.o /tmp/f.S

will invoke cc1 like this,

/Volumes/btc-0.11/gcc-3.4.6/libexec/gcc/m68k-linux-gnu/3.4.6/cc1 -E -lang-asm -quiet -D__HAVE_68881__ /tmp/f.S -o /tmp/ccUyYh6E.s

but the gcc-4.3 snapshot will invoke cc1 like this,

/Volumes/btc-0.11/gcc-4.3-20070831/libexec/gcc/m68k-linux-gnu/4.3.0/cc1 -E -lang-asm -quiet /tmp/f.S -m68020 -fno-directives-only -o /tmp/ccinyZCH.s

Note the -m68020 option. (I obtained these command lines from ps, 
while cc1 was blocked reading on /tmp/f.S which is a fifo. There must be 
an easier way? I've no idea what the gas command lines looked like...)

All of the compilers I tested work well enough to build linux-2.6.22-m68k 
and glibc-2.3.6-13. Only the gcc-4.3 snapshot chokes on the .S files in 
Emile -- this one, for example:

http://emile.cvs.sourceforge.net/emile/emile/second/MMU030_asm.S?revision=1.7&view=markup

Here's the failure:

$ /Volumes/btc-0.11/gcc-4.3-20070831/bin/m68k-linux-gnu-gcc -c -o MMU030_asm.o MMU030_asm.S
MMU030_asm.S: Assembler messages:
MMU030_asm.S:11: Error: selected processor does not have all features of selected architecture

Passing -m68030 or -mcpu=68030 to gcc fixes that. So I'm left wondering, 
is it now necessary to pass -m680x0 to gcc when assembling in order to be 
portable across gcc releases? (-mcpu is not portable apparently.) And is 
the .cpu directive in the .S files meaningful or useful any more?

-f



Reply to: