config.gcc: Update *-*-vxworks* generic hook and comments.

2003-10-22  Phil Edwards  <phil@codesourcery.com>

	* config.gcc:  Update *-*-vxworks* generic hook and comments.
	(arm-wrs-vxworks, i[4567]86-wrs-vxworks, mips-wrs-vxworks,
	mips-wrs-windiss, sh-wrs-vxworks):  New stanzas.
	* genmultilib:  Allow the MULTILIB_OSDIRNAMES to be mapped directly.
	* config/svr4.h (SWITCH_TAKES_ARG):  Undefine it before redefining it.
	* config/windiss.h:  New file.
	* config/arm/t-vxworks:  New file.
	* config/arm/vxworks.h:  New file.
	* config/i386/t-vxworks:  New file.
	* config/i386/vxworks.h:  New file.
	* config/mips/t-vxworks:  New file.
	* config/mips/vxworks.h:  New file.
	* config/mips/windiss.h:  New file.
	* config/sh/t-vxworks:  New file.
	* config/sh/vxworks.h:  New file.

From-SVN: r72834
This commit is contained in:
Phil Edwards 2003-10-23 05:16:56 +00:00 committed by Phil Edwards
parent 8f9ba40588
commit 55047c9d1a
14 changed files with 588 additions and 22 deletions

View File

@ -1,3 +1,21 @@
2003-10-22 Phil Edwards <phil@codesourcery.com>
* config.gcc: Update *-*-vxworks* generic hook and comments.
(arm-wrs-vxworks, i[4567]86-wrs-vxworks, mips-wrs-vxworks,
mips-wrs-windiss, sh-wrs-vxworks): New stanzas.
* genmultilib: Allow the MULTILIB_OSDIRNAMES to be mapped directly.
* config/svr4.h (SWITCH_TAKES_ARG): Undefine it before redefining it.
* config/windiss.h: New file.
* config/arm/t-vxworks: New file.
* config/arm/vxworks.h: New file.
* config/i386/t-vxworks: New file.
* config/i386/vxworks.h: New file.
* config/mips/t-vxworks: New file.
* config/mips/vxworks.h: New file.
* config/mips/windiss.h: New file.
* config/sh/t-vxworks: New file.
* config/sh/vxworks.h: New file.
2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.c (h8300_output_function_epilogue): Remove.

View File

