Commit 2eab15c9 by Phil Edwards Committed by Phil Edwards

config.gcc (*-*-vxworks*): Update tm_file, add extra_options, remove use_collect2.

2005-08-22  Phil Edwards  <phil@codesourcery.com>

	* config.gcc (*-*-vxworks*):  Update tm_file, add extra_options,
	remove use_collect2.
	(powerpc-wrs-vxworks):  Update, split out *-*-vxworksae target.

	* target-def.h (TARGET_HAVE_CTORS_DTORS):  Allow target
	configuration files to override the default value.

	* config/t-vxworks:  Remove INSTALL_ASSERT_H.  Define STMP_FIXPROTO,
	EXTRA_HEADERS, and EXTRA_MULTILIB_PARTS.
	* config/vx-common.h:  New file, split out from...
	* config/vxworks.h:  here.  Update for VxWorks 6.x and RTP mode.
	* config/vxworksae.h:  New file, for VxWorks AE.
	* config/vxworks.opt:  New file.
	* config/vxlib.c:  Update for VxWorks 6.

	* config/rs6000/t-vxworks (MULTILIB_OPTIONS):  New list.  Adjust
	other MULTILIB_* variables appropriately.
	(LIB2FUNCS_EXTRA, EXTRA_MULTILIB_PARTS):  Correct from t-ppccomm.
	* config/rs6000/t-vxworksae:  New file, adjust multilibs for AE.
	* config/rs6000/vxworks.h:  Update for VxWorks 6.
	* config/rs6000/vxworksae.h:  New file, mostly placeholder for now.

