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

Re: [MiNT] Compilation issues with GCC 4.7



On 01/15/13 20:19, Vincent Rivière wrote:
Hello.

As you may know, GCC 4.7 was released 10 months ago. But I didn't update my cross tools. The main reason is because it causes trouble to compile some FreeMiNT assembler files.

Basically, GCC 4.7 messes the CPU options.
When you pass for example -m68020 to the gcc command line with older GCC, it is passed "as is" to as. But GCC 4.7 transforms it to -mcpu=68020 when passing it to as, and it matters.

Then this causes trouble in the binutils.
There is a subtle difference of concept between architecture and cpu, and I didn't figure how it was supposed to work. Maybe, that's just buggy.

Basically, architecture and cpu can be passed on the gas command line. Then then can be overridden in the sources with .arch and .cpu. Unfortunately, specifying one does not automatically set the other one, so in order to be reliable in all cases, both have to be specified.

I have asked help about that odd behavior on the binutils mailing list, but with poor success:
http://sourceware.org/ml/binutils/2013-01/msg00199.html

My initial plan was to fix those compilation issues for the FreeMiNT 1.18 release, but I don't know what the right fix is. We could add both .arch/.cpu in the assembler files, but that may be a suboptimal solution if the problem is actually caused by a gcc/binutils bug.

Shall we postpone this problem after the 1.18 release?


I think so. There's nothing needed in GCC 4.7.

Alan.