@ -506,8 +506,13 @@ case ${target} in
*-*-vxworks*)
tmake_file=t-vxworks
tm_file="${tm_file} elfos.h svr4.h vxworks.h"
thread_file='vxworks'
case ${enable_threads} in
no) ;;
"" | yes | vxworks) thread_file='vxworks' ;;
*) echo 'Unknown thread configuration for VxWorks'; exit 1 ;;
esac
use_collect2=yes
xm_defines=POSIX
;;
esac
@ -619,6 +624,10 @@ arm-semi-aof | armel-semi-aof)
tm_file="arm/semiaof.h arm/aof.h arm/arm.h"
tmake_file=arm/t-semi
;;
arm-wrs-vxworks)
tm_file="dbxelf.h elfos.h svr4.h vxworks.h arm/elf.h arm/aout.h arm/arm.h arm/vxworks.h"
tmake_file="${tmake_file} arm/t-vxworks"
;;
arm*-*-freebsd*|strongarm*-*-freebsd*)
tm_file="dbxelf.h elfos.h ${fbsd_tm_file} arm/elf.h arm/aout.h arm/freebsd.h arm/arm.h"
tmake_file="${tmake_file} arm/t-strongarm-elf"
@ -1102,6 +1111,10 @@ i386-*-vsta) # Intel 80386's running VSTa kernel
tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/vsta.h"
use_fixproto=yes
;;
i[4567]86-wrs-vxworks)
tm_file="${tm_file} i386/sysv4.h i386/unix.h i386/vxworks.h"
tmake_file="${tmake_file} i386/t-vxworks"
;;
i[34567]86-*-pe | i[34567]86-*-cygwin*)
tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/cygwin.h"
xm_file=i386/xm-cygwin.h
@ -1564,6 +1577,20 @@ mips*-*-rtems*)
tm_file="${tm_file} mips/elf.h mips/rtems.h rtems.h"
tmake_file="mips/t-elf t-rtems mips/t-rtems"
;;
mips-wrs-vxworks)
# We want vxworks.h after mips/elf.h, which unfortunately means we
# have to redo the tm_file list from scratch.
tm_file="elfos.h mips/mips.h svr4.h mips/elf.h vxworks.h mips/vxworks.h"
tmake_file="${tmake_file} mips/t-vxworks"
target_cpu_default="MASK_GAS"
;;
mips-wrs-windiss) # Instruction-level simulator for VxWorks.
xm_defines=POSIX
tm_file="elfos.h mips/mips.h svr4.h mips/elf.h windiss.h mips/windiss.h"
tmake_file="${tmake_file} mips/t-elf"
target_cpu_default="MASK_GAS"
thread_file=
;;
mipstx39-*-elf* | mipstx39el-*-elf*)
tm_file="${tm_file} mips/r3900.h mips/elf.h"
tmake_file=mips/t-r3900
@ -1713,7 +1740,7 @@ powerpc-wrs-vxworks*)
tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
extra_headers=ppc-asm.h
;;
powerpc-wrs-windiss*)
powerpc-wrs-windiss*) # Instruction-level simulator for VxWorks.
tm_file="${tm_file} elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/windiss.h"
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
thread_file=""
@ -1900,6 +1927,10 @@ sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
;;
esac
;;
sh-wrs-vxworks)
tmake_file="$tmake_file sh/t-sh sh/t-elf sh/t-vxworks"
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/embed-elf.h sh/vxworks.h"
;;
sh-*-*)
tm_file="${tm_file} dbxcoff.h sh/coff.h"
use_fixproto=yes

10
gcc/config/arm/t-vxworks Normal file
View File

@ -0,0 +1,10 @@
# Multilibs for VxWorks.
MULTILIB_OPTIONS = \
t4/t4be/t4t/t4tbe/t5/t5be/t5t/t5tbe/txscale/txscalebe
MULTILIB_DIRNAMES = \
ARMARCH4gnu ARMARCH4gnube ARMARCH4_Tgnu ARMARCH4_Tgnube \
ARMARCH5gnu ARMARCH5gnube ARMARCH5_Tgnu ARMARCH5_Tgnube \
XSCALEgnu XSCALEgnube

95
gcc/config/arm/vxworks.h Normal file
View File

@ -0,0 +1,95 @@
/* Definitions of target machine for GCC,
for ARM with targetting the VXWorks run time environment.
Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
Contributed by: Mike Stump <mrs@wrs.com>
Brought up to date by CodeSourcery, LLC.
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. */
#define TARGET_OS_CPP_BUILTINS() \
do { \
builtin_define ("__vxworks"); \
if (TARGET_BIG_END) \
builtin_define ("ARMEB"); \
else \
builtin_define ("ARMEL"); \
\
if (arm_is_xscale) \
builtin_define ("CPU=XSCALE"); \
else if (arm_arch5) \
builtin_define ("CPU=ARMARCH5"); \
else if (arm_arch4) \
{ \
if (thumb_code) \
builtin_define ("CPU=ARMARCH4_T"); \
else \
builtin_define ("CPU=ARMARCH4"); \
} \
} while (0)
#undef CC1_SPEC
#define CC1_SPEC \
"%{t4: -mapcs-32 -mlittle-endian -march=armv4 ; \
t4be: -mapcs-32 -mbig-endian -march=armv4 ; \
t4t: -mthumb -mthumb-interwork -mlittle-endian -march=armv4t ; \
t4tbe: -mthumb -mthumb-interwork -mbig-endian -march=armv4t ; \
t5: -mapcs-32 -mlittle-endian -march=armv5 ; \
t5be: -mapcs-32 -mbig-endian -march=armv5 ; \
t5t: -mthumb -mthumb-interwork -mlittle-endian -march=armv5 ; \
t5tbe: -mthumb -mthumb-interwork -mbig-endian -march=armv5 ; \
txscale: -mapcs-32 -mlittle-endian -mcpu=xscale ; \
txscalebe: -mapcs-32 -mbig-endian -mcpu=xscale ; \
: -march=armv4}"
/* The -Q options from svr4.h aren't understood and must be removed. */
#undef ASM_SPEC
#define ASM_SPEC \
"%{v:-V} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
/* VxWorks does all the library stuff itself. */
#undef LIB_SPEC
#define LIB_SPEC ""
/* VxWorks uses object files, not loadable images. make linker just
combine objects. */
#undef LINK_SPEC
#define LINK_SPEC "-r"
/* VxWorks provides the functionality of crt0.o and friends itself. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC ""
#undef ENDFILE_SPEC
#define ENDFILE_SPEC ""
#undef TARGET_VERSION
#define TARGET_VERSION fputs (" (ARM/VxWorks)", stderr);
/* There is no default multilib. */
#undef MULTILIB_DEFAULTS
#undef ASM_FILE_START
#define ASM_FILE_START(STREAM) \
do \
{ \
fprintf (STREAM, "%s Generated by GCC %s for ARM/VxWorks\n", \
ASM_COMMENT_START, version_string); \
} \
while (0)

