Bug 59196 - ./configure --with-cpu is broken for some m68k targets
Summary: ./configure --with-cpu is broken for some m68k targets
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.6.4
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-19 20:56 UTC by Miro Kropacek
Modified: 2013-11-20 07:03 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miro Kropacek 2013-11-19 20:56:51 UTC
I've found a small bug in GCC source code. At line 631 in gcc-4.6.4/gcc/config/m68k/m68k.c is:

m68k_tune_flags = all_devices[dev]->flags;

but should be:

m68k_tune_flags = all_devices[dev].flags;

you can see this if you configure gcc with --with-cpu=m68020-60 (or
-40).
Comment 1 Mikael Pettersson 2013-11-19 22:17:53 UTC
Yep, reproduced with --target=m68k-elf --with-cpu=m68020-60, affects 4.7.3, 4.8.2, and current 4.9/trunk (didn't check older unmaintained versions).

Care to send a patch (against trunk) to gcc-patches?
Comment 2 Miro Kropacek 2013-11-19 22:40:53 UTC
Done. Thanks for testing!
Comment 3 Jeffrey A. Law 2013-11-20 07:03:14 UTC
Patch from Miro installed on trunk.