Commit 9ebbca7d by Geoff Keating Committed by Geoffrey Keating

See the ChangeLog on the branch for more details.

	* configure.in: Merge in changes from newppc-branch.
	* configure: Regenerate.
	* config/rs6000/*: Merge in changes from newppc-branch.
	Also correct copyright notices.

From-SVN: r32575
parent 12822146
2000-03-15 Geoff Keating <geoffk@cygnus.com>
See the ChangeLog on the branch for more details.
* configure.in: Merge in changes from newppc-branch.
* configure: Regenerate.
* config/rs6000/*: Merge in changes from newppc-branch.
Also correct copyright notices.
Wed Mar 15 15:43:38 2000 Jeffrey A Law (law@cygnus.com)
* acconfig.h (HAVE_GAS_WEAK): New define.
......
/* Definitions of target machine for GNU compiler,
for IBM RS/6000 running AIX version 3.1.
Copyright (C) 1993,1997 Free Software Foundation, Inc.
Copyright (C) 1993,1997, 2000 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@nyu.edu)
This file is part of GNU CC.
......@@ -22,6 +22,45 @@ Boston, MA 02111-1307, USA. */
#include "rs6000/rs6000.h"
#include "rs6000/aix.h"
/* Output something to declare an external symbol to the assembler. Most
assemblers don't need this.
If we haven't already, add "[RW]" (or "[DS]" for a function) to the
name. Normally we write this out along with the name. In the few cases
where we can't, it gets stripped off. */
#undef ASM_OUTPUT_EXTERNAL
#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
{ rtx _symref = XEXP (DECL_RTL (DECL), 0); \
if ((TREE_CODE (DECL) == VAR_DECL \
|| TREE_CODE (DECL) == FUNCTION_DECL) \
&& (NAME)[strlen (NAME) - 1] != ']') \
{ \
char *_name = (char *) permalloc (strlen (XSTR (_symref, 0)) + 5); \
strcpy (_name, XSTR (_symref, 0)); \
strcat (_name, TREE_CODE (DECL) == FUNCTION_DECL ? "[DS]" : "[RW]"); \
XSTR (_symref, 0) = _name; \
} \
fputs ("\t.extern ", FILE); \
assemble_name (FILE, XSTR (_symref, 0)); \
if (TREE_CODE (DECL) == FUNCTION_DECL) \
{ \
fputs ("\n\t.extern .", FILE); \
RS6000_OUTPUT_BASENAME (FILE, XSTR (_symref, 0)); \
} \
putc ('\n', FILE); \
}
/* Similar, but for libcall. We only have to worry about the function name,
not that of the descriptor. */
#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
{ fputs ("\t.extern .", FILE); \
assemble_name (FILE, XSTR (FUN, 0)); \
putc ('\n', FILE); \
}
/* AIX 3.2 defined _AIX32, but older versions do not. */
#undef CPP_PREDEFINES
......
/* Definitions of target machine for GNU compiler,
for IBM RS/6000 POWER running AIX version 3.x with the fixed assembler.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc.
Contributed by Jason Merrill (jason@cygnus.com).
This file is part of GNU CC.
......@@ -21,15 +21,8 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Enable AIX XL compiler calling convention breakage compatibility. */
#define MASK_XL_CALL 0x40000000
#define TARGET_XL_CALL (target_flags & MASK_XL_CALL)
#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
{"xl-call", MASK_XL_CALL}, \
{"no-xl-call", - MASK_XL_CALL},
#include "rs6000/rs6000.h"
#include "rs6000/aix.h"
/* Tell the assembler to assume that all undefined names are external. */
......@@ -68,21 +61,3 @@ Boston, MA 02111-1307, USA. */
%{mcpu=common: milli.exp%s} \
%{shared:-bM:SRE}"
#endif
/* These are not necessary when we pass -u to the assembler, and undefining
them saves a great deal of space in object files. */
#undef ASM_OUTPUT_EXTERNAL
#undef ASM_OUTPUT_EXTERNAL_LIBCALL
#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
{ rtx _symref = XEXP (DECL_RTL (DECL), 0); \
if ((TREE_CODE (DECL) == VAR_DECL \
|| TREE_CODE (DECL) == FUNCTION_DECL) \
&& (NAME)[strlen (NAME) - 1] != ']') \
{ \
char *_name = (char *) permalloc (strlen (XSTR (_symref, 0)) + 5); \
strcpy (_name, XSTR (_symref, 0)); \
strcat (_name, TREE_CODE (DECL) == FUNCTION_DECL ? "[DS]" : "[RW]"); \
XSTR (_symref, 0) = _name; \
} \
}
/* Definitions of target machine for GNU compiler,
for IBM RS/6000 POWER running AIX version 4.1.
Copyright (C) 1994, 1995, 1996, 1998, 1998, 1999
Copyright (C) 1994, 95, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
Contributed by David Edelsohn (edelsohn@gnu.org).
......@@ -22,51 +22,19 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Enable AIX XL compiler calling convention breakage compatibility. */
#define MASK_XL_CALL 0x40000000
#define TARGET_XL_CALL (target_flags & MASK_XL_CALL)
#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
{"xl-call", MASK_XL_CALL}, \
{"no-xl-call", - MASK_XL_CALL}, \
{"threads", 0}, \
{"pe", 0},
#include "rs6000/rs6000.h"
#include "rs6000/aix.h"
#undef SUBSUBTARGET_SWITCHES
#define SUBSUBTARGET_SWITCHES \
{"threads", 0, \
"Use the thread library and reentrant C library" }, \
{"pe", 0, \
"Support message passing with the Parallel Environment" },
#undef ASM_SPEC
#define ASM_SPEC "-u %(asm_cpu)"
/* Common ASM definitions used by ASM_SPEC amonst the various targets
for handling -mcpu=xxx switches. */
#undef ASM_CPU_SPEC
#define ASM_CPU_SPEC \
"%{!mcpu*: \
%{mpower: %{!mpower2: -mpwr}} \
%{mpower2: -mpwr2} \
%{mpowerpc*: -mppc} \
%{!mpower*: %{!mpowerpc*: %(asm_default)}}} \
%{mcpu=common: -mcom} \
%{mcpu=power: -mpwr} \
%{mcpu=power2: -mpwr2} \
%{mcpu=powerpc: -mppc} \
%{mcpu=rios: -mpwr} \
%{mcpu=rios1: -mpwr} \
%{mcpu=rios2: -mpwr2} \
%{mcpu=rsc: -mpwr} \
%{mcpu=rsc1: -mpwr} \
%{mcpu=403: -mppc} \
%{mcpu=505: -mppc} \
%{mcpu=601: -m601} \
%{mcpu=602: -mppc} \
%{mcpu=603: -m603} \
%{mcpu=603e: -m603} \
%{mcpu=604: -m604} \
%{mcpu=604e: -m604} \
%{mcpu=620: -mppc} \
%{mcpu=821: -mppc} \
%{mcpu=860: -mppc}"
#undef ASM_DEFAULT_SPEC
#define ASM_DEFAULT_SPEC "-mcom"
......@@ -80,35 +48,6 @@ Boston, MA 02111-1307, USA. */
%{mthreads: -D_THREAD_SAFE}\
%(cpp_cpu)"
/* Common CPP definitions used by CPP_SPEC among the various targets
for handling -mcpu=xxx switches. */
#undef CPP_CPU_SPEC
#define CPP_CPU_SPEC \
"%{!mcpu*: \
%{mpower: %{!mpower2: -D_ARCH_PWR}} \
%{mpower2: -D_ARCH_PWR2} \
%{mpowerpc*: -D_ARCH_PPC} \
%{!mpower*: %{!mpowerpc*: %(cpp_default)}}} \
%{mcpu=common: -D_ARCH_COM} \
%{mcpu=power: -D_ARCH_PWR} \
%{mcpu=power2: -D_ARCH_PWR2} \
%{mcpu=powerpc: -D_ARCH_PPC} \
%{mcpu=rios: -D_ARCH_PWR} \
%{mcpu=rios1: -D_ARCH_PWR} \
%{mcpu=rios2: -D_ARCH_PWR2} \
%{mcpu=rsc: -D_ARCH_PWR} \
%{mcpu=rsc1: -D_ARCH_PWR} \
%{mcpu=403: -D_ARCH_PPC} \
%{mcpu=505: -D_ARCH_PPC} \
%{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \
%{mcpu=602: -D_ARCH_PPC} \
%{mcpu=603: -D_ARCH_PPC} \
%{mcpu=603e: -D_ARCH_PPC} \
%{mcpu=604: -D_ARCH_PPC} \
%{mcpu=620: -D_ARCH_PPC} \
%{mcpu=821: -D_ARCH_PPC} \
%{mcpu=860: -D_ARCH_PPC}"
#undef CPP_DEFAULT_SPEC
#define CPP_DEFAULT_SPEC "-D_ARCH_COM"
......@@ -130,24 +69,6 @@ Boston, MA 02111-1307, USA. */
#undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS { "mcpu=common" }
/* These are not necessary when we pass -u to the assembler, and undefining
them saves a great deal of space in object files. */
#undef ASM_OUTPUT_EXTERNAL
#undef ASM_OUTPUT_EXTERNAL_LIBCALL
#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
{ rtx _symref = XEXP (DECL_RTL (DECL), 0); \
if ((TREE_CODE (DECL) == VAR_DECL \
|| TREE_CODE (DECL) == FUNCTION_DECL) \
&& (NAME)[strlen (NAME) - 1] != ']') \
{ \
char *_name = (char *) permalloc (strlen (XSTR (_symref, 0)) + 5); \
strcpy (_name, XSTR (_symref, 0)); \
strcat (_name, TREE_CODE (DECL) == FUNCTION_DECL ? "[DS]" : "[RW]"); \
XSTR (_symref, 0) = _name; \
} \
}
#undef LIB_SPEC
#define LIB_SPEC "%{pg:-L/lib/profiled -L/usr/lib/profiled}\
%{p:-L/lib/profiled -L/usr/lib/profiled} %{!shared:%{g*:-lg}}\
......
/* Definitions of target machine for GNU compiler,
for IBM RS/6000 POWER running AIX version 4.3.
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
Contributed by David Edelsohn (edelsohn@gnu.org).
This file is part of GNU CC.
......@@ -21,17 +21,20 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Enable AIX XL compiler calling convention breakage compatibility. */
#define MASK_XL_CALL 0x40000000
#define TARGET_XL_CALL (target_flags & MASK_XL_CALL)
#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
{"aix64", MASK_64BIT | MASK_POWERPC64 | MASK_POWERPC}, \
{"aix32", - (MASK_64BIT | MASK_POWERPC64)}, \
{"xl-call", MASK_XL_CALL}, \
{"no-xl-call", - MASK_XL_CALL}, \
{"threads", 0}, \
{"pe", 0},
#include "rs6000/rs6000.h"
#include "rs6000/aix.h"
/* AIX 4.3 and above support 64-bit executables. */
#undef SUBSUBTARGET_SWITCHES
#define SUBSUBTARGET_SWITCHES \
{"aix64", MASK_64BIT | MASK_POWERPC64 | MASK_POWERPC, \
"Compile for 64-bit pointers" }, \
{"aix32", - (MASK_64BIT | MASK_POWERPC64), \
"Compile for 32-bit pointers" }, \
{"threads", 0, \
"Use the thread library and reentrant C library" }, \
{"pe", 0, \
"Support message passing with the Parallel Environment" },
/* Sometimes certain combinations of command options do not make sense
on a particular target machine. You can define a macro
......@@ -57,8 +60,6 @@ do { \
} \
} while (0);
#include "rs6000/rs6000.h"
#undef ASM_SPEC
#define ASM_SPEC "-u %{maix64:-a64 -mppc64} %(asm_cpu)"
......@@ -161,24 +162,6 @@ do { \
#undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS { "mcpu=common" }
/* These are not necessary when we pass -u to the assembler, and undefining
them saves a great deal of space in object files. */
#undef ASM_OUTPUT_EXTERNAL
#undef ASM_OUTPUT_EXTERNAL_LIBCALL
#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
{ rtx _symref = XEXP (DECL_RTL (DECL), 0); \
if ((TREE_CODE (DECL) == VAR_DECL \
|| TREE_CODE (DECL) == FUNCTION_DECL) \
&& (NAME)[strlen (NAME) - 1] != ']') \
{ \
char *_name = (char *) permalloc (strlen (XSTR (_symref, 0)) + 5); \
strcpy (_name, XSTR (_symref, 0)); \
strcat (_name, TREE_CODE (DECL) == FUNCTION_DECL ? "[DS]" : "[RW]"); \
XSTR (_symref, 0) = _name; \
} \
}
#undef LIB_SPEC
#define LIB_SPEC "%{pg:-L/lib/profiled -L/usr/lib/profiled}\
%{p:-L/lib/profiled -L/usr/lib/profiled}\
......@@ -214,7 +197,6 @@ do { \
#undef RS6000_CALL_GLUE
#define RS6000_CALL_GLUE "{cror 31,31,31|nop}"
#if 0
/* AIX 4.2 and above provides initialization and finalization function
support from linker command line. */
#undef HAS_INIT_SECTION
......@@ -222,4 +204,3 @@ do { \
#undef LD_INIT_SWITCH
#define LD_INIT_SWITCH "-binitfini"
#endif
/* Definitions of target machine for GNU compiler, for BeOS.
Copyright (C) 1997 Free Software Foundation, Inc.
Copyright (C) 1997, 2000 Free Software Foundation, Inc.
Contributed by Fred Fish (fnf@cygnus.com), based on aix41.h
from David Edelsohn (edelsohn@npac.syr.edu).
......@@ -21,6 +21,9 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "rs6000/rs6000.h"
#include "rs6000/aix.h"
/* Enable AIX XL compiler calling convention breakage compatibility. */
#define MASK_XL_CALL 0x40000000
#define TARGET_XL_CALL (target_flags & MASK_XL_CALL)
......@@ -31,8 +34,6 @@ Boston, MA 02111-1307, USA. */
{"threads", 0}, \
{"pe", 0},
#include "rs6000/rs6000.h"
#undef ASM_SPEC
#define ASM_SPEC "-u %(asm_cpu)"
......@@ -79,24 +80,6 @@ Boston, MA 02111-1307, USA. */
#undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS { "mcpu=powerpc" }
/* These are not necessary when we pass -u to the assembler, and undefining
them saves a great deal of space in object files. */
#undef ASM_OUTPUT_EXTERNAL
#undef ASM_OUTPUT_EXTERNAL_LIBCALL
#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
{ rtx _symref = XEXP (DECL_RTL (DECL), 0); \
if ((TREE_CODE (DECL) == VAR_DECL \
|| TREE_CODE (DECL) == FUNCTION_DECL) \
&& (NAME)[strlen (NAME) - 1] != ']') \
{ \
char *_name = (char *) permalloc (strlen (XSTR (_symref, 0)) + 5); \
strcpy (_name, XSTR (_symref, 0)); \
strcat (_name, TREE_CODE (DECL) == FUNCTION_DECL ? "[DS]" : "[RW]"); \
XSTR (_symref, 0) = _name; \
} \
}
/* These empty definitions get rid of the attempt to link in crt0.o
and any libraries like libc.a.
On BeOS the ld executable is actually a linker front end that first runs
......
/* Operating system specific defines to be used when targeting GCC for
hosting on Windows NT 3.x, using the Cygnus API
This is different to the winnt.h file, since that is used
to build GCC for use with a windows style library and tool
set, winnt.h uses the Microsoft tools to do that.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC 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.
GNU CC 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 GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Ugly hack */
#include "rs6000/win-nt.h"
#ifdef CPP_PREDEFINES
#undef CPP_PREDEFINES
#endif
#define CPP_PREDEFINES "-D_WIN32 -DWINNT -D__CYGWIN__ -D__CYGWIN32__ -DPOSIX \
-D_POWER -D_ARCH_PPC -D__PPC__ -Asystem(winnt) -Acpu(powerpc) -Amachine(powerpc)"
#undef CPP_SPEC
#define CPP_SPEC "-remap %{posix: -D_POSIX_SOURCE} %(cpp_cpu)"
/* We have to dynamic link to get to the system DLLs. All of libc, libm and
the Unix stuff is in cygwin.dll. The import library is called
'libcygwin.a'. For Windows applications, include more libraries, but
always include kernel32. We'd like to specific subsystem windows to
ld, but that doesn't work just yet. */
#undef LIB_SPEC
#define LIB_SPEC "-lcygwin %{mwindows:-luser32 -lgdi32 -lcomdlg32} -lkernel32"
#undef LINK_SPEC
#define LINK_SPEC "%{v:-V}"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "crti%O%s crt0%O%s"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtn%O%s"
#define PTRDIFF_TYPE "int"
#define WCHAR_UNSIGNED 1
#define WCHAR_TYPE_SIZE 16
#define WCHAR_TYPE "short unsigned int"
#define DBX_DEBUGGING_INFO
#undef SDB_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
# crti.s for eabi
# Copyright (C) 1996 Free Software Foundation, Inc.
# Copyright (C) 1996, 2000 Free Software Foundation, Inc.
# Written By Michael Meissner
#
# This file is free software; you can redistribute it and/or modify it
......@@ -102,6 +102,11 @@ __SBSS2_START__:
.type __EXCEPT_START__,@object
__EXCEPT_START__:
.section ".eh_frame","aw"
.globl __EH_FRAME_BEGIN__
.type __EH_FRAME_BEGIN__,@object
__EH_FRAME_BEGIN__:
# Head of __init function used for static constructors in Solaris
.section ".init","ax"
.align 2
......
# crtn.s for eabi
# Copyright (C) 1996 Free Software Foundation, Inc.
# Copyright (C) 1996, 2000 Free Software Foundation, Inc.
# Written By Michael Meissner
#
# This file is free software; you can redistribute it and/or modify it
......@@ -94,6 +94,12 @@ __SBSS2_END__:
.type __EXCEPT_END__,@object
__EXCEPT_END__:
.section ".eh_frame","aw"
.globl __EH_FRAME_END__
.type __EH_FRAME_END__,@object
__EH_FRAME_END__:
.long 0
# Tail of __init used for static constructors in Solaris
.section ".init","ax"
lwz 0,12(1)
......
/* Stripped down support to run global constructors and destructors on
embedded PowerPC systems.
Copyright (C) 1995 Free Software Foundation, Inc.
Copyright (C) 1995, 2000 Free Software Foundation, Inc.
Contributed by Michael Meissner (meissner@cygnus.com).
This file is part of GNU CC.
......@@ -28,65 +28,77 @@ Boston, MA 02111-1307, USA. */
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "tm.h"
#include "defaults.h"
#include <stddef.h>
#include "frame.h"
#include "gbl-ctors.h"
/* Declare a pointer to void function type. */
typedef void (*func_ptr) (void);
/* FIXME: This file should share code with all the other
constructor/destructor implementations in crtstuff.c and libgcc2.c. */
/* Declare the set of symbols use as begin and end markers for the lists
of global object constructors and global object destructors. */
extern func_ptr __CTOR_LIST__[];
extern func_ptr __CTOR_END__ [];
extern func_ptr __DTOR_LIST__[];
extern func_ptr __DTOR_END__ [];
extern func_ptr __CTOR_LIST__[] asm ("__CTOR_LIST__");
extern func_ptr __CTOR_END__ [] asm ("__CTOR_END__");
extern func_ptr __DTOR_LIST__[] asm ("__DTOR_LIST__");
extern func_ptr __DTOR_END__ [] asm ("__DTOR_END__");
extern unsigned char __EH_FRAME_BEGIN__[] asm ("__EH_FRAME_BEGIN__");
extern void __do_global_ctors (void);
extern void __do_global_dtors (void);
extern void __init (), __fini ();
/* The Solaris linker seems to incorrectly relocate PC relative relocations
to a different section (ie, calls to __init, __fini), so avoid it by
using a function pointer. */
static void (*init_ptr) (void) = __init;
static void (*fini_ptr) (void) = __fini;
void (*__atexit)(func_ptr);
/* Call all global constructors */
void
__do_global_ctors (void)
{
func_ptr *ptr = &__CTOR_END__[0] - 1;
func_ptr *start = &__CTOR_LIST__[0];
func_ptr *p = __CTOR_END__ - 1;
if (__atexit)
__atexit (__do_global_dtors);
#ifdef EH_FRAME_SECTION
{
static struct object object;
__register_frame_info (__EH_FRAME_BEGIN__, &object);
}
#endif
/* Call the constructors collected in the .ctors section. */
for ( ; ptr >= start; ptr--)
if (*ptr)
(*ptr)();
for ( ; p >= __CTOR_LIST__; p--)
if (*p)
(*p)();
if (__atexit)
__atexit (__do_global_dtors);
/* Call the initialization function in the .init section. */
(*init_ptr) ();
__init ();
}
/* Call all global destructors */
void
__do_global_dtors (void)
{
func_ptr *ptr = &__DTOR_LIST__[0];
func_ptr *end = &__DTOR_END__[0];
static func_ptr *p = __DTOR_LIST__ + 1;
static int completed = 0;
/* Call the termination function in the .fini section. */
(*fini_ptr) ();
if (completed)
return;
/* Call the destructors collected in the .dtors section. Run
the destructors in reverse order. */
for ( ; ptr < end; ptr++)
if (*ptr)
(*ptr)();
/* Call the termination function in the .fini section. */
__fini ();
while (p < __DTOR_END__)
{
p++;
(*(p-1)) ();
}
#ifdef EH_FRAME_SECTION_ASM_OP
if (__deregister_frame_info)
__deregister_frame_info (__EH_FRAME_BEGIN__);
#endif
completed = 1;
}
/* Core target definitions for GNU compiler
for IBM RS/6000 PowerPC targeted to embedded ELF systems.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GNU CC.
......@@ -28,6 +28,7 @@ Boston, MA 02111-1307, USA. */
/* Invoke an initializer function to set up the GOT */
#define NAME__MAIN "__eabi"
#define INVOKE__main
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (PowerPC Embedded)");
......
/* Definitions for Rs6000 running LynxOS.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc.
Contributed by David Henkel-Wallace, Cygnus Support (gumby@cygnus.com)
This file is part of GNU CC.
......@@ -96,7 +96,6 @@ do { \
#undef OBJECT_FORMAT_ROSE
#undef MD_EXEC_PREFIX
#undef REAL_LD_FILE_NAME
#undef REAL_NM_FILE_NAME
#undef REAL_STRIP_FILE_NAME
/* LynxOS doesn't have mcount. */
......
/* Core target definitions for GNU compiler
for IBM RS/6000 PowerPC running NetWare
Copyright (C) 1994, 1995, 1996, 1998 Free Software Foundation, Inc.
Copyright (C) 1994, 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GNU CC.
......@@ -34,24 +34,11 @@ Boston, MA 02111-1307, USA. */
#undef PROCESSOR_DEFAULT
#define PROCESSOR_DEFAULT PROCESSOR_PPC601
/* Don't generate XCOFF debugging information. */
#undef XCOFF_DEBUGGING_INFO
/* Don't use the COFF object file format. */
#undef OBJECT_FORMAT_COFF
/* The XCOFF support uses weird symbol suffixes, which we don't want
for ELF. */
#undef STRIP_NAME_ENCODING
/* Don't bother to output .extern pseudo-ops. They are not needed by
ELF assemblers. */
#undef ASM_OUTPUT_EXTERNAL
/* Undefine some things which are defined by the generic svr4.h. */
#undef ASM_FILE_END
......
# crti.s for Windows NT
# Copyright (C) 1996 Free Software Foundation, Inc.
# Written By Michael Meissner
#
# This file 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.
#
# In addition to the permissions in the GNU General Public License, the
# Free Software Foundation gives you unlimited permission to link the
# compiled version of this file with other programs, and to distribute
# those programs without any restriction coming from the use of this
# file. (The General Public License restrictions do apply in other
# respects; for example, they cover modification of the file, and
# distribution when not linked into another program.)
#
# This file 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 this program; see the file COPYING. If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# As a special exception, if you link this library with files
# compiled with GCC to produce an executable, this does not cause
# the resulting executable to be covered by the GNU General Public License.
# This exception does not however invalidate any other reasons why
# the executable file might be covered by the GNU General Public License.
#
# This file just supplies labeled starting points for the static constructors
# and destructors. It is linked in first before other modules.
.file "crti.s"
.ident "GNU C crti.s"
.section .ctors,"w"
.globl __CTOR_LIST__
__CTOR_LIST__:
.section .dtors,"w"
.globl __DTOR_LIST__
__DTOR_LIST__:
# crtn.s for Windows NT
# Copyright (C) 1996 Free Software Foundation, Inc.
# Written By Michael Meissner
#
# This file 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.
#
# In addition to the permissions in the GNU General Public License, the
# Free Software Foundation gives you unlimited permission to link the
# compiled version of this file with other programs, and to distribute
# those programs without any restriction coming from the use of this
# file. (The General Public License restrictions do apply in other
# respects; for example, they cover modification of the file, and
# distribution when not linked into another program.)
#
# This file 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 this program; see the file COPYING. If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# As a special exception, if you link this library with files
# compiled with GCC to produce an executable, this does not cause
# the resulting executable to be covered by the GNU General Public License.
# This exception does not however invalidate any other reasons why
# the executable file might be covered by the GNU General Public License.
#
# This file just supplies labeled ending points for the static constructors
# and destructors. It is linked in last after other modules.
.file "crtn.s"
.ident "GNU C crtn.s"
.section .ctors,"w"
.globl __CTOR_END__
__CTOR_END__:
.section .dtors,"w"
.globl __DTOR_END__
__DTOR_END__:
# Allocate stack for NT, inserting stack probes every 4k pages
.file "ntstack.asm"
# Setup MS Structured-Exception-Handling
.pdata
.align 2
.ualong ..__allocate_stack,__allocate_stack.e,0,0,__allocate_stack.b
# Switch to the relocation section
.reldata
.globl __allocate_stack
.globl ..__allocate_stack
__allocate_stack:
.ualong ..__allocate_stack,.toc
.text
.align 2
..__allocate_stack:
.function ..__allocate_stack
__allocate_stack.b:
addi 3,3,15 # round up to 16 byte alignment
lwz 0,0(1) # old stack link
rlwinm 3,3,0,0,28
srawi. 4,3,12 # get # of pages to check
neg 3,3 # negate so we can use stwux
bgt- 0,.Lcheck
stwux 0,1,3 # small request, just decrement and return
blr
.Lcheck:
mtctr 4 # number of pages to check
mr 5,1 # tmp pointer
.Lloop:
lwzu 6,-4096(5) # touch the page
bdnz+ .Lloop # and loop back
stwux 0,1,3 # update stack pointer
blr
__allocate_stack.e:
FE_MOT_RESVD..__allocate_stack:
/* Definitions of target machine for GNU compiler, for IBM RS/6000.
Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GNU CC.
GNU CC 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.
GNU CC 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 GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Declare functions in rs6000.c */
#ifdef RTX_CODE
#ifdef TREE_CODE
extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx, int));
extern void rs6000_va_start PARAMS ((int, tree, rtx));
#endif /* TREE_CODE */
extern struct rtx_def *rs6000_got_register PARAMS ((rtx));
extern struct rtx_def *find_addr_reg PARAMS ((rtx));
extern int any_operand PARAMS ((rtx, enum machine_mode));
extern int short_cint_operand PARAMS ((rtx, enum machine_mode));
extern int u_short_cint_operand PARAMS ((rtx, enum machine_mode));
extern int non_short_cint_operand PARAMS ((rtx, enum machine_mode));
extern int gpc_reg_operand PARAMS ((rtx, enum machine_mode));
extern int cc_reg_operand PARAMS ((rtx, enum machine_mode));
extern int cc_reg_not_cr0_operand PARAMS ((rtx, enum machine_mode));
extern int reg_or_short_operand PARAMS ((rtx, enum machine_mode));
extern int reg_or_neg_short_operand PARAMS ((rtx, enum machine_mode));
extern int reg_or_u_short_operand PARAMS ((rtx, enum machine_mode));
extern int reg_or_cint_operand PARAMS ((rtx, enum machine_mode));
extern int reg_or_u_cint_operand PARAMS ((rtx, enum machine_mode));
extern int got_operand PARAMS ((rtx, enum machine_mode));
extern int got_no_const_operand PARAMS ((rtx, enum machine_mode));
extern int num_insns_constant PARAMS ((rtx, enum machine_mode));
extern int easy_fp_constant PARAMS ((rtx, enum machine_mode));
extern int volatile_mem_operand PARAMS ((rtx, enum machine_mode));
extern int offsettable_mem_operand PARAMS ((rtx, enum machine_mode));
extern int mem_or_easy_const_operand PARAMS ((rtx, enum machine_mode));
extern int add_operand PARAMS ((rtx, enum machine_mode));
extern int non_add_cint_operand PARAMS ((rtx, enum machine_mode));
extern int non_logical_cint_operand PARAMS ((rtx, enum machine_mode));
extern int non_logical_u_cint_operand PARAMS ((rtx, enum machine_mode));
extern int logical_operand PARAMS ((rtx, enum machine_mode));
extern int logical_u_operand PARAMS ((rtx, enum machine_mode));
extern int mask_operand PARAMS ((rtx, enum machine_mode));
extern int mask64_operand PARAMS ((rtx, enum machine_mode));
extern int and64_operand PARAMS ((rtx, enum machine_mode));
extern int and_operand PARAMS ((rtx, enum machine_mode));
extern int count_register_operand PARAMS ((rtx, enum machine_mode));
extern int xer_operand PARAMS ((rtx, enum machine_mode));
extern int reg_or_mem_operand PARAMS ((rtx, enum machine_mode));
extern int lwa_operand PARAMS ((rtx, enum machine_mode));
extern int call_operand PARAMS ((rtx, enum machine_mode));
extern int current_file_function_operand PARAMS ((rtx, enum machine_mode));
extern int input_operand PARAMS ((rtx, enum machine_mode));
extern int small_data_operand PARAMS ((rtx, enum machine_mode));
extern int constant_pool_expr_p PARAMS ((rtx));
extern int toc_relative_expr_p PARAMS ((rtx));
extern int expand_block_move PARAMS ((rtx[]));
extern int load_multiple_operation PARAMS ((rtx, enum machine_mode));
extern int store_multiple_operation PARAMS ((rtx, enum machine_mode));
extern int branch_comparison_operator PARAMS ((rtx, enum machine_mode));
extern int scc_comparison_operator PARAMS ((rtx, enum machine_mode));
extern int trap_comparison_operator PARAMS ((rtx, enum machine_mode));
extern int includes_lshift_p PARAMS ((rtx, rtx));
extern int includes_rshift_p PARAMS ((rtx, rtx));
extern int registers_ok_for_quad_peep PARAMS ((rtx, rtx));
extern int addrs_ok_for_quad_peep PARAMS ((rtx, rtx));
extern enum reg_class secondary_reload_class PARAMS ((enum reg_class,
enum machine_mode, rtx));
extern int ccr_bit PARAMS ((rtx, int));
extern void print_operand PARAMS ((FILE *, rtx, int));
extern void print_operand_address PARAMS ((FILE *, rtx));
extern void output_toc PARAMS ((FILE *, rtx, int));
extern int rs6000_adjust_cost PARAMS ((rtx, rtx, rtx, int));
extern int rs6000_adjust_priority PARAMS ((rtx, int));
extern void rs6000_initialize_trampoline PARAMS ((rtx, rtx, rtx));
extern struct rtx_def *rs6000_longcall_ref PARAMS ((rtx));
extern void rs6000_fatal_bad_address PARAMS ((rtx));
extern int stmw_operation PARAMS ((rtx, enum machine_mode));
extern int mtcrf_operation PARAMS ((rtx, enum machine_mode));
extern int lmw_operation PARAMS ((rtx, enum machine_mode));
extern struct rtx_def *create_TOC_reference PARAMS ((rtx));
extern void rs6000_emit_eh_toc_restore PARAMS ((rtx));
extern rtx rs6000_legitimize_address PARAMS ((rtx, rtx, enum machine_mode));
extern void rs6000_select_rtx_section PARAMS ((enum machine_mode, rtx));
#endif /* RTX_CODE */
#ifdef TREE_CODE
extern void function_arg_advance PARAMS ((CUMULATIVE_ARGS *, enum machine_mode,
tree, int));
extern int function_arg_boundary PARAMS ((enum machine_mode, tree));
extern struct rtx_def *function_arg PARAMS ((CUMULATIVE_ARGS *,
enum machine_mode, tree, int));
extern int function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS *,
enum machine_mode, tree, int));
extern int function_arg_pass_by_reference PARAMS ((CUMULATIVE_ARGS *,
enum machine_mode,
tree, int));
extern void setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *,
enum machine_mode, tree,
int *, int));
extern struct rtx_def *rs6000_va_arg PARAMS ((tree, tree));
extern void output_mi_thunk PARAMS ((FILE *, tree, int, tree));
extern int rs6000_comp_type_attributes PARAMS ((tree, tree));
extern int rs6000_valid_decl_attribute_p PARAMS ((tree, tree, tree, tree));
extern int rs6000_valid_type_attribute_p PARAMS ((tree, tree, tree, tree));
extern void rs6000_set_default_type_attributes PARAMS ((tree));
extern void rs6000_encode_section_info PARAMS ((tree));
extern void rs6000_select_section PARAMS ((tree, int));
#ifdef ARGS_SIZE_RTX
/* expr.h defines ARGS_SIZE_RTX and `enum direction' */
extern enum direction function_arg_padding PARAMS ((enum machine_mode, tree));
#endif /* ARGS_SIZE_RTX */
#endif /* TREE_CODE */
extern void optimization_options PARAMS ((int, int));
extern void rs6000_override_options PARAMS ((const char *));
extern void rs6000_file_start PARAMS ((FILE *, const char *));
extern struct rtx_def *rs6000_float_const PARAMS ((const char *,
enum machine_mode));
extern int direct_return PARAMS ((void));
extern int get_issue_rate PARAMS ((void));
extern union tree_node *rs6000_build_va_list PARAMS ((void));
extern void rs6000_save_machine_status PARAMS ((struct function *));
extern void rs6000_restore_machine_status PARAMS ((struct function *));
extern void rs6000_init_expanders PARAMS ((void));
extern int first_reg_to_save PARAMS ((void));
extern int first_fp_reg_to_save PARAMS ((void));
extern rs6000_stack_t *rs6000_stack_info PARAMS ((void));
extern void output_prolog PARAMS ((FILE *, int));
extern void output_epilog PARAMS ((FILE *, int));
extern void output_ascii PARAMS ((FILE *, const char *, int));
extern void rs6000_gen_section_name PARAMS ((char **, const char *,
const char *));
extern void output_function_profiler PARAMS ((FILE *, int));
extern int rs6000_trampoline_size PARAMS ((void));
extern void toc_section PARAMS ((void));
extern void sdata_section PARAMS ((void));
extern void sdata2_section PARAMS ((void));
extern void sbss_section PARAMS ((void));
extern void private_data_section PARAMS ((void));
extern int get_TOC_alias_set PARAMS ((void));
extern int uses_TOC PARAMS ((void));
extern void rs6000_emit_prologue PARAMS ((void));
extern void rs6000_emit_load_toc_table PARAMS ((int));
extern void rs6000_aix_emit_builtin_unwind_init PARAMS ((void));
extern void rs6000_emit_epilogue PARAMS ((int));
extern void debug_stack_info PARAMS ((rs6000_stack_t *));
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/* Definitions of target machine for GNU compiler,
for IBM RS/6000 running AIX version 3.1.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
Contributed by David Reese (Dave.Reese@East.Sun.COM)
This file is part of GNU CC.
......@@ -65,9 +65,6 @@ Boston, MA 02111-1307, USA. */
#undef CPP_ENDIAN_LITTLE_SPEC
#define CPP_ENDIAN_LITTLE_SPEC CPP_ENDIAN_SOLARIS_SPEC
/* Don't turn -B into -L if the argument specifies a relative file name. */
#undef RELATIVE_PREFIX_NOT_LINKDIR
#define DEFAULT_PCC_STRUCT_RETURN 0
#undef TARGET_VERSION
......
/* Target definitions for GNU compiler for a little endian PowerPC
running System V.4
Copyright (C) 1995, Free Software Foundation, Inc.
Copyright (C) 1995, 2000 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GNU CC.
......@@ -34,7 +34,9 @@ Boston, MA 02111-1307, USA. */
#undef LINK_TARGET_SPEC
#define LINK_TARGET_SPEC "\
%{mbig: -oformat elf32-powerpc } %{mbig-endian: -oformat elf32-powerpc } \
%{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: %{mcall-linux: -oformat elf32-powerpc}}}}}"
%{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
%{mcall-linux: -oformat elf32-powerpc} \
}}}}"
/* Define this macro as a C expression for the initializer of an
array of string to tell the driver program which options are
......
......@@ -49,3 +49,11 @@ MULTILIB_MATCHES = msoft-float=mcpu?403 \
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
# Both 32-bit and 64-bit objects in archives
AR_FLAGS_FOR_TARGET=-X32_64 rc
# We need -lld for collect2 (actually this only matters
# for a native compiler, but this is as good a place as any
# to define the symbol).
CLIB=-lld
......@@ -39,7 +39,7 @@ MULTILIB_MATCHES_FLOAT = msoft-float=mcpu?401 \
msoft-float=mcpu?823 \
msoft-float=mcpu?860
MULTILIB_MATCHES_ENDIAN = mlittle=mlittle-endian mbig=mbig-endian
MULTILIB_MATCHES_SYSV = mcall-sysv=mcall-sysv-eabi mcall-sysv=mcall-sysv-noeabi
MULTILIB_MATCHES_SYSV = mcall-sysv=mcall-sysv-eabi mcall-sysv=mcall-sysv-noeabi mcall-sysv=mcall-linux
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
......
......@@ -3,16 +3,17 @@
MULTILIB_OPTIONS = msoft-float \
mlittle/mbig \
mcall-sysv/mcall-aix/mcall-linux
mcall-sysv/mcall-aix \
fleading-underscore
MULTILIB_DIRNAMES = nof \
le be \
cs ca lin
cs ca \
und
MULTILIB_EXTRA_OPTS = mrelocatable-lib mno-eabi mstrict-align
MULTILIB_EXCEPTIONS = *mbig/*mcall-linux* \
*mlittle/*mcall-linux* \
*msoft-float/*mcall-linux*
MULTILIB_EXCEPTIONS = *mcall-aix/*fleading-underscore* \
*mlittle/*mcall-aix*
MULTILIB_MATCHES = ${MULTILIB_MATCHES_FLOAT} \
${MULTILIB_MATCHES_ENDIAN} \
......
# Do not build libgcc1.
LIBGCC1 =
CROSS_LIBGCC1 =
EXTRA_PARTS = crti.o crtn.o
# These are really part of libgcc1, but this will cause them to be
# built correctly, so... [taken from t-sparclite]
LIB2FUNCS_EXTRA = ntstack.S
# We want fine grained libraries, so use the new code to build the
# floating point emulation libraries.
FPBIT = fp-bit.c
DPBIT = dp-bit.c
dp-bit.c: $(srcdir)/config/fp-bit.c
cat $(srcdir)/config/fp-bit.c > dp-bit.c
fp-bit.c: $(srcdir)/config/fp-bit.c
echo '#define FLOAT' > fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
ntstack.S: $(srcdir)/config/rs6000/ntstack.asm
cat $(srcdir)/config/rs6000/ntstack.asm > ntstack.S
# For NT we build crti.o and crtn.o which serve to add begin and
# end labels for the static constructors and destructors.
# Assemble startup files.
crti.s: $(srcdir)/config/rs6000/nt-ci.asm
cat $(srcdir)/config/rs6000/nt-ci.asm >crti.s
crtn.s: $(srcdir)/config/rs6000/nt-cn.asm
cat $(srcdir)/config/rs6000/nt-cn.asm >crtn.s
crti.o: crti.s
$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -c -o crti.o crti.s
crtn.o: crtn.s
$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -c -o crtn.o crtn.s
/* Special support for trampolines
*
* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
* Written By Michael Meissner
*
* This file is free software; you can redistribute it and/or modify it
......@@ -33,21 +33,20 @@
* the executable file might be covered by the GNU General Public License.
*/
/* Set up trampolines */
/* Set up trampolines. */
.file "tramp.asm"
.section ".text"
#include "ppc-asm.h"
.globl __trampoline_initial
.type __trampoline_initial,@object
.type trampoline_initial,@object
.align 2
__trampoline_initial:
trampoline_initial:
mflr r0
bl 1f
.Lfunc = .-__trampoline_initial
.Lfunc = .-trampoline_initial
.long 0 /* will be replaced with function address */
.Lchain = .-__trampoline_initial
.Lchain = .-trampoline_initial
.long 0 /* will be replaced with static chain */
1: mflr r11
mtlr r0
......@@ -56,17 +55,9 @@ __trampoline_initial:
mtctr r0
bctr
__trampoline_size = .-__trampoline_initial
.size __trampoline_initial,__trampoline_size
trampoline_size = .-trampoline_initial
.size trampoline_initial,trampoline_size
.section ".got2","aw"
.LCTOC1 = .+32768
.Ltramp = .-.LCTOC1
.long __trampoline_initial-4
.section ".text"
.LCL0:
.long .LCTOC1-.LCF0
/* R3 = stack address to store trampoline */
/* R4 = length of trampoline area */
......@@ -78,11 +69,9 @@ FUNC_START(__trampoline_setup)
bl .LCF0 /* load up __trampoline_initial into r7 */
.LCF0:
mflr r11
lwz r12,(.LCL0-.LCF0)(r11)
add r11,r12,r11
lwz r7,.Ltramp(r11) /* trampoline address -4 */
addi r7,r11,trampoline_initial-4-.LCF0 /* trampoline address -4 */
li r8,__trampoline_size /* verify that the trampoline is big enough */
li r8,trampoline_size /* verify that the trampoline is big enough */
cmpw cr1,r8,r4
srwi r4,r4,2 /* # words to move */
addi r9,r3,-4 /* adjust pointer for lwzu */
......@@ -115,6 +104,6 @@ FUNC_START(__trampoline_setup)
blr
.Labort:
bl abort
bl FUNC_NAME(abort)
FUNC_END(__trampoline_setup)
/* END CYGNUS LOCAL -- waiting for FSF sources to be restored/meissner */
/* Definitions of target machine for GNU compiler. Vxworks PowerPC version.
Copyright (C) 1996, 1999 Free Software Foundation, Inc.
Copyright (C) 1996, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
......@@ -18,62 +18,41 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This file primarily exists to give specs for the PowerPC running on
VxWorks. */
/* This file just exists to give specs for the PowerPC running on VxWorks. */
#include "rs6000/sysv4.h"
/* ??? This file redefines CPP_SPEC which is wrong. It should instead define
one of the extra specs that gets included in CPP_SPEC. For instance,
CPP_OS_DEFAULT_SPEC. The mrelocatable line was copied from CPP_SYSV_SPEC.
There is probably other stuff missing. */
#undef CPP_SPEC
#define CPP_SPEC "%{posix: -D_POSIX_SOURCE} %(cpp_sysv) %(cpp_endian) %(cpp_cpu) \
%{mads: %(cpp_os_ads) } \
%{myellowknife: %(cpp_os_yellowknife) } \
%{mmvme: %(cpp_os_mvme) } \
%{msim: %(cpp_os_sim) } \
%{mcall-linux: %(cpp_os_linux) } \
%{mcall-solaris: %(cpp_os_solaris) } \
%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(cpp_os_default) }}}}}} \
%{!DCPU=*: \
%{!mcpu*: -DCPU=PPC603} \
%{mcpu=powerpc: -DCPU=PPC603} \
%{mcpu=403: -DCPU=PPC403} \
%{mcpu=601: -DCPU=PPC601} \
%{mcpu=603: -DCPU=PPC603} \
%{mcpu=604: -DCPU=PPC604}}"
/* Reset defaults */
#undef CPP_OS_DEFAULT_SPEC
#define CPP_OS_DEFAULT_SPEC "%(cpp_os_vxworks)"
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "\
-D__vxworks -Asystem(vxworks) -Asystem(embedded) \
-Acpu(powerpc) -Amachine(powerpc)"
#undef LIB_DEFAULT_SPEC
#define LIB_DEFAULT_SPEC "%(lib_vxworks)"
/* VxWorks does all the library stuff itself. */
#undef STARTFILE_DEFAULT_SPEC
#define STARTFILE_DEFAULT_SPEC "%(startfile_vxworks)"
#undef LIB_SPEC
#define LIB_SPEC ""
#undef ENDFILE_DEFAULT_SPEC
#define ENDFILE_DEFAULT_SPEC "%(endfile_vxworks)"
/* VxWorks uses object files, not loadable images. make linker just
combine objects. */
#undef LINK_START_DEFAULT_SPEC
#define LINK_START_DEFAULT_SPEC "%(link_start_vxworks)"
#undef LINK_SPEC
#define LINK_SPEC "-r"
#undef LINK_OS_DEFAULT_SPEC
#define LINK_OS_DEFAULT_SPEC "%(link_os_vxworks)"
/* VxWorks provides the functionality of crt0.o and friends itself. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "\
-D__vxworks -D__vxworks__ -Asystem(vxworks) -Asystem(embedded) \
-Acpu(powerpc) -Amachine(powerpc)"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC ""
/* Don't define _LITTLE_ENDIAN or _BIG_ENDIAN */
#undef CPP_ENDIAN_BIG_SPEC
#define CPP_ENDIAN_BIG_SPEC "-D__BIG_ENDIAN__ -Amachine(bigendian)"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC ""
#undef CPP_ENDIAN_LITTLE_SPEC
#define CPP_ENDIAN_LITTLE_SPEC "-D__LITTLE_ENDIAN__ -Amachine(littleendian)"
/* We use stabs-in-elf for debugging */
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
/* VxWorks normally doesn't have an unaligned handler, so make -mstrict-align
the default. */
#undef SUBTARGET_DEFAULT
#define SUBTARGET_DEFAULT MASK_STRICT_ALIGN
/* Definitions of target machine for GNU compiler. Vxworks PowerPC version.
Copyright (C) 1996, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC 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.
GNU CC 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 GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This file just exists to give specs for the PowerPC running on VxWorks. */
#include "rs6000/sysv4le.h"
/* Reset defaults */
#undef CPP_OS_DEFAULT_SPEC
#define CPP_OS_DEFAULT_SPEC "%(cpp_os_vxworks)"
#undef LIB_DEFAULT_SPEC
#define LIB_DEFAULT_SPEC "%(lib_vxworks)"
#undef STARTFILE_DEFAULT_SPEC
#define STARTFILE_DEFAULT_SPEC "%(startfile_vxworks)"
#undef ENDFILE_DEFAULT_SPEC
#define ENDFILE_DEFAULT_SPEC "%(endfile_vxworks)"
#undef LINK_START_DEFAULT_SPEC
#define LINK_START_DEFAULT_SPEC "%(link_start_vxworks)"
#undef LINK_OS_DEFAULT_SPEC
#define LINK_OS_DEFAULT_SPEC "%(link_os_vxworks)"
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "\
-D__vxworks -D__vxworks__ -Asystem(vxworks) -Asystem(embedded) \
-Acpu(powerpc) -Amachine(powerpc)"
/* Don't define _LITTLE_ENDIAN or _BIG_ENDIAN */
#undef CPP_ENDIAN_BIG_SPEC
#define CPP_ENDIAN_BIG_SPEC "-D__BIG_ENDIAN__ -Amachine(bigendian)"
#undef CPP_ENDIAN_LITTLE_SPEC
#define CPP_ENDIAN_LITTLE_SPEC "-D__LITTLE_ENDIAN__ -Amachine(littleendian)"
/* We use stabs-in-elf for debugging */
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
......@@ -2,11 +2,3 @@
# Show we need to use the C version of ALLOCA
ALLOCA=alloca.o
# We need -lld for collect2 (actually this only matters
# for a native compiler, but this is as good a place as any
# to define the symbol).
CLIB=-lld
# f771 and cc1plus overflow the AIX TOC
BOOT_LDFLAGS=-Wl,-bbigtoc
# configuration for IBM RS/6000 running AIX 4.1+
# Show we need to use the C version of ALLOCA
ALLOCA=alloca.o
# We need -lld for collect2 (actually this only matters
# for a native compiler, but this is as good a place as any
# to define the symbol).
CLIB=-lld
# f771 and cc1plus overflow the AIX TOC, however gld doesn't support -bbigtoc
# BOOT_LDFLAGS=-Wl,-bbigtoc
# configuration for IBM RS/6000 running AIX 4.3+
# Show we need to use the C version of ALLOCA
ALLOCA=alloca.o
# We need -lld for collect2 (actually this only matters
# for a native compiler, but this is as good a place as any
# to define the symbol).
CLIB=-lld
# f771 and cc1plus overflow the AIX TOC
BOOT_LDFLAGS=-Wl,-bbigtoc
# Both 32-bit and 64-bit objects in archives
AR_FOR_TARGET=ar -X32_64
......@@ -3078,6 +3078,15 @@ changequote([,])dnl
extra_headers=ppc-asm.h
thread_file='vxworks'
;;
powerpcle-wrs-vxworks*)
cpu_type=rs6000
xm_file="rs6000/xm-sysv4.h"
xm_defines="USG POSIX"
tm_file=rs6000/vxppcle.h
tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
extra_headers=ppc-asm.h
thread_file='vxworks'
;;
powerpcle-*-sysv* | powerpcle-*-elf*)
tm_file=rs6000/sysv4le.h
xm_file="rs6000/xm-sysv4.h"
......@@ -3106,27 +3115,6 @@ changequote([,])dnl
fi
extra_headers=ppc-asm.h
;;
powerpcle-*-winnt* )
tm_file=rs6000/win-nt.h
tmake_file=rs6000/t-winnt
# extra_objs=pe.o
if test x$enable_threads = xyes; then
thread_file='win32'
fi
extra_headers=ppc-asm.h
;;
powerpcle-*-pe | powerpcle-*-cygwin*)
tm_file=rs6000/cygwin.h
xm_file="rs6000/xm-cygwin.h ${xm_file}"
tmake_file=rs6000/t-winnt
xmake_file=rs6000/x-cygwin
# extra_objs=pe.o
if test x$enable_threads = xyes; then
thread_file='win32'
fi
exeext=.exe
extra_headers=ppc-asm.h
;;
powerpcle-*-solaris2*)
tm_file=rs6000/sol2.h
xm_file="rs6000/xm-sysv4.h"
......@@ -3171,12 +3159,7 @@ changequote([,])dnl
else
tmake_file=rs6000/t-newas
fi
if test "$gnu_ld" = yes
then
xmake_file=rs6000/x-aix41-gld
else
xmake_file=rs6000/x-aix41
fi
float_format=none
use_collect2=yes
;;
......@@ -3184,13 +3167,8 @@ changequote(,)dnl
rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
changequote([,])dnl
tm_file=rs6000/aix43.h
if test x$host != x$target
then
tmake_file=rs6000/t-xaix43
else
tmake_file=rs6000/t-aix43
fi
xmake_file=rs6000/x-aix43
xmake_file=rs6000/x-aix41
float_format=none
use_collect2=yes
;;
......@@ -3198,13 +3176,8 @@ changequote(,)dnl
rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
changequote([,])dnl
tm_file=rs6000/aix43.h
if test x$host != x$target
then
tmake_file=rs6000/t-xaix43
else
tmake_file=rs6000/t-aix43
fi
xmake_file=rs6000/x-aix43
xmake_file=rs6000/x-aix41
float_format=none
use_collect2=yes
;;
......
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