View File

@ -0,0 +1,8 @@
# Multilibs for VxWorks.
#GCC does not have an arch=pentium3 setting, so we cannot build PENTIUM3gnu
MULTILIB_OPTIONS = \
march=i486/march=pentium/march=pentiumpro/march=pentium4
MULTILIB_DIRNAMES = \
I80486 PENTIUMgnu PENTIUM2gnu PENTIUM4gnu

74
gcc/config/i386/vxworks.h Normal file
View File

@ -0,0 +1,74 @@
/* Definitions of target machine for GCC. VxWorks i586 version.
Copyright (C) 2003 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. */
#define HANDLE_SYSV_PRAGMA 1
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (80586, VxWorks syntax)");
/* Prefix for internally generated assembler labels. If we aren't using
underscores, we are using prefix `.'s to identify labels that should
be ignored, as in `i386/gas.h' --karl@cs.umb.edu */
#define LPREFIX "L"
/* Assembler pseudos to introduce constants of various size. */
#define ASM_SHORT "\t.word\t"
#define ASM_LONG "\t.long\t"
#define ASM_QUAD "\t.quad\t" /* Should not be used for 32bit compilation. */
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
if ((LOG)!=0) fprintf ((FILE), "\t.balign %d\n", 1<<(LOG))
#undef ASM_SPEC
#define ASM_SPEC "%{v:-V} %{Qy:} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__vxworks"); \
builtin_assert ("system=unix"); \
\
if (TARGET_386) \
builtin_define ("CPU=I80386"); \
else if (TARGET_486) \
builtin_define ("CPU=I80486"); \
else if (TARGET_PENTIUM) \
{ \
builtin_define ("CPU=PENTIUM"); \
builtin_define ("CPU_VARIANT=PENTIUM"); \
} \
else if (TARGET_PENTIUMPRO) \
{ \
builtin_define ("CPU=PENTIUM2"); \
builtin_define ("CPU_VARIANT=PENTIUMPRO"); \
} \
else if (TARGET_PENTIUM4) \
{ \
builtin_define ("CPU=PENTIUM4"); \
builtin_define ("CPU_VARIANT=PENTIUM4"); \
} \
} \
while (0)

16
gcc/config/mips/t-vxworks Normal file
View File

@ -0,0 +1,16 @@
# Multilibs for VxWorks.
# default is mips1 EB hard-float
MULTILIB_OPTIONS = mips2/mips3 EL msoft-float
MULTILIB_MATCHES = EL=mel mips2=mips32 mips3=mips4 mips3=mips64
MULTILIB_EXCEPTIONS = EL EL/msoft-float mips3/msoft-float mips3/EL/msoft-float
MUTLILIB_EXTRA_OPTS = -G 0 -mno-branch-likely
MULTILIB_OSDIRNAMES = msoft-float=!MIPS32sfr3kgnu \
mips2=!MIPS32gnu mips2/msoft-float=!MIPS32sfgnu \
mips2/EL=!MIPS32gnule \
mips2/EL/msoft-float=!MIPS32sfgnule \
mips3=!MIPS64gnu mips3/EL=!MIPS64gnule

79
gcc/config/mips/vxworks.h Normal file
View File

@ -0,0 +1,79 @@
/* Copyright (C) 1999, 2003 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. */
#undef EXTRA_SECTIONS
#define EXTRA_SECTIONS in_sdata, in_sbss
#undef EXTRA_SECTION_FUNCTIONS
#define EXTRA_SECTION_FUNCTIONS \
SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \
SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP)
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (MIPS, VxWorks syntax)");
/* Combination of mips.h and svr4.h. */
#undef SWITCH_TAKES_ARG
#define SWITCH_TAKES_ARG(CHAR) \
(DEFAULT_SWITCH_TAKES_ARG (CHAR) \
|| (CHAR) == 'G' \
|| (CHAR) == 'h' \
|| (CHAR) == 'x' \
|| (CHAR) == 'z')
#undef ASM_SPEC
#define ASM_SPEC "\
%{!G:-G 0} %{G*} %(endian_spec) %{mips1} %{mips2} %{mips3} %{mips4} \
%{mips32} %{mips32r2} %{mips64} \
%{mips16:%{!mno-mips16:-mips16}} %{mno-mips16:-no-mips16} \
%(subtarget_asm_optimizing_spec) \
%(subtarget_asm_debugging_spec) \
%{membedded-pic} \
%{mabi=32:-32}%{mabi=n32:-n32}%{mabi=64:-64}%{mabi=n64:-64} \
%{mabi=eabi} %{mabi=o64} %{!mabi*: %(asm_abi_default_spec)} \
%{mgp32} %{mgp64} %{march=*} %{mxgot:-xgot} \
%(target_asm_spec) \
%(subtarget_asm_spec)"
#undef LINK_SPEC
/* LINK_SPEC is clobbered in svr4.h. ugh! */
#define LINK_SPEC "\
%(endian_spec) \
%{!G:-G 0} %{G*} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips64} \
%{bestGnum}"
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__vxworks"); \
builtin_assert ("system=unix"); \
} \
while (0)
#undef SUBTARGET_CPP_SPEC
#define SUBTARGET_CPP_SPEC \
"%{!DCPU=*: %{mips3|mips4|mips64:-DCPU=MIPS64;:-DCPU=MIPS32}} \
%{EL|mel:-DMIPSEL;:-DMIPSEB} \
%{msoft-float:-DSOFT_FLOAT} \
%{mips1:-D_WRS_R3K_EXC_SUPPORT}"
/* No sdata. */
#undef MIPS_DEFAULT_GVALUE
#define MIPS_DEFAULT_GVALUE 0

103
gcc/config/mips/windiss.h Normal file
View File

