mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-19 22:03:57 +08:00
Allow ARC target to be configured with --with-cpu=<cpu-name>.
gas * config.in (TARGET_WITH_CPU): Undefine. * configure.ac: Add --with-cpu support, and define in config.h. * configure: Regenerate. * config/tc-arc.c: Use TARGET_WITH_CPU to select default CPU. * NEWS: Mention new configure option.
This commit is contained in:

committed by
Nick Clifton

parent
534dbe460e
commit
9004b6bd58
3
gas/NEWS
3
gas/NEWS
@ -34,6 +34,9 @@
|
|||||||
|
|
||||||
* Add assembly-time relaxation option for ARC cpus.
|
* Add assembly-time relaxation option for ARC cpus.
|
||||||
|
|
||||||
|
* Add --with-cpu=TYPE configure option for ARC gas. This allows the default
|
||||||
|
cpu type to be adjusted at configure time.
|
||||||
|
|
||||||
Changes in 2.26:
|
Changes in 2.26:
|
||||||
|
|
||||||
* Add a configure option --enable-compressed-debug-sections={all,gas} to
|
* Add a configure option --enable-compressed-debug-sections={all,gas} to
|
||||||
|
6
gas/as.c
6
gas/as.c
@ -665,8 +665,14 @@ parse_args (int * pargc, char *** pargv)
|
|||||||
This program is free software; you may redistribute it under the terms of\n\
|
This program is free software; you may redistribute it under the terms of\n\
|
||||||
the GNU General Public License version 3 or later.\n\
|
the GNU General Public License version 3 or later.\n\
|
||||||
This program has absolutely no warranty.\n"));
|
This program has absolutely no warranty.\n"));
|
||||||
|
#ifdef TARGET_WITH_CPU
|
||||||
|
printf (_("This assembler was configured for a target of `%s' "
|
||||||
|
"and default,\ncpu type `%s'.\n"),
|
||||||
|
TARGET_ALIAS, TARGET_WITH_CPU);
|
||||||
|
#else
|
||||||
printf (_("This assembler was configured for a target of `%s'.\n"),
|
printf (_("This assembler was configured for a target of `%s'.\n"),
|
||||||
TARGET_ALIAS);
|
TARGET_ALIAS);
|
||||||
|
#endif
|
||||||
exit (EXIT_SUCCESS);
|
exit (EXIT_SUCCESS);
|
||||||
|
|
||||||
case OPTION_EMULATION:
|
case OPTION_EMULATION:
|
||||||
|
@ -318,6 +318,9 @@
|
|||||||
/* Target vendor. */
|
/* Target vendor. */
|
||||||
#undef TARGET_VENDOR
|
#undef TARGET_VENDOR
|
||||||
|
|
||||||
|
/* Target specific CPU. */
|
||||||
|
#undef TARGET_WITH_CPU
|
||||||
|
|
||||||
/* Use b modifier when opening binary files? */
|
/* Use b modifier when opening binary files? */
|
||||||
#undef USE_BINARY_FOPEN
|
#undef USE_BINARY_FOPEN
|
||||||
|
|
||||||
|
@ -51,6 +51,10 @@
|
|||||||
/* Equal to MAX_PRECISION in atof-ieee.c. */
|
/* Equal to MAX_PRECISION in atof-ieee.c. */
|
||||||
#define MAX_LITTLENUMS 6
|
#define MAX_LITTLENUMS 6
|
||||||
|
|
||||||
|
#ifndef TARGET_WITH_CPU
|
||||||
|
#define TARGET_WITH_CPU "arc700"
|
||||||
|
#endif /* TARGET_WITH_CPU */
|
||||||
|
|
||||||
/* Enum used to enumerate the relaxable ins operands. */
|
/* Enum used to enumerate the relaxable ins operands. */
|
||||||
enum rlx_operand_type
|
enum rlx_operand_type
|
||||||
{
|
{
|
||||||
@ -2466,7 +2470,7 @@ md_begin (void)
|
|||||||
const struct arc_opcode *opcode = arc_opcodes;
|
const struct arc_opcode *opcode = arc_opcodes;
|
||||||
|
|
||||||
if (!mach_type_specified_p)
|
if (!mach_type_specified_p)
|
||||||
arc_select_cpu ("arc700");
|
arc_select_cpu (TARGET_WITH_CPU);
|
||||||
|
|
||||||
/* The endianness can be chosen "at the factory". */
|
/* The endianness can be chosen "at the factory". */
|
||||||
target_big_endian = byte_order == BIG_ENDIAN;
|
target_big_endian = byte_order == BIG_ENDIAN;
|
||||||
@ -3401,7 +3405,8 @@ md_show_usage (FILE *stream)
|
|||||||
{
|
{
|
||||||
fprintf (stream, _("ARC-specific assembler options:\n"));
|
fprintf (stream, _("ARC-specific assembler options:\n"));
|
||||||
|
|
||||||
fprintf (stream, " -mcpu=<cpu name>\t assemble for CPU <cpu name>\n");
|
fprintf (stream, " -mcpu=<cpu name>\t assemble for CPU <cpu name> "
|
||||||
|
"(default: %s)\n", TARGET_WITH_CPU);
|
||||||
fprintf (stream, " -mcpu=nps400\t\t same as -mcpu=arc700 -mnps400\n");
|
fprintf (stream, " -mcpu=nps400\t\t same as -mcpu=arc700 -mnps400\n");
|
||||||
fprintf (stream, " -mA6/-mARC600/-mARC601 same as -mcpu=arc600\n");
|
fprintf (stream, " -mA6/-mARC600/-mARC601 same as -mcpu=arc600\n");
|
||||||
fprintf (stream, " -mA7/-mARC700\t\t same as -mcpu=arc700\n");
|
fprintf (stream, " -mA7/-mARC700\t\t same as -mcpu=arc700\n");
|
||||||
|
18
gas/configure
vendored
18
gas/configure
vendored
@ -771,6 +771,7 @@ enable_x86_relax_relocations
|
|||||||
enable_elf_stt_common
|
enable_elf_stt_common
|
||||||
enable_werror
|
enable_werror
|
||||||
enable_build_warnings
|
enable_build_warnings
|
||||||
|
with_cpu
|
||||||
enable_nls
|
enable_nls
|
||||||
enable_maintainer_mode
|
enable_maintainer_mode
|
||||||
with_system_zlib
|
with_system_zlib
|
||||||
@ -1435,6 +1436,8 @@ Optional Packages:
|
|||||||
--with-pic try to use only PIC/non-PIC objects [default=use
|
--with-pic try to use only PIC/non-PIC objects [default=use
|
||||||
both]
|
both]
|
||||||
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
|
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
|
||||||
|
--with-cpu=CPU default cpu variant is CPU (currently only supported
|
||||||
|
on ARC)
|
||||||
--with-system-zlib use installed libz
|
--with-system-zlib use installed libz
|
||||||
|
|
||||||
Some influential environment variables:
|
Some influential environment variables:
|
||||||
@ -10982,7 +10985,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 10985 "configure"
|
#line 10988 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@ -11088,7 +11091,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 11091 "configure"
|
#line 11094 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@ -11828,6 +11831,17 @@ fi
|
|||||||
ac_config_headers="$ac_config_headers config.h:config.in"
|
ac_config_headers="$ac_config_headers config.h:config.in"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --with-cpu was given.
|
||||||
|
if test "${with_cpu+set}" = set; then :
|
||||||
|
withval=$with_cpu;
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define TARGET_WITH_CPU "${with_cpu}"
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# PR 14072
|
# PR 14072
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,6 +106,17 @@ AM_BINUTILS_WARNINGS
|
|||||||
# Generate a header file
|
# Generate a header file
|
||||||
AC_CONFIG_HEADERS(config.h:config.in)
|
AC_CONFIG_HEADERS(config.h:config.in)
|
||||||
|
|
||||||
|
dnl Option --with-cpu=TYPE allows configure type control of the default
|
||||||
|
dnl cpu type within the assembler. Currently only the ARC target
|
||||||
|
dnl supports this feature, but others may be added in the future.
|
||||||
|
AC_ARG_WITH(cpu,
|
||||||
|
AS_HELP_STRING([--with-cpu=CPU],
|
||||||
|
[default cpu variant is CPU (currently only supported on ARC)]),
|
||||||
|
[AC_DEFINE_UNQUOTED(TARGET_WITH_CPU,
|
||||||
|
"${with_cpu}",
|
||||||
|
[Target specific CPU.])],
|
||||||
|
[])
|
||||||
|
|
||||||
# PR 14072
|
# PR 14072
|
||||||
AH_VERBATIM([00_CONFIG_H_CHECK],
|
AH_VERBATIM([00_CONFIG_H_CHECK],
|
||||||
[/* Check that config.h is #included before system headers
|
[/* Check that config.h is #included before system headers
|
||||||
|
Reference in New Issue
Block a user