# multilibs -*- mode:Makefile -*-
#
-# Copyright (C) 2007, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2007-2024 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
$(error Error default cpu '$(target_cpu_default)' is not in multilib set '$(M68K_MLIB_CPUS)')
endif
-# Sed arguments that convert mcpu=* arguments into canonical forms.
-# We want to use the legacy m68* options instead of the new -mcpu=68*
-# options when compiling multilibs because the former are recognised
-# by older binutils.
-CANONICALIZE_OPTIONS = -e 's|mcpu=68|m68|g' -e 's|mcpu=cpu32|mcpu32|g'
-
MULTILIB_DIRNAMES := $(filter-out m$(M68K_MLIB_DEFAULT),$(M68K_MLIB_CPUS))
MULTILIB_OPTIONS := $(shell echo $(MULTILIB_DIRNAMES:m%=mcpu=%) \
- | sed -e 's| |/|g' $(CANONICALIZE_OPTIONS))
+ | sed -e 's| |/|g' )
# Add subtarget specific options & dirs.
MULTILIB_DIRNAMES += $(M68K_MLIB_DIRNAMES)
MULTILIB_MATCHES :=
ifneq ($(M68K_ARCH),cf)
-# Map the new-style options to the legacy m68k ones.
-MULTILIB_MATCHES += m68000=mcpu?68000 m68000=march?68000 m68000=mc68000 \
- m68000=m68302 \
- m68020=mcpu?68020 m68020=march?68020 m68020=mc68020 \
- m68030=mcpu?68030 m68030=march?68030 \
- m68040=mcpu?68040 m68040=march?68040 \
- m68060=mcpu?68060 m68060=march?68060 \
- mcpu32=mcpu?cpu32 mcpu32=march?cpu32 mcpu32=m68332
+# Map -march=* options to the representative -mcpu=* option.
+MULTILIB_MATCHES += mcpu?68000=march?68000 \
+ mcpu?68020=march?68020 \
+ mcpu?68030=march?68030 \
+ mcpu?68040=march?68040 \
+ mcpu?68060=march?68060 \
+ mcpu?cpu32=march?cpu32
endif
ifneq ($(M68K_ARCH),m68k)
MULTILIB_MATCHES += \
$(call M68K_AWK, \
(CPU_NAME != MLIB) $(M68K_MLIB_CPU), \
- (match(MLIB, "^68") || MLIB == "cpu32" \
- ? "m"MLIB"=mcpu?"CPU_NAME \
- : "mcpu?"MLIB"=mcpu?"CPU_NAME))
+ ("mcpu?"MLIB"=mcpu?"CPU_NAME))
MULTILIB_EXCEPTIONS :=
# Remove the default CPU from the explicit exceptions.
MULTILIB_EXCEPTIONS := \
$(patsubst mcpu=$(M68K_MLIB_DEFAULT)/%,%,$(MULTILIB_EXCEPTIONS))
-
-# Convert all options to canonical form.
-MULTILIB_EXCEPTIONS := $(shell echo $(MULTILIB_EXCEPTIONS) | \
- sed $(CANONICALIZE_OPTIONS))
-
-LIBGCC = stmp-multilib
-INSTALL_LIBGCC = install-multilib