summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/config/openbsd.h
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-02-01 18:16:02 +0000
committerobrien <obrien@FreeBSD.org>2002-02-01 18:16:02 +0000
commitc9ab9ae440a8066b2c2b85b157b1fdadcf09916a (patch)
tree086d9d6c8fbd4fc8fe4495059332f66bc0f8d12b /contrib/gcc/config/openbsd.h
parent2ecfd8bd04b63f335c1ec6295740a4bfd97a4fa6 (diff)
downloadFreeBSD-src-c9ab9ae440a8066b2c2b85b157b1fdadcf09916a.zip
FreeBSD-src-c9ab9ae440a8066b2c2b85b157b1fdadcf09916a.tar.gz
Enlist the FreeBSD-CURRENT users as testers of what is to become Gcc 3.1.0.
These bits are taken from the FSF anoncvs repo on 1-Feb-2002 08:20 PST.
Diffstat (limited to 'contrib/gcc/config/openbsd.h')
-rw-r--r--contrib/gcc/config/openbsd.h41
1 files changed, 20 insertions, 21 deletions
diff --git a/contrib/gcc/config/openbsd.h b/contrib/gcc/config/openbsd.h
index e95fbda..2c0738f 100644
--- a/contrib/gcc/config/openbsd.h
+++ b/contrib/gcc/config/openbsd.h
@@ -1,5 +1,5 @@
/* Base configuration file for all OpenBSD targets.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -78,12 +78,16 @@ Boston, MA 02111-1307, USA. */
since all code must be compiled with -pthread to work.
This two-stage defines makes it easy to pick that for targets that
have subspecs. */
+#ifdef CPP_CPU_SPEC
+#define OBSD_CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
+#else
#define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
+#endif
/* LIB_SPEC appropriate for OpenBSD. Select the appropriate libc,
depending on profiling and threads. Basically,
-lc(_r)?(_p)?, select _r for threads, and _p for p or pg. */
-#define OBSD_LIB_SPEC "-lc%{pthread:_r}%{p:_p}%{!p:%{pg:_p}}"
+#define OBSD_LIB_SPEC "%{!shared:-lc%{pthread:_r}%{p:_p}%{!p:%{pg:_p}}}"
#ifndef OBSD_HAS_CORRECT_SPECS
@@ -103,6 +107,7 @@ Boston, MA 02111-1307, USA. */
pic code. */
#undef ASM_SPEC
#define ASM_SPEC "%{fpic:-k} %{fPIC:-k -K} %|"
+
#else
/* Since we use gas, stdin -> - is a good idea, but we don't want to
override native specs just for that. */
@@ -116,10 +121,10 @@ Boston, MA 02111-1307, USA. */
#undef LINK_SPEC
#ifdef OBSD_NO_DYNAMIC_LIBRARIES
#define LINK_SPEC \
- "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{assert*}"
+ "%{g:%{!nostdlib:-L/usr/lib/debug}} %{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{assert*}"
#else
#define LINK_SPEC \
- "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{R*} %{static:-Bstatic} %{assert*}"
+ "%{g:%{!nostdlib:-L/usr/lib/debug}} %{!shared:%{!nostdlib:%{!r*:%{!e*:-e start}}}} %{shared:-Bshareable -x} -dc -dp %{R*} %{static:-Bstatic} %{assert*}"
#endif
#undef LIB_SPEC
@@ -135,13 +140,12 @@ Boston, MA 02111-1307, USA. */
/* Implicit calls to library routines. */
/* Use memcpy and memset instead of bcopy and bzero. */
+#ifndef TARGET_MEM_FUNCTIONS
#define TARGET_MEM_FUNCTIONS
+#endif
/* Miscellaneous parameters. */
-/* Tell libgcc2.c that OpenBSD targets support atexit. */
-#define HAVE_ATEXIT
-
/* Controlling debugging info: dbx options. */
/* Don't use the `xsTAG;' construct in DBX output; OpenBSD systems that
@@ -172,9 +176,9 @@ Boston, MA 02111-1307, USA. */
#undef SIZE_ASM_OP
#undef SET_ASM_OP
-#define TYPE_ASM_OP ".type"
-#define SIZE_ASM_OP ".size"
-#define SET_ASM_OP ".set"
+#define TYPE_ASM_OP "\t.type\t"
+#define SIZE_ASM_OP "\t.size\t"
+#define SET_ASM_OP "\t.set\t"
/* The following macro defines the format used to output the second
operand of the .type assembler directive. */
@@ -199,7 +203,7 @@ Boston, MA 02111-1307, USA. */
#undef ASM_DECLARE_FUNCTION_NAME
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
do { \
- fprintf (FILE, "\t%s\t", TYPE_ASM_OP); \
+ fprintf (FILE, "%s", TYPE_ASM_OP); \
assemble_name (FILE, NAME); \
fputs (" , ", FILE); \
fprintf (FILE, TYPE_OPERAND_FMT, "function"); \
@@ -216,7 +220,7 @@ Boston, MA 02111-1307, USA. */
do { \
if (!flag_inhibit_size_directive) \
{ \
- fprintf (FILE, "\t%s\t", SIZE_ASM_OP); \
+ fprintf (FILE, "%s", SIZE_ASM_OP); \
assemble_name (FILE, (FNAME)); \
fputs (" , . - ", FILE); \
assemble_name (FILE, (FNAME)); \
@@ -230,7 +234,7 @@ Boston, MA 02111-1307, USA. */
#undef ASM_DECLARE_OBJECT_NAME
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
do { \
- fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
+ fprintf (FILE, "%s", TYPE_ASM_OP); \
assemble_name (FILE, NAME); \
fputs (" , ", FILE); \
fprintf (FILE, TYPE_OPERAND_FMT, "object"); \
@@ -239,7 +243,7 @@ Boston, MA 02111-1307, USA. */
if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
{ \
size_directive_output = 1; \
- fprintf (FILE, "\t%s\t", SIZE_ASM_OP); \
+ fprintf (FILE, "%s", SIZE_ASM_OP); \
assemble_name (FILE, NAME); \
fprintf (FILE, " , %d\n", int_size_in_bytes (TREE_TYPE (DECL)));\
} \
@@ -254,14 +258,14 @@ Boston, MA 02111-1307, USA. */
#undef ASM_FINISH_DECLARE_OBJECT
#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
do { \
- char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
+ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
&& ! AT_END && TOP_LEVEL \
&& DECL_INITIAL (DECL) == error_mark_node \
&& !size_directive_output) \
{ \
size_directive_output = 1; \
- fprintf (FILE, "\t%s\t", SIZE_ASM_OP); \
+ fprintf (FILE, "%s", SIZE_ASM_OP); \
assemble_name (FILE, name); \
fprintf (FILE, " , %d\n", int_size_in_bytes (TREE_TYPE (DECL)));\
} \
@@ -293,11 +297,6 @@ do { \
/* Storage layout. */
-/* We don't have to worry about binary compatibility with older C++ code,
- but there is a big known bug with vtable thunks which has not been
- fixed yet, so DON'T activate it by default. */
-/* #define DEFAULT_VTABLE_THUNKS 1 */
-
/* Otherwise, since we support weak, gthr.h erroneously tries to use
#pragma weak. */
OpenPOWER on IntegriCloud