From-SVN: r103432
parent 73079360
2005-08-23 Phil Edwards <phil@codesourcery.com>
* config.gcc (*-*-vxworks*): Update tm_file, add extra_options,
remove use_collect2.
(powerpc-wrs-vxworks): Update, split out *-*-vxworksae target.
* target-def.h (TARGET_HAVE_CTORS_DTORS): Allow target
configuration files to override the default value.
* config/t-vxworks: Remove INSTALL_ASSERT_H. Define STMP_FIXPROTO,
EXTRA_HEADERS, and EXTRA_MULTILIB_PARTS.
* config/vx-common.h: New file, split out from...
* config/vxworks.h: here. Update for VxWorks 6.x and RTP mode.
* config/vxworksae.h: New file, for VxWorks AE.
* config/vxworks.opt: New file.
* config/vxlib.c: Update for VxWorks 6.
* config/rs6000/t-vxworks (MULTILIB_OPTIONS): New list. Adjust
other MULTILIB_* variables appropriately.
(LIB2FUNCS_EXTRA, EXTRA_MULTILIB_PARTS): Correct from t-ppccomm.
* config/rs6000/t-vxworksae: New file, adjust multilibs for AE.
* config/rs6000/vxworks.h: Update for VxWorks 6.
* config/rs6000/vxworksae.h: New file, mostly placeholder for now.
2005-08-23 Andrew Pinski <pinskia@physics.uc.edu> 2005-08-23 Andrew Pinski <pinskia@physics.uc.edu>
PR target/20799 PR target/20799
......
...@@ -533,14 +533,14 @@ case ${target} in ...@@ -533,14 +533,14 @@ case ${target} in
;; ;;
*-*-vxworks*) *-*-vxworks*)
tmake_file=t-vxworks tmake_file=t-vxworks
tm_file="${tm_file} elfos.h svr4.h vxworks.h" tm_file="${tm_file} elfos.h svr4.h"
xm_defines=POSIX
extra_options="${extra_options} vxworks.opt"
case ${enable_threads} in case ${enable_threads} in
no) ;; no) ;;
"" | yes | vxworks) thread_file='vxworks' ;; "" | yes | vxworks) thread_file='vxworks' ;;
*) echo 'Unknown thread configuration for VxWorks'; exit 1 ;; *) echo 'Unknown thread configuration for VxWorks'; exit 1 ;;
esac esac
use_collect2=yes
xm_defines=POSIX
;; ;;
esac esac
...@@ -1722,22 +1722,30 @@ powerpc-*-gnu*) ...@@ -1722,22 +1722,30 @@ powerpc-*-gnu*)
thread_file='posix' thread_file='posix'
fi fi
;; ;;
powerpc-wrs-vxworks*) powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
# We want vxworks.h after rs6000/sysv4.h, which unfortunately # We want vxworks.h after rs6000/sysv4.h, which unfortunately
# means we have to redo the tm_file list from scratch. # means we have to redo the tm_file list from scratch.
tm_file="rs6000/rs6000.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h" tm_file="rs6000/rs6000.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
tm_file="${tm_file} vxworks.h rs6000/vxworks.h"
tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks" tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
extra_options="${extra_options} rs6000/sysv4.opt" extra_options="${extra_options} rs6000/sysv4.opt"
extra_headers=ppc-asm.h extra_headers=ppc-asm.h
case ${target} in
*-vxworksae*)
tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/vxworksae.h"
tmake_file="${tmake_file} rs6000/t-vxworksae"
;;
*-vxworks*)
tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h"
;;
esac
;; ;;
powerpc-wrs-windiss*) # Instruction-level simulator for VxWorks. 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" 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" tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
extra_options="${extra_options} rs6000/sysv4.opt" extra_options="${extra_options} rs6000/sysv4.opt"
thread_file="" thread_file=""
use_fixproto=yes use_fixproto=yes
;; ;;
powerpc-*-lynxos*) powerpc-*-lynxos*)
xm_defines=POSIX xm_defines=POSIX
tm_file="${tm_file} dbxelf.h elfos.h rs6000/sysv4.h rs6000/lynx.h lynx.h" tm_file="${tm_file} dbxelf.h elfos.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
......
# Multilibs for VxWorks. # Multilibs for VxWorks.
MULTILIB_OPTIONS = t403/t405/t440/t603/t604/t860 # The base multilib is -mhard-float.
MULTILIB_DIRNAMES = PPC403gnu PPC405gnu PPC440gnu \ MULTILIB_OPTIONS = mrtp fPIC msoft-float
PPC603gnu PPC604gnu PPC860gnu MULTILIB_DIRNAMES =
MULTILIB_MATCHES = fPIC=fpic
MULTILIB_EXCEPTIONS = fPIC*
MULTILIB_MATCHES = t604= # Restore some variables from t-vxworks clobbered by t-ppccomm.
EXTRA_MULTILIB_PARTS =
# Put vxlib.c back in LIB2FUNCS_EXTRA (t-ppccomm clobbers it). LIB2FUNCS_EXTRA = $(srcdir)/config/vxlib.c
LIB2FUNCS_EXTRA += $(srcdir)/config/vxlib.c
# Multilibs for VxWorks AE.
MULTILIB_OPTIONS = mvthreads msoft-float
MULTILIB_MATCHES =
MULTILIB_EXCEPTIONS =
/* Definitions of target machine for GNU compiler. Vxworks PowerPC version. /* Definitions of target machine for GNU compiler. Vxworks PowerPC version.
Copyright (C) 1996, 2000, 2002, 2003 Free Software Foundation, Inc. Copyright (C) 1996, 2000, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC.
This file is part of GCC. This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it GCC is free software; you can redistribute it and/or modify it under
under the terms of the GNU General Public License as published the terms of the GNU General Public License as published by the Free
by the Free Software Foundation; either version 2, or (at your Software Foundation; either version 2, or (at your option) any later
option) any later version. version.
GCC is distributed in the hope that it will be useful, but WITHOUT GCC is distributed in the hope that it will be useful, but WITHOUT ANY
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY WARRANTY; without even the implied warranty of MERCHANTABILITY or
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the along with GCC; see the file COPYING. If not, write to the Free
Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
MA 02110-1301, USA. */ 02110-1301, USA. */
#undef TARGET_OS_CPP_BUILTINS /* Note to future editors: VxWorks is mostly an EABI target. We do
not use rs6000/eabi.h because we would have to override most of
it anyway. However, if you change that file, consider making
analogous changes here too. */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (PowerPC VxWorks)");
/* CPP predefined macros. */
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \ #define TARGET_OS_CPP_BUILTINS() \
do \ do \
{ \ { \
builtin_define ("__ppc"); \
builtin_define ("__EABI__"); \
builtin_define ("__ELF__"); \
builtin_define ("__vxworks"); \ builtin_define ("__vxworks"); \
builtin_define ("__vxworks__"); \ builtin_define ("__VXWORKS__"); \
if (!TARGET_SOFT_FLOAT) \
builtin_define ("__hardfp"); \
if (flag_pic == 2) \
{ \
builtin_define ("__PIC__=2"); \
builtin_define ("__pic__=2"); \
} \
else if (flag_pic == 1) \
{ \
builtin_define ("__PIC__=1"); \
builtin_define ("__pic__=1"); \
} \
\
/* C89 namespace violation! */ \
builtin_define ("CPU_FAMILY=PPC"); \
} \ } \
while (0) while (0)
/* Only big endian PPC is supported by VxWorks. */
#undef BYTES_BIG_ENDIAN
#define BYTES_BIG_ENDIAN 1
/* We have to kill off the entire specs set created by rs6000/sysv4.h /* We have to kill off the entire specs set created by rs6000/sysv4.h
and substitute our own set. The top level vxworks.h has done some and substitute our own set. The top level vxworks.h has done some
of this for us. */ of this for us. */
...@@ -38,45 +72,92 @@ ...@@ -38,45 +72,92 @@
#define SUBTARGET_EXTRA_SPECS /* none needed */ #define SUBTARGET_EXTRA_SPECS /* none needed */
/* FIXME: The only reason we allow no -mcpu switch at all is because
config-ml.in insists on a "." multilib. */
#define CPP_SPEC \ #define CPP_SPEC \
"-DCPU_FAMILY=PPC -D__ppc -D__EABI__ \ "%{!DCPU=*: \
%{t403: -DCPU=PPC403 -D_SOFT_FLOAT ; \ %{mcpu=403 : -DCPU=PPC403 ; \
t405: -DCPU=PPC405 -D_SOFT_FLOAT ; \ mcpu=405 : -DCPU=PPC405 ; \
t440: -DCPU=PPC440 -D_SOFT_FLOAT ; \ mcpu=440 : -DCPU=PPC440 ; \
t603: -DCPU=PPC603 ; \ mcpu=603 : -DCPU=PPC603 ; \
t604: -DCPU=PPC604 ; \ mcpu=604 : -DCPU=PPC604 ; \
t860: -DCPU=PPC860 -D_SOFT_FLOAT ; \ mcpu=860 : -DCPU=PPC860 ; \
: -DCPU=PPC604} \ mcpu=8540: -DCPU=PPC85XX ; \
%{!msoft-float:-D__hardfp} \ : -DCPU=PPC604 }}" \
%{fpic|fpie: -D__PIC__=1 -D__pic__=1 ; \ VXWORKS_ADDITIONAL_CPP_SPEC
fPIC|fPIE: -D__PIC__=2 -D__pic__=2 } \
%(cpp_cpu)" #define CC1_SPEC \
"%{G*} %{mno-sdata:-msdata=none} %{msdata:-msdata=default} \
#define CC1_SPEC \
"%{t403: -mcpu=403 -mstrict-align ; \
t405: -mcpu=405 -mstrict-align ; \
t440: -mcpu=440 -mstrict-align ; \
t603: -mcpu=603 -mstrict-align ; \
t604: -mcpu=604 -mstrict-align ; \
t860: -mcpu=860 ; \
: -mcpu=604 -mstrict-align } \
%{G*} %{mno-sdata:-msdata=none} %{msdata:-msdata=default} \
%{mlittle|mlittle-endian:-mstrict-align} \ %{mlittle|mlittle-endian:-mstrict-align} \
%{profile: -p} \ %{profile: -p} \
%{fvec:-maltivec} %{fvec-eabi:-maltivec -mabi=altivec}" %{fvec:-maltivec} %{fvec-eabi:-maltivec -mabi=altivec}"
#define ASM_SPEC "%(asm_cpu) \ #define ASM_SPEC \
%{.s: %{mregnames} %{mno-regnames}} %{.S: %{mregnames} %{mno-regnames}} \ "%(asm_cpu) \
%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \ %{.s: %{mregnames} %{mno-regnames}} %{.S: %{mregnames} %{mno-regnames}} \
%{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} -mbig" %{v:-v} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \
%{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} -mbig"
#undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS { "t604" } #undef LIB_SPEC
#define LIB_SPEC VXWORKS_LIB_SPEC
/* We can't use .ctors/.dtors sections. */ #undef LINK_SPEC
#undef TARGET_ASM_OUTPUT_CONSTRUCTOR #define LINK_SPEC VXWORKS_LINK_SPEC
#undef TARGET_ASM_OUTPUT_DESTRUCTOR #undef STARTFILE_SPEC
#define STARTFILE_SPEC VXWORKS_STARTFILE_SPEC
/* Nor sdata. */ #undef ENDFILE_SPEC
#undef SDATA_DEFAULT_SIZE #define ENDFILE_SPEC VXWORKS_ENDFILE_SPEC
#define SDATA_DEFAULT_SIZE 0
/* There is no default multilib. */
#undef MULTILIB_DEFAULTS
#undef TARGET_DEFAULT
#define TARGET_DEFAULT \
(MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_EABI | MASK_STRICT_ALIGN)
#undef PROCESSOR_DEFAULT
#define PROCESSOR_DEFAULT PROCESSOR_PPC604
/* Nor sdata, for kernel mode. We use this in
SUBSUBTARGET_INITIALIZE_OPTIONS, after rs6000_rtp has been initialized. */
#undef SDATA_DEFAULT_SIZE
#define SDATA_DEFAULT_SIZE (TARGET_VXWORKS_RTP ? 8 : 0)
#undef STACK_BOUNDARY
#define STACK_BOUNDARY (16*BITS_PER_UNIT)
/* Override sysv4.h, reset to the default. */
#undef PREFERRED_STACK_BOUNDARY
/* Enable SPE */
#undef TARGET_SPE_ABI
#undef TARGET_SPE
#undef TARGET_E500
#undef TARGET_ISEL
#undef TARGET_FPRS
#define TARGET_SPE_ABI rs6000_spe_abi
#define TARGET_SPE rs6000_spe
#define TARGET_E500 (rs6000_cpu == PROCESSOR_PPC8540)
#define TARGET_ISEL rs6000_isel
#define TARGET_FPRS (!rs6000_float_gprs)
/* Make -mcpu=8540 imply SPE. ISEL is automatically enabled, the
others must be done by hand. Handle -mrtp. Disable -fPIC
for -mrtp - the VxWorks PIC model is not compatible with it. */
#undef SUBSUBTARGET_OVERRIDE_OPTIONS
#define SUBSUBTARGET_OVERRIDE_OPTIONS \
do { \
if (TARGET_E500) \
{ \
rs6000_spe = 1; \
rs6000_spe_abi = 1; \
rs6000_float_gprs = 1; \
} \
\
if (!g_switch_set) \
g_switch_value = SDATA_DEFAULT_SIZE; \
VXWORKS_OVERRIDE_OPTIONS; \
} while (0)
/* No _mcount profiling on VxWorks. */
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE,LABELNO) VXWORKS_FUNCTION_PROFILER(FILE,LABELNO)
/* PowerPC VxWorks AE target definitions for GNU compiler.
Copyright (C) 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (PowerPC VxWorks AE)");
# Since we have a functional assert.h, use it. # Don't run fixproto.
INSTALL_ASSERT_H = STMP_FIXPROTO =
# Build libgcc using the multilib mechanism # Build libgcc using the multilib mechanism
LIBGCC = stmp-multilib LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib INSTALL_LIBGCC = install-multilib
...@@ -15,8 +14,14 @@ LIBGCC2_DEBUG_CFLAGS = ...@@ -15,8 +14,14 @@ LIBGCC2_DEBUG_CFLAGS =
# Extra libgcc2 module used by gthr-vxworks.h functions # Extra libgcc2 module used by gthr-vxworks.h functions
LIB2FUNCS_EXTRA = $(srcdir)/config/vxlib.c LIB2FUNCS_EXTRA = $(srcdir)/config/vxlib.c
# Some runtime modules need these. Can't set extra_headers in config.gcc
# because the paths are always made absolute to the cpu config dir.
EXTRA_HEADERS += $(srcdir)/gthr-vxworks.h gthr-default.h
# This ensures that the correct target headers are used; some # This ensures that the correct target headers are used; some
# VxWorks system headers have names that collide with GCC's # VxWorks system headers have names that collide with GCC's
# internal (host) headers, e.g. regs.h. # internal (host) headers, e.g. regs.h.
# FIXME: May not be necessary anymore. # FIXME: May not be necessary anymore.
LIBGCC2_INCLUDES="-I$(SYSTEM_HEADER_DIR)" LIBGCC2_INCLUDES="-I$(SYSTEM_HEADER_DIR)"
EXTRA_MULTILIB_PARTS =
/* Target-independent configuration for VxWorks and VxWorks AE.
Copyright (C) 2005 Free Software Foundation, Inc.
Contributed by 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, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
/* VxWorks headers are C++-aware. */
#undef NO_IMPLICIT_EXTERN_C
#define NO_IMPLICIT_EXTERN_C
/* Most of these will probably be overridden by subsequent headers. We
undefine them here just in case, and define VXWORKS_ versions of each,
to be used in port-specific vxworks.h. */
#undef LIB_SPEC
#undef LINK_SPEC
#undef LIBGCC_SPEC
#define LIBGCC_SPEC VXWORKS_LIBGCC_SPEC
#undef STARTFILE_SPEC
#undef ENDFILE_SPEC
/* Most of these macros are overridden in "config/vxworks.h" or
"config/vxworksae.h" and are here merely for documentation
purposes. */
#define VXWORKS_ADDITIONAL_CPP_SPEC ""
#define VXWORKS_LIB_SPEC ""
#define VXWORKS_LINK_SPEC ""
#define VXWORKS_LIBGCC_SPEC ""
#define VXWORKS_STARTFILE_SPEC ""
#define VXWORKS_ENDFILE_SPEC ""
/* VxWorks cannot have dots in constructor labels, because it uses a
mutant variation of collect2 that generates C code instead of
assembly. Thus each constructor label must be a legitimate C
symbol. FIXME: Have VxWorks use real collect2 instead. */
#undef NO_DOLLAR_IN_LABEL
#define NO_DOT_IN_LABEL
/* VxWorks 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
/* Dwarf2 unwind info is not supported. */
#define DWARF2_UNWIND_INFO 0
/* VxWorks uses DWARF2. */
#define DWARF2_DEBUGGING_INFO 1
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
/* None of these other formats is supported. */
#undef DWARF_DEBUGGING_INFO
#undef DBX_DEBUGGING_INFO
#undef SDB_DEBUGGING_INFO
#undef XCOFF_DEBUGGING_INFO
#undef VMS_DEBUGGING_INFO
/* Kernel mode doesn't have ctors/dtors, but RTP mode does. */
#define TARGET_HAVE_CTORS_DTORS false
#define VXWORKS_OVERRIDE_OPTIONS /* empty */
/* No math library needed. */
#define MATH_LIBRARY ""
/* No profiling. */
#define VXWORKS_FUNCTION_PROFILER(FILE, LABELNO) do \
{ \
sorry ("profiler support for VxWorks"); \
} while (0)
/* This section either contains dynamic relocations, or contains
PC-rel indirections to stubs in the data section which contain dynamic
relocations. General dynamic relocations are not processed
for shared libraries' text segments, and PC-relative displacements
from the text segment to the data segment don't work. So force
it to .gcc_except_section, which the linker will place in .data. */
void vxworks_exception_section (void);
#undef TARGET_ASM_EXCEPTION_SECTION
#define TARGET_ASM_EXCEPTION_SECTION default_exception_section
/* We occasionally need to distinguish between the VxWorks variants. */
#define VXWORKS_KIND_NORMAL 1
#define VXWORKS_KIND_AE 2
/* Common VxWorks target definitions for GCC. /* Common VxWorks target definitions for GNU compiler.
Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Contributed by Wind River Systems. Contributed by Wind River Systems.
Rewritten by CodeSourcery, LLC.
This file is part of GCC. This file is part of GCC.
GCC is free software; you can redistribute it and/or modify GCC is free software; you can redistribute it and/or modify it under
it under the terms of the GNU General Public License as published by the terms of the GNU General Public License as published by the Free
the Free Software Foundation; either version 2, or (at your option) Software Foundation; either version 2, or (at your option) any later
any later version. version.
GCC is distributed in the hope that it will be useful, GCC is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
GNU General Public License for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to along with GCC; see the file COPYING. If not, write to the Free
the Free Software Foundation, 51 Franklin Street, Fifth Floor, Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
Boston, MA 02110-1301, USA. */ 02110-1301, USA. */
/* Specify what to link with. */ /* In kernel mode, VxWorks provides all the libraries itself, as well as
/* VxWorks does all the library stuff itself. */ the functionality of startup files, etc. In RTP mode, it behaves more
#undef LIB_SPEC like a traditional Unix, with more external files. Most of our specs
#define LIB_SPEC "" must be aware of the difference. */
#undef LINK_SPEC /* The directory containing the VxWorks target headers. */
#define LINK_SPEC "-r" #define VXWORKS_TARGET_DIR "/home/tornado/base6/target"
/* VxWorks provides the functionality of crt0.o and friends itself. */ /* Since we provide a default -isystem, expand -isystem on the command
#undef STARTFILE_SPEC line early. */
#define STARTFILE_SPEC "" #undef VXWORKS_ADDITIONAL_CPP_SPEC
#define VXWORKS_ADDITIONAL_CPP_SPEC " \
%{!nostdinc:%{isystem*}} \
%{mrtp: -D__RTP__=1 \
%{!nostdinc:-isystem " VXWORKS_TARGET_DIR "/usr/h}} \
%{!mrtp:-D_WRS_KERNEL=1 \
%{!nostdinc:-isystem " VXWORKS_TARGET_DIR "/h}}"
#undef ENDFILE_SPEC /* The references to __init and __fini will be satisified by
#define ENDFILE_SPEC "" libc_internal.a. */
#undef VXWORKS_LIB_SPEC
#define VXWORKS_LIB_SPEC \
"%{mrtp:%{shared:-u " USER_LABEL_PREFIX "__init -u " USER_LABEL_PREFIX "__fini} \
%{!shared:%{non-static:-u " USER_LABEL_PREFIX "_STI__6__rtld -ldl} \
--start-group -lc -lgcc -lc_internal -lnet -ldsi \
--end-group}}"
/* VxWorks cannot have dots in constructor labels, because it uses a /* The no-op spec for "-shared" below is present because otherwise GCC
mutant variation of collect2 that generates C code instead of will treat it as an unrecognized option. */
assembly. Thus each constructor label must be a legitimate C #undef VXWORKS_LINK_SPEC
symbol. FIXME: Have VxWorks use real collect2 instead. */ #define VXWORKS_LINK_SPEC \
"%{!mrtp:-r} \
%{!shared: \
%{mrtp:-q %{h*} \
%{R*} %{!Wl,-T*: %{!T*: %(link_start) }} \
%(link_target) %(link_os)}} \
%{v:-V} \
%{shared:-shared} \
%{Bstatic:-Bstatic} \
%{Bdynamic:-Bdynamic} \
%{!Xbind-lazy:-z now} \
%{Xbind-now:%{Xbind-lazy: \
%e-Xbind-now and -Xbind-lazy are incompatible}} \
%{mrtp:%{!shared:%{!non-static:-static} \
%{non-static:--force-dynamic --export-dynamic}}}"
#undef NO_DOLLAR_IN_LABEL /* For VxWorks, the system provides libc_internal.a. This is a superset
#define NO_DOT_IN_LABEL of libgcc.a; we want to use it. Make sure not to dynamically export
any of its symbols, though. Always look for libgcc.a first so that
we get the latest versions of the GNU intrinsics during our builds. */
#undef VXWORKS_LIBGCC_SPEC
#define VXWORKS_LIBGCC_SPEC \
"-lgcc %{mrtp:--exclude-libs=libc_internal,libgcc -lc_internal}"
/* We want #pragma pack(n) enabled and expect to inherit the proper #undef VXWORKS_STARTFILE_SPEC
definition of HANDLE_SYSV_PRAGMA from elfos.h for that purpose. */ #define VXWORKS_STARTFILE_SPEC "%{mrtp:%{!shared:crt0.o%s}}"
#define VXWORKS_ENDFILE_SPEC ""
/* No underscore is prepended to any C symbol name. */ /* We can use .ctors/.dtors sections only in RTP mode.
#undef USER_LABEL_PREFIX Unfortunately this must be an integer constant expression;
#define USER_LABEL_PREFIX "" fix up in override_options. */
#undef VXWORKS_OVERRIDE_OPTIONS
#define VXWORKS_OVERRIDE_OPTIONS do { \
targetm.have_ctors_dtors = TARGET_VXWORKS_RTP; \
} while (0)
/* VxWorks uses wchar_t == unsigned short (UCS2) on all architectures. */ /* The VxWorks runtime uses a clever trick to get the sentinel entry
#undef WCHAR_TYPE (-1) inserted at the beginning of the .ctors segment. This trick
#define WCHAR_TYPE "short unsigned int" will not work if we ever generate any entries in plain .ctors
#undef WCHAR_TYPE_SIZE sections; we must always use .ctors.PRIORITY. */
#define WCHAR_TYPE_SIZE 16 #define ALWAYS_NUMBER_CTORS_SECTIONS 1
/* Dwarf2 unwind info is not supported. */ /* The name of the symbol for the table of GOTs in a particular
#define DWARF2_UNWIND_INFO 0 RTP. */
/* Weak symbols and link-once sections are not enabled by default. */ #define VXWORKS_GOTT_BASE "__GOTT_BASE__"
#define DEFAULT_USE_WEAK 0 /* The name of the symbol for the index into the table of GOTs for the
GOT associated with the current shared library. */
#define VXWORKS_GOTT_INDEX "__GOTT_INDEX__"
/* Only supported debug format is Dwarf2. */ #define VXWORKS_KIND VXWORKS_KIND_NORMAL
#undef DBX_DEBUGGING_INFO
; Processor-independent options for VxWorks.
;
; Copyright (C) 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA
; 02110-1301, USA.
mrtp
Target Report RejectNegative Mask(VXWORKS_RTP) Condition(VXWORKS_KIND == VXWORKS_KIND_NORMAL)
Assume the VxWorks RTP environment
; VxWorks AE has two modes: kernel mode and vThreads mode. In
; general, back ends do not actually need to know which mode they're
; in, so we do not have to set any flags.
mvthreads
Target RejectNegative Condition(VXWORKS_KIND == VXWORKS_KIND_AE)
Assume the VxWorks vThreads environment
/* Common VxWorks AE target definitions for GNU compiler.
Copyright (C) 2004, 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
/* This header should be included after including vx-common.h. */
/* Most of the definitions below this point are versions of the
vxworks.h definitions, without the -mrtp bits. */
/* The directory containing the VxWorks AE target headers. */
#define VXWORKSAE_TARGET_DIR \
"/home/tornado/vxworks-ae/latest/target"
/* Include target/vThreads/h or target/h (depending on the compilation
mode), and then target/val/h (in either mode). The macros defined
are in the user's namespace, but the VxWorks headers require
them. */
#undef VXWORKS_ADDITIONAL_CPP_SPEC
#define VXWORKS_ADDITIONAL_CPP_SPEC " \
%{!nostdinc:%{isystem*}} \
%{mvthreads:-DVTHREADS=1 \
%{!nostdinc:-isystem " VXWORKSAE_TARGET_DIR "/vThreads/h}} \
%{!mvthreads:-DAE653_BUILD=1 \
%{!nostdinc:-isystem " VXWORKSAE_TARGET_DIR "/h}} \
%{!nostdinc:-isystem " VXWORKSAE_TARGET_DIR "/val/h}"
#undef VXWORKS_LIB_SPEC
#define VXWORKS_LIB_SPEC ""
#undef VXWORKS_LINK_SPEC
#define VXWORKS_LINK_SPEC \
"-r %{v:-V}"
#undef VXWORKS_LIBGCC_SPEC
#define VXWORKS_LIBGCC_SPEC \
"-lgcc"
#undef VXWORKS_STARTFILE_SPEC
#define VXWORKS_STARTFILE_SPEC ""
#define VXWORKS_KIND VXWORKS_KIND_AE
...@@ -126,12 +126,14 @@ Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -126,12 +126,14 @@ Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define TARGET_ASM_OUTPUT_MI_THUNK NULL #define TARGET_ASM_OUTPUT_MI_THUNK NULL
#define TARGET_ASM_CAN_OUTPUT_MI_THUNK hook_bool_tree_hwi_hwi_tree_false #define TARGET_ASM_CAN_OUTPUT_MI_THUNK hook_bool_tree_hwi_hwi_tree_false
#if defined(TARGET_ASM_CONSTRUCTOR) && defined(TARGET_ASM_DESTRUCTOR) #if !defined(TARGET_HAVE_CTORS_DTORS)
#define TARGET_HAVE_CTORS_DTORS true # if defined(TARGET_ASM_CONSTRUCTOR) && defined(TARGET_ASM_DESTRUCTOR)
#else # define TARGET_HAVE_CTORS_DTORS true
#define TARGET_HAVE_CTORS_DTORS false # else
#define TARGET_ASM_CONSTRUCTOR NULL # define TARGET_HAVE_CTORS_DTORS false
#define TARGET_ASM_DESTRUCTOR NULL # define TARGET_ASM_CONSTRUCTOR NULL
# define TARGET_ASM_DESTRUCTOR NULL
# endif
#endif #endif
#ifdef TARGET_ASM_NAMED_SECTION #ifdef TARGET_ASM_NAMED_SECTION
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment