This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[MT patch] Add -with-arch support
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 28 Dec 2005 22:39:54 +0000
- Subject: [MT patch] Add -with-arch support
I've installed this patch to add --with-arch= configure support. Whilst there I
augmented the error reporting to specify which --with-foo options are accepted.
It also fixes breakage caused by Kazu's patch to define basic_block vectors in
basic-block.h.
tested on mt-none-elf.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
2005-12-28 Nathan Sidwell <nathan@codesourcery.com>
* config.gcc (mt-*-*): Add --with-arch support.
(--with): Print accepted options on error.
* config/mt/mt.h (OPTION_DEFAULT_SPECS): Define.
* config/mt/mt.c (DEF_VEC_P(basic_block),
DEF_VEC_ALLOC_P(basic_bloc,heap)): Remove from here.
Index: config.gcc
===================================================================
--- config.gcc (revision 109119)
+++ config.gcc (working copy)
@@ -2669,6 +2669,25 @@ case "${target}" in
esac
;;
+ mt-*-*)
+ supported_defaults="arch"
+
+ case "$with_arch" in
+ "" \
+ | ms1-64-001 \
+ | ms1-16-002 \
+ | ms1-16-003 \
+ | ms2 \
+ | "")
+ # OK
+ ;;
+ *)
+ echo "Unknown arch used in --with-arch=$with_arch" 1>&2
+ exit 1
+ ;;
+ esac
+ ;;
+
powerpc*-*-* | rs6000-*-*)
supported_defaults="cpu float tune"
@@ -2923,6 +2942,7 @@ do
;;
*)
echo "This target does not support --with-$option." 2>&1
+ echo "Valid --with options are: $supported_defaults" 2>&1
exit 1
;;
esac
Index: config/mt/mt.c
===================================================================
--- config/mt/mt.c (revision 109119)
+++ config/mt/mt.c (working copy)
@@ -1654,11 +1654,7 @@ void mt_add_loop (void)
filling. */
#define MAX_LOOP_LENGTH (200 * 4)
-/* We need to keep a vector of basic blocks */
-DEF_VEC_P (basic_block);
-DEF_VEC_ALLOC_P (basic_block,heap);
-
-/* And a vector of loops */
+/* We need to keep a vector of loops */
typedef struct loop_info *loop_info;
DEF_VEC_P (loop_info);
DEF_VEC_ALLOC_P (loop_info,heap);
Index: config/mt/mt.h
===================================================================
--- config/mt/mt.h (revision 109119)
+++ config/mt/mt.h (working copy)
@@ -38,6 +38,11 @@ enum epilogue_type
extern enum processor_type mt_cpu;
+/* Support for a compile-time default CPU, et cetera. The rules are:
+ --with-arch is ignored if -march is specified. */
+#define OPTION_DEFAULT_SPECS \
+ {"arch", "%{!march=*:-march=%(VALUE)}" }
+
/* A C string constant that tells the GCC driver program options to pass to
the assembler. */
#undef ASM_SPEC