diff options
author | Richard Sandiford <richard@codesourcery.com> | 2007-08-11 16:52:47 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2007-08-11 16:52:47 +0000 |
commit | a7f051fe0bc3638c7f289b8d34e022cbb7f8228d (patch) | |
tree | e180a2c0612e82e69dd834569c293bbbca8e9a14 | |
parent | 3fb300196dd0d2ff04eddf6c53f825699fd6720a (diff) | |
download | gcc-a7f051fe0bc3638c7f289b8d34e022cbb7f8228d.zip gcc-a7f051fe0bc3638c7f289b8d34e022cbb7f8228d.tar.gz gcc-a7f051fe0bc3638c7f289b8d34e022cbb7f8228d.tar.bz2 |
vxworks-dummy.h (TARGET_VXWORKS): Define.
gcc/
* config/vxworks-dummy.h (TARGET_VXWORKS): Define.
* config/vxworks.h (TARGET_VXWORKS): Override.
* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Don't define
"mips" if TARGET_VXWORKS.
From-SVN: r127361
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/mips/mips.h | 11 | ||||
-rw-r--r-- | gcc/config/vxworks-dummy.h | 5 | ||||
-rw-r--r-- | gcc/config/vxworks.h | 4 |
4 files changed, 24 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 906930e..8afb826 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2007-08-11 Richard Sandiford <richard@codesourcery.com> + * config/vxworks-dummy.h (TARGET_VXWORKS): Define. + * config/vxworks.h (TARGET_VXWORKS): Override. + * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Don't define + "mips" if TARGET_VXWORKS. + +2007-08-11 Richard Sandiford <richard@codesourcery.com> + * calls.c (avoid_likely_spilled_reg): New function. (expand_call): Use it. diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 7c2f548..564f8bc 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -357,9 +357,14 @@ extern enum mips_code_readable_setting mips_code_readable; builtin_define ("__mips__"); \ builtin_define ("_mips"); \ \ - /* We do this here because __mips is defined below \ - and so we can't use builtin_define_std. */ \ - if (!flag_iso) \ + /* We do this here because __mips is defined below and so we \ + can't use builtin_define_std. We don't ever want to define \ + "mips" for VxWorks because some of the VxWorks headers \ + construct include filenames from a root directory macro, \ + an architecture macro and a filename, where the architecture \ + macro expands to 'mips'. If we define 'mips' to 1, the \ + architecture macro expands to 1 as well. */ \ + if (!flag_iso && !TARGET_VXWORKS) \ builtin_define ("mips"); \ \ if (TARGET_64BIT) \ diff --git a/gcc/config/vxworks-dummy.h b/gcc/config/vxworks-dummy.h index 8c3d7d1..f310d08 100644 --- a/gcc/config/vxworks-dummy.h +++ b/gcc/config/vxworks-dummy.h @@ -17,6 +17,11 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +/* True if we're targetting VxWorks. */ +#ifndef TARGET_VXWORKS +#define TARGET_VXWORKS 0 +#endif + /* True if generating code for a VxWorks RTP. */ #ifndef TARGET_VXWORKS_RTP #define TARGET_VXWORKS_RTP false diff --git a/gcc/config/vxworks.h b/gcc/config/vxworks.h index 64ff220..322260d 100644 --- a/gcc/config/vxworks.h +++ b/gcc/config/vxworks.h @@ -20,6 +20,10 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +/* Assert that we are targetting VxWorks. */ +#undef TARGET_VXWORKS +#define TARGET_VXWORKS 1 + /* In kernel mode, VxWorks provides all the libraries itself, as well as the functionality of startup files, etc. In RTP mode, it behaves more like a traditional Unix, with more external files. Most of our specs |