mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 12:03:41 +08:00
sim: mips: move subtarget defines to top-level configure
We want to kill off mips/configure entirely. Move this small part out now to get started.
This commit is contained in:
parent
0fb6c560ff
commit
2d5700ad4e
@ -246,6 +246,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
|
||||
$(top_srcdir)/m4/sim_ac_platform.m4 \
|
||||
$(top_srcdir)/m4/sim_ac_toolchain.m4 \
|
||||
$(top_srcdir)/frv/acinclude.m4 \
|
||||
$(top_srcdir)/mips/acinclude-top.m4 \
|
||||
$(top_srcdir)/riscv/acinclude.m4 $(top_srcdir)/rx/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
@ -1105,6 +1106,7 @@ SIM_FRV_TRAPDUMP_FLAGS = @SIM_FRV_TRAPDUMP_FLAGS@
|
||||
SIM_HW_CFLAGS = @SIM_HW_CFLAGS@
|
||||
SIM_HW_SOCKSER = @SIM_HW_SOCKSER@
|
||||
SIM_INLINE = @SIM_INLINE@
|
||||
SIM_MIPS_SUBTARGET = @SIM_MIPS_SUBTARGET@
|
||||
SIM_PRIMARY_TARGET = @SIM_PRIMARY_TARGET@
|
||||
SIM_RISCV_BITSIZE = @SIM_RISCV_BITSIZE@
|
||||
SIM_RX_CYCLE_ACCURATE_FLAGS = @SIM_RX_CYCLE_ACCURATE_FLAGS@
|
||||
|
@ -73,3 +73,6 @@ SIM_INLINE = @SIM_INLINE@
|
||||
SIM_HW_CFLAGS = @SIM_HW_CFLAGS@
|
||||
SIM_HW_OBJS = $(SIM_HW_DEVICES:%=dv-%.o)
|
||||
@SIM_ENABLE_HW_FALSE@SIM_HW_OBJS =
|
||||
|
||||
# This can be removed once mips/configure is gone.
|
||||
SIM_MIPS_SUBTARGET = @SIM_MIPS_SUBTARGET@
|
||||
|
29
sim/configure
vendored
29
sim/configure
vendored
@ -641,6 +641,7 @@ LTLIBOBJS
|
||||
include_makefile
|
||||
SIM_RX_CYCLE_ACCURATE_FLAGS
|
||||
SIM_RISCV_BITSIZE
|
||||
SIM_MIPS_SUBTARGET
|
||||
SIM_FRV_TRAPDUMP_FLAGS
|
||||
sim_float
|
||||
sim_bitsize
|
||||
@ -12431,7 +12432,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 12434 "configure"
|
||||
#line 12435 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -12537,7 +12538,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 12540 "configure"
|
||||
#line 12541 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -16276,6 +16277,30 @@ $as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking mips subtarget" >&5
|
||||
$as_echo_n "checking mips subtarget... " >&6; }
|
||||
SIM_MIPS_SUBTARGET=
|
||||
case ${target} in #(
|
||||
mips64vr*-*-*) :
|
||||
SIM_MIPS_SUBTARGET="-DTARGET_ENABLE_FR=1" ;; #(
|
||||
mips*tx39*) :
|
||||
SIM_MIPS_SUBTARGET="-DSUBTARGET_R3900=1" ;; #(
|
||||
mips*-sde-elf*) :
|
||||
SIM_MIPS_SUBTARGET="-DTARGET_ENABLE_FR=1" ;; #(
|
||||
mips*-mti-elf*) :
|
||||
SIM_MIPS_SUBTARGET="-DTARGET_ENABLE_FR=1" ;; #(
|
||||
mipsisa32*-*-*) :
|
||||
SIM_MIPS_SUBTARGET="-DTARGET_ENABLE_FR=1" ;; #(
|
||||
mipsisa64*-*-*) :
|
||||
SIM_MIPS_SUBTARGET="-DTARGET_ENABLE_FR=1" ;; #(
|
||||
*) :
|
||||
;;
|
||||
esac
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SIM_MIPS_SUBTARGET:-none}" >&5
|
||||
$as_echo "${SIM_MIPS_SUBTARGET:-none}" >&6; }
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking riscv bitsize" >&5
|
||||
$as_echo_n "checking riscv bitsize... " >&6; }
|
||||
SIM_RISCV_BITSIZE=64
|
||||
|
@ -203,6 +203,7 @@ AC_SUBST(sim_float)
|
||||
|
||||
dnl Some arches have unique configure flags.
|
||||
m4_include([frv/acinclude.m4])
|
||||
m4_include([mips/acinclude-top.m4])
|
||||
m4_include([riscv/acinclude.m4])
|
||||
m4_include([rx/acinclude.m4])
|
||||
|
||||
|
@ -67,8 +67,7 @@ SIM_OBJS = \
|
||||
sim-resume.o \
|
||||
|
||||
# List of flags to always pass to $(CC).
|
||||
SIM_SUBTARGET=@SIM_SUBTARGET@
|
||||
SIM_EXTRA_CFLAGS = $(SIM_SUBTARGET)
|
||||
SIM_EXTRA_CFLAGS = $(SIM_MIPS_SUBTARGET)
|
||||
|
||||
SIM_EXTRA_CLEAN = clean-extra
|
||||
SIM_EXTRA_DISTCLEAN = distclean-extra
|
||||
|
34
sim/mips/acinclude-top.m4
Normal file
34
sim/mips/acinclude-top.m4
Normal file
@ -0,0 +1,34 @@
|
||||
dnl TODO: Rename this to acinclude.m4 once mips/configure is removed.
|
||||
dnl
|
||||
dnl Copyright (C) 2005-2022 Free Software Foundation, Inc.
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation; either version 3 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
dnl NB: This file is included in sim/configure, so keep settings namespaced.
|
||||
|
||||
dnl DEPRECATED
|
||||
dnl
|
||||
dnl Instead of defining a `subtarget' macro, code should be checking the value
|
||||
dnl of {STATE,CPU}_ARCHITECTURE to identify the architecture dnl in question.
|
||||
AC_MSG_CHECKING([mips subtarget])
|
||||
SIM_MIPS_SUBTARGET=
|
||||
AS_CASE([${target}],
|
||||
[mips64vr*-*-*], [SIM_MIPS_SUBTARGET="-DTARGET_ENABLE_FR=1"],
|
||||
[mips*tx39*], [SIM_MIPS_SUBTARGET="-DSUBTARGET_R3900=1"],
|
||||
[mips*-sde-elf*], [SIM_MIPS_SUBTARGET="-DTARGET_ENABLE_FR=1"],
|
||||
[mips*-mti-elf*], [SIM_MIPS_SUBTARGET="-DTARGET_ENABLE_FR=1"],
|
||||
[mipsisa32*-*-*], [SIM_MIPS_SUBTARGET="-DTARGET_ENABLE_FR=1"],
|
||||
[mipsisa64*-*-*], [SIM_MIPS_SUBTARGET="-DTARGET_ENABLE_FR=1"])
|
||||
AC_MSG_RESULT([${SIM_MIPS_SUBTARGET:-none}])
|
||||
AC_SUBST(SIM_MIPS_SUBTARGET)
|
20
sim/mips/configure
vendored
20
sim/mips/configure
vendored
@ -595,7 +595,6 @@ sim_micromips16_flags
|
||||
sim_micromips_flags
|
||||
sim_m16_flags
|
||||
sim_igen_flags
|
||||
SIM_SUBTARGET
|
||||
target_os
|
||||
target_vendor
|
||||
target_cpu
|
||||
@ -1844,25 +1843,6 @@ test -n "$target_alias" &&
|
||||
program_prefix=${target_alias}-
|
||||
|
||||
|
||||
# DEPRECATED
|
||||
#
|
||||
# Instead of defining a `subtarget' macro, code should be checking
|
||||
# the value of {STATE,CPU}_ARCHITECTURE to identify the architecture
|
||||
# in question.
|
||||
#
|
||||
case "${target}" in
|
||||
mips64vr*-*-*) SIM_SUBTARGET="-DTARGET_ENABLE_FR=1" ;;
|
||||
mips*tx39*) SIM_SUBTARGET="-DSUBTARGET_R3900=1";;
|
||||
mips*-sde-elf*) SIM_SUBTARGET="-DTARGET_ENABLE_FR=1";;
|
||||
mips*-mti-elf*) SIM_SUBTARGET="-DTARGET_ENABLE_FR=1";;
|
||||
mipsisa32*-*-*) SIM_SUBTARGET="-DTARGET_ENABLE_FR=1";;
|
||||
mipsisa64*-*-*) SIM_SUBTARGET="-DTARGET_ENABLE_FR=1";;
|
||||
*) SIM_SUBTARGET="";;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Select the bitsize of the target
|
||||
#
|
||||
|
@ -6,25 +6,6 @@ dnl The sim shouldn't be checking $target and changing behavior. But it is,
|
||||
dnl and until we clean that up, we need to expand --target for use below.
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
# DEPRECATED
|
||||
#
|
||||
# Instead of defining a `subtarget' macro, code should be checking
|
||||
# the value of {STATE,CPU}_ARCHITECTURE to identify the architecture
|
||||
# in question.
|
||||
#
|
||||
case "${target}" in
|
||||
mips64vr*-*-*) SIM_SUBTARGET="-DTARGET_ENABLE_FR=1" ;;
|
||||
mips*tx39*) SIM_SUBTARGET="-DSUBTARGET_R3900=1";;
|
||||
mips*-sde-elf*) SIM_SUBTARGET="-DTARGET_ENABLE_FR=1";;
|
||||
mips*-mti-elf*) SIM_SUBTARGET="-DTARGET_ENABLE_FR=1";;
|
||||
mipsisa32*-*-*) SIM_SUBTARGET="-DTARGET_ENABLE_FR=1";;
|
||||
mipsisa64*-*-*) SIM_SUBTARGET="-DTARGET_ENABLE_FR=1";;
|
||||
*) SIM_SUBTARGET="";;
|
||||
esac
|
||||
AC_SUBST(SIM_SUBTARGET)
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Select the bitsize of the target
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user