public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* m68k multilib for -m68020-60
@ 2018-09-28 14:20 Miro Kropáček
  0 siblings, 0 replies; only message in thread
From: Miro Kropáček @ 2018-09-28 14:20 UTC (permalink / raw)
  To: gcc-help

Hi,

I've been using for many years gcc 4.6.4 configured for three targets:
m68000, m68020-60 and mcpu=5475 in three different configurations (gcc
compiled and producing code for each one by default).

So in one of the configurations I have been having a 5475 compiled gcc
(producing -mcpu=5475 code by default) and m68020-60 and m68000 as
multilibs.

To achieve that all I had to do was to pass --with-cpu=5475 and define
MULTILIB_* options like this:

MULTILIB_OPTIONS = m68000/m68020-60
MULTILIB_DIRNAMES = m68000 m68020-60

However this has stopped to work some time ago as it doesn't work in 7.x at
least (or to be precise, leading to corrupted multilibs where m68000 folder
would be omitted and overwriting others). I have noticed that m68k have
started using a slightly different approach (many years ago actually but I
didn't pay attention to it as my use case worked), using M68K_MLIB_CPU
predicates and optional M68K_MLIB_OPTIONS & M68K_MLIB_DIRNAMES.

This is pretty cool however I don't understand how I'm supposed to generate
the -m68020-60 target? The closest I could get is to generate a m68020
target using:

M68K_MLIB_CPU += && ((CPU ~ "^m68000") || (CPU ~ "^m68020") || (CPU ~
"^mcf5475"))

Since "CPU" can be only one of the 'physical' CPUs, not the whole 68020-60
range.

For the configuration which produces m68020-60 gcc I can still pass
--with-cpu=m68020-60 and it works (producing -m68020-60 libraries in
/usr/lib and the rest in /usr/lib/m68000 and /usr/lib/m5475) however for
the other configurations (m68000, m5475) it produces (naturally) only
/usr/lib/m68000 and /usr/lib/m68020 (with -m68020 code).

Can somebody give me a hint here? In theory I could add it as a new device
into m68k-devices.def but seems like a hack to me.

Thank you,
Miro

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-09-27 18:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-28 14:20 m68k multilib for -m68020-60 Miro Kropáček

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).