This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RFA: Use .opt files for the FR30 port
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: nickc at redhat dot com
- Date: Mon, 21 Mar 2005 20:13:38 +0000
- Subject: RFA: Use .opt files for the FR30 port
This patch uses a .opt file to define the fr30 options. All very
straightforward. ;) Perhaps the only noteworthy thing is that nothing
ever overrides "#define TARGET_DEFAULT 0" so there's no need to override
the new TARGET_DEFAULT_TARGET_FLAGS either.
Tested by building fr30-elf as far it'll go (it ICEs building newlib
libm for unrelated reasons). I also tested each of the options by hand
to make sure they had the intended effect. OK to install?
Richard
* config/fr30/fr30.h (TARGET_SMALL_MODEL_MASK, TARGET_SMALL_MODEL)
(TARGET_DEFAULT, target_flags, TARGET_SWITCHES): Delete.
* config/fr30/fr30.opt: New file.
Index: config/fr30/fr30.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/fr30/fr30.h,v
retrieving revision 1.60
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.60 fr30.h
*** config/fr30/fr30.h 30 Dec 2004 03:07:45 -0000 1.60
--- config/fr30/fr30.h 21 Mar 2005 19:52:42 -0000
*************** #define TARGET_CPU_CPP_BUILTINS() \
*** 49,72 ****
} \
while (0)
- /* Use LDI:20 instead of LDI:32 to load addresses. */
- #define TARGET_SMALL_MODEL_MASK (1 << 0)
- #define TARGET_SMALL_MODEL (target_flags & TARGET_SMALL_MODEL_MASK)
-
- #define TARGET_DEFAULT 0
-
- /* This declaration should be present. */
- extern int target_flags;
-
- #define TARGET_SWITCHES \
- { \
- { "small-model", TARGET_SMALL_MODEL_MASK, \
- N_("Assume small address space") }, \
- { "no-small-model", - TARGET_SMALL_MODEL_MASK, "" }, \
- { "no-lsim", 0, "" }, \
- { "", TARGET_DEFAULT, "" } \
- }
-
#define TARGET_VERSION fprintf (stderr, " (fr30)");
#define CAN_DEBUG_WITHOUT_FP
--- 49,54 ----
diff -c /dev/null config/fr30/fr30.opt
*** /dev/null 2005-01-29 16:17:39.000000000 +0000
--- config/fr30/fr30.opt 2005-03-20 11:05:15.000000000 +0000
***************
*** 0 ****
--- 1,27 ----
+ ; Options for the FR30 port of the compiler.
+
+ ; Copyright (C) 2005 Free Software Foundation, Inc.
+ ;
+ ; This file is part of GCC.
+ ;
+ ; GCC is free software; you can redistribute it and/or modify it under
+ ; the terms of the GNU General Public License as published by the Free
+ ; Software Foundation; either version 2, or (at your option) any later
+ ; version.
+ ;
+ ; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ ; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ ; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ ; for more details.
+ ;
+ ; You should have received a copy of the GNU General Public License
+ ; along with GCC; see the file COPYING. If not, write to the Free
+ ; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ ; 02111-1307, USA.
+
+ msmall-model
+ Target Report Mask(SMALL_MODEL)
+ Assume small address space
+
+ mno-lsim
+ Target RejectNegative Undocumented