@ -0,0 +1,103 @@
/* Support for GCC on MIPS using WindISS simulator.
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC.
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. */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (MIPS WindISS)");
/* Combination of mips.h and svr4.h. */
#undef SWITCH_TAKES_ARG
#define SWITCH_TAKES_ARG(CHAR) \
(DEFAULT_SWITCH_TAKES_ARG (CHAR) \
|| (CHAR) == 'G' \
|| (CHAR) == 'h' \
|| (CHAR) == 'x' \
|| (CHAR) == 'z')
#undef SUBTARGET_CPP_SPEC
#define SUBTARGET_CPP_SPEC \
"%{!DCPU=*: %{mips3|mips4|mips64:-DCPU=MIPS64;:-DCPU=MIPS32}} \
%{EL|mel:-DMIPSEL;:-DMIPSEB} \
%{msoft-float:-DSOFT_FLOAT} \
%{mips1:-D_WRS_R3K_EXC_SUPPORT}"
#undef ASM_SPEC
#define ASM_SPEC "\
%{!G:-G 0} %{G*} %(endian_spec) %{mips1} %{mips2} %{mips3} %{mips4} \
%{mips32} %{mips32r2} %{mips64} \
%{mips16:%{!mno-mips16:-mips16}} %{mno-mips16:-no-mips16} \
%(subtarget_asm_optimizing_spec) \
%(subtarget_asm_debugging_spec) \
%{membedded-pic} \
%{mabi=32:-32}%{mabi=n32:-n32}%{mabi=64:-64}%{mabi=n64:-64} \
%{mabi=eabi} %{mabi=o64} %{!mabi*: %(asm_abi_default_spec)} \
%{mgp32} %{mgp64} %{march=*} %{mxgot:-xgot} \
%(target_asm_spec) \
%(subtarget_asm_spec)"
#undef LINK_SPEC
/* LINK_SPEC is clobbered in svr4.h. ugh! */
#define LINK_SPEC "\
-m elf32mipswindiss \
%{!G:-G 0} %{G*} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips64} \
%{bestGnum}"
/* Diab libs MIPS{,E,F,L,M,W,X,Y,Z}{,H,N,S}
.
E - Elf (small-data/const=8
F - Elf Far (small-data/const=0)
L - Little Elf
M - Little Elf Far
W - elf32 bigmips
X - elf32 bigmips (far?)
Y - elf32 littlemips
Z - elf32 littlemips (far?)
. - Integer routines
H - Hard float
N - No float
S - Soft float
Want {F,M}{,H,S}
*/
#undef LIB_SPEC
#define LIB_SPEC "--start-group -li -lcfp -lwindiss -lram -limpl -limpfp --end-group"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "crt0.o%s crtbegin.o%s"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s"
/* We have no shared libraries. These two shouldn't be necessary. */
#undef LINK_SHLIB_SPEC
#define LINK_SHLIB_SPEC ""
#undef LINK_EH_SPEC
#define LINK_EH_SPEC ""
#undef CRTSAVRES_DEFAULT_SPEC
#define CRTSAVRES_DEFAULT_SPEC ""
/* No sdata. */
#undef MIPS_DEFAULT_GVALUE
#define MIPS_DEFAULT_GVALUE 0

11
gcc/config/sh/t-vxworks Normal file
View File

@ -0,0 +1,11 @@
# Multilibs for VxWorks.
MULTILIB_OPTIONS = m2/m3/m4 ml
MULTILIB_EXCEPTIONS = ml m2/ml
MULTILIB_OSDIRNAMES = \
m2=!SH7600gnu \
m3=!SH7700gnu m3/ml=!SH7700gnule \
m4=!SH7750gnu m4/ml=!SH7750gnule

50
gcc/config/sh/vxworks.h Normal file
View File

@ -0,0 +1,50 @@
/* Definitions of target machine for GCC,
for SuperH with targeting the VXWorks run time environment.
Copyright (C) 2003 Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC.
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. */
#define TARGET_OS_CPP_BUILTINS() \
do { \
builtin_define ("__vxworks"); \
builtin_define ("CPU=SH7000"); \
} while (0)
/* VxWorks does all the library stuff itself. */
#undef LIB_SPEC
#define LIB_SPEC ""
/* VxWorks uses object files, not loadable images. Make the linker just
combine objects. */
#undef LINK_SPEC
#define LINK_SPEC "-r"
/* VxWorks provides the functionality of crt0.o and friends itself. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC ""
#undef ENDFILE_SPEC
#define ENDFILE_SPEC ""
#undef TARGET_VERSION
#define TARGET_VERSION fputs (" (SH/VxWorks)", stderr);
/* There is no default multilib. */
#undef MULTILIB_DEFAULTS

View File

@ -41,6 +41,7 @@ Boston, MA 02111-1307, USA.
-z* options (for the linker). Note however that there is no such
thing as a -T option for svr4. */
#undef SWITCH_TAKES_ARG
#define SWITCH_TAKES_ARG(CHAR) \
(DEFAULT_SWITCH_TAKES_ARG (CHAR) \
|| (CHAR) == 'h' \

38
gcc/config/windiss.h Normal file
View File

@ -0,0 +1,38 @@
/* Support for GCC using WindISS simulator.
Copyright (C) 2003 Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC.
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. */
/* windiss uses wchar_t == unsigned short (UCS2) on all architectures. */
#undef WCHAR_TYPE
#define WCHAR_TYPE "short unsigned int"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 16
/* windiss has wint_t == int */
#undef WINT_TYPE
#define WINT_TYPE "int"
/* No profiling. */
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
{ \
sorry ("profiler support for WindISS"); \
}

View File

@ -63,10 +63,15 @@
# for the rule to exclude a set. Options can be preceded with a '!' to
# match a logical NOT.
# The optional sevenths argument is a list of OS subdirectory names.
# The format is the same as of the second argument.
# The difference is that second argument describes multilib directories
# in GCC conventions, while this one the OS multilib convention.
# The optional seventh argument is a list of OS subdirectory names.
# The format is either the same as of the second argument, or a set of
# mappings. When it is the same as the second argument, it describes
# the multilib directories using OS conventions, rather than GCC
# conventions. When it is a set of mappings of the form gccdir=osdir,
# the left side gives the GCC convention and the right gives the
# equivalent OS defined location. If the osdir part begins with a !,
# the os directory names are used exclusively. Use the mapping when
# there is no one-to-one equivalence between GCC levels and the OS.
# The last option should be "yes" if multilibs are enabled. If it is not
# "yes", all GCC multilib dir names will be ".".
@ -216,24 +221,44 @@ fi
# Construct a sed pattern which will convert option names to OS directory
# names.
toosdirnames=
defaultosdirname=
if [ -n "${osdirnames}" ]; then
set x ${osdirnames}
shift
for set in ${options}; do
for opts in `echo ${set} | sed -e 's|/| |'g`; do
patt="/"
for opt in `echo ${opts} | sed -e 's_|_ _'g`; do
if [ "$1" != "${opt}" ]; then
toosdirnames="${toosdirnames} -e s|/${opt}/|/${1}/|g"
patt="${patt}${1}/"
if [ "${patt}" != "/${1}/" ]; then
toosdirnames="${toosdirnames} -e s|${patt}|/${1}/|g"
fi
fi
done
shift
done
while [ $# != 0 ] ; do
case "$1" in
.=*)
defaultosdirname=`echo $1 | sed 's|^.=|:|'`
shift
;;
*=*)
patt=`echo $1 | sed -e 's|=|/$=/|'`
toosdirnames="${toosdirnames} -e s=^/${patt}/="
shift
;;
*)
break
;;
esac
done
if [ $# != 0 ]; then
for set in ${options}; do
for opts in `echo ${set} | sed -e 's|/| |'g`; do
patt="/"
for opt in `echo ${opts} | sed -e 's_|_ _'g`; do
if [ "$1" != "${opt}" ]; then
toosdirnames="${toosdirnames} -e s|/${opt}/|/${1}/|g"
patt="${patt}${1}/"
if [ "${patt}" != "/${1}/" ]; then
toosdirnames="${toosdirnames} -e s|${patt}|/${1}/|g"
fi
fi
done
shift
done
done
fi
fi
# We need another recursive shell script to correctly handle positive
@ -275,7 +300,7 @@ for set in ${options}; do
done
done
optout=`echo ${optout} | sed -e 's/^ //'`
echo "\". ${optout};\","
echo "\".${defaultosdirname} ${optout};\","
# Work over the list of combinations. We have to translate each one
# to use the directory names rather than the option names, we have to
@ -299,7 +324,14 @@ for combo in ${combinations}; do
if [ "x${enable_multilib}" != xyes ]; then
dirout=".:${osdirout}"
else
dirout="${dirout}:${osdirout}"
case "${osdirout}" in
!*)
dirout=`echo ${osdirout} | sed 's/^!//'`
;;
*)
dirout="${dirout}:${osdirout}"
;;
esac
fi
else
if [ "x${enable_multilib}" != xyes ]; then