diff options
author | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-11 17:02:36 +0000 |
---|---|---|
committer | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-11 17:02:36 +0000 |
commit | e03f789f0fcf9c5d94f0b4dab06b7e57b97b43d3 (patch) | |
tree | 1694ad7ed26e247e6ad86ecf3226ec444f6d51f2 /gcc/config/cris/linux.h | |
parent | b746a8aa63cdec469f59bf59b66dc82d7d8e8c08 (diff) | |
download | gcc-e03f789f0fcf9c5d94f0b4dab06b7e57b97b43d3.tar.gz |
* config.gcc: Add cris-*-aout, cris-*-elf, cris-*-none,
cris-*-linux* cases.
* config/cris/cris-protos.h: New file.
* config/cris/cris.c: New file.
* config/cris/cris.h: New file.
* config/cris/cris.md: New file.
* config/cris/linux.h: New file.
* config/cris/aout.h: New file.
* config/cris/arit.c: New file.
* config/cris/cris_abi_symbol.c: New file.
* config/cris/mulsi3.asm: New file.
* config/cris/t-aout: New file.
* config/cris/t-cris: New file.
* config/cris/t-elfmulti: New file.
* config/cris/t-linux: New file.
* doc/invoke.texi: Add CRIS options.
* doc/install.texi (Specific): Add blurb for CRIS.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46191 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/cris/linux.h')
-rw-r--r-- | gcc/config/cris/linux.h | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/gcc/config/cris/linux.h b/gcc/config/cris/linux.h new file mode 100644 index 00000000000..b02e19e2a41 --- /dev/null +++ b/gcc/config/cris/linux.h @@ -0,0 +1,134 @@ +/* Definitions for GCC. Part of the machine description for CRIS. + Copyright (C) 2001 Free Software Foundation, Inc. + Contributed by Axis Communications. Written by Hans-Peter Nilsson. + +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. */ + + +/* After the first "Node:" comment comes all preprocessor directives and + attached declarations described in the info files, the "Using and + Porting GCC" manual (uapgcc), in the same order as found in the "Target + macros" section in the gcc-2.9x CVS edition of 2000-03-17. FIXME: Not + really, but needs an update anyway. + + There is no generic copy-of-uapgcc comment, you'll have to see uapgcc + for that. If applicable, there is a CRIS-specific comment. The order + of macro definitions follow the order in the manual. Every section in + the manual (node in the info pages) has an introductory `Node: + <subchapter>' comment. If no macros are defined for a section, only + the section-comment is present. */ + +/* This file defines the macros for cris-axis-linux-gnu that are not + covered by cris.h, elfos.h and (config/)linux.h. */ + + +/* Node: Instruction Output */ + +#undef USER_LABEL_PREFIX +#define USER_LABEL_PREFIX "" + +/* Node: Driver */ +/* These macros are CRIS-specific, but used in target driver macros. */ + +#undef CRIS_CPP_SUBTARGET_SPEC +#define CRIS_CPP_SUBTARGET_SPEC \ + "-D__linux__ -D__unix__ -D__ELF__\ + %{pthread:-D_REENTRANT}\ + %{fPIC|fpic: -D__PIC__ -D__pic__}\ + %{!fleading-underscore:-fno-leading-underscore -D__NO_UNDERSCORES__}\ + %{!march=*:%{!cpu=*:-D__arch_v10 -D__CRIS_arch_version=10}}\ + %{!ansi:%{!std=*:%{!undef:-Dlinux -Dunix}\ + -Asystem(unix) -Asystem(posix) -Acpu(cris) -Amachine(cris)}}" + +#undef CRIS_CC1_SUBTARGET_SPEC +#define CRIS_CC1_SUBTARGET_SPEC \ + "%{!march=*:%{!cpu=*:-march=v10}}" + +#undef CRIS_ASM_SUBTARGET_SPEC +#define CRIS_ASM_SUBTARGET_SPEC \ + "--em=criself\ + %{!fleading-underscore:--no-underscore}\ + %{fPIC|fpic: --pic}" + +/* Provide a legacy -mlinux option. */ +#undef CRIS_SUBTARGET_SWITCHES +#define CRIS_SUBTARGET_SWITCHES \ + {"linux", 0, ""}, \ + {"gotplt", -TARGET_MASK_AVOID_GOTPLT, ""}, \ + {"no-gotplt", TARGET_MASK_AVOID_GOTPLT, \ + N_("Together with -fpic and -fPIC, do not use GOTPLT references")}, + +#undef CRIS_SUBTARGET_DEFAULT +#define CRIS_SUBTARGET_DEFAULT \ + (TARGET_MASK_SVINTO \ + + TARGET_MASK_ETRAX4_ADD \ + + TARGET_MASK_ALIGN_BY_32 \ + + TARGET_MASK_ELF \ + + TARGET_MASK_LINUX) + +#undef CRIS_DEFAULT_CPU_VERSION +#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG + +#undef CRIS_SUBTARGET_VERSION +#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" + + +/* Redefine what was in svr4.h. Include order madness makes it less + useful to include (config/)linux.h after cris.h. (config/)linux.h + includes svr4.h which undef:s lots of supposedly arch-specific macros + carefully defined by cris.h. */ +#undef LIB_SPEC +#define LIB_SPEC "%{!shared:%{!symbolic:-lc}}" + +/* We need an -rpath-link to ld.so.1, and presumably to each directory + specified with -B. */ +#undef CRIS_LINK_SUBTARGET_SPEC +#define CRIS_LINK_SUBTARGET_SPEC \ + "-mcrislinux\ + -rpath-link include/asm/../..%s\ + %{shared} %{static}\ + %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\ + %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\ + %{O2|O3: --gc-sections}" + +#undef STARTFILE_SPEC +#define STARTFILE_SPEC \ + "%{!shared:\ + %{pg:gcrt1.o%s}\ + %{!pg:\ + %{p:gcrt1.o%s}\ + %{!p:\ + %{profile:gcrt1.o%s}\ + %{!profile:crt1.o%s}}}}\ + crti.o%s\ + %{!shared:crtbegin.o%s}\ + %{shared:crtbeginS.o%s}" + + +/* Node: Sections */ + +/* GNU/Linux has crti and crtn and does not need the + FORCE_INIT_SECTION_ALIGN trick in cris.h. */ +#undef FORCE_INIT_SECTION_ALIGN + +/* + * Local variables: + * eval: (c-set-style "gnu") + * indent-tabs-mode: t + * End: + */ |