Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: gcc/gcc/config/openbsd.h

Issue 3050029: [gcc] GCC 4.5.0=>4.5.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcc/gcc/config/mn10300/mn10300.h ('k') | gcc/gcc/config/pa/constraints.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/gcc/config/openbsd.h
diff --git a/gcc/gcc/config/openbsd.h b/gcc/gcc/config/openbsd.h
index cbcff230387f8c5ab6f180b74312c5a872637aba..59728c377d6c6a27f4b79298bc81bf7990fb8399 100644
--- a/gcc/gcc/config/openbsd.h
+++ b/gcc/gcc/config/openbsd.h
@@ -84,6 +84,24 @@ along with GCC; see the file COPYING3. If not see
} \
while (0)
+/* TARGET_OS_CPP_BUILTINS() common to all OpenBSD ELF targets. */
+#define OPENBSD_OS_CPP_BUILTINS_ELF() \
+ do \
+ { \
+ OPENBSD_OS_CPP_BUILTINS(); \
+ builtin_define ("__ELF__"); \
+ } \
+while (0)
+
+/* TARGET_OS_CPP_BUILTINS() common to all LP64 OpenBSD targets. */
+#define OPENBSD_OS_CPP_BUILTINS_LP64() \
+ do \
+ { \
+ builtin_define ("_LP64"); \
+ builtin_define ("__LP64__"); \
+ } \
+ while (0)
+
/* CPP_SPEC appropriate for OpenBSD. We deal with -posix and -pthread.
XXX the way threads are handled currently is not very satisfying,
since all code must be compiled with -pthread to work.
@@ -95,15 +113,8 @@ along with GCC; see the file COPYING3. If not see
#define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
#endif
-/* LIB_SPEC appropriate for OpenBSD. */
-#ifdef HAS_LIBC_R
-/* -lc(_r)?(_p)?, select _r for threads, and _p for p or pg. */
-# define OBSD_LIB_SPEC "%{!shared:-lc%{pthread:_r}%{p:_p}%{!p:%{pg:_p}}}"
-#else
-/* Include -lpthread if -pthread is specified on the command line. */
-# define OBSD_LIB_SPEC "%{!shared:%{pthread:-lpthread%{p:_p}%{!p:%{pg:_p}}}} %{!shared:-lc%{p:_p}%{!p:%{pg:_p}}}"
-#endif
-
+#undef LIB_SPEC
+#define LIB_SPEC OBSD_LIB_SPEC
#ifndef OBSD_HAS_CORRECT_SPECS
@@ -128,15 +139,11 @@ along with GCC; see the file COPYING3. If not see
/* Since we use gas, stdin -> - is a good idea. */
#define AS_NEEDS_DASH_FOR_PIPED_INPUT
-/* LINK_SPEC appropriate for OpenBSD. Support for GCC options
- -static, -assert, and -nostdlib. */
-#undef LINK_SPEC
-#ifdef OBSD_NO_DYNAMIC_LIBRARIES
-#define LINK_SPEC \
- "%{g:%{!nostdlib:-L/usr/lib/debug}} %{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{assert*}"
-#else
-#define LINK_SPEC \
- "%{g:%{!nostdlib:-L/usr/lib/debug}} %{!shared:%{!nostdlib:%{!r*:%{!e*:-e start}}}} %{shared:-Bshareable -x} -dc -dp %{R*} %{static:-Bstatic} %{assert*}"
+#undef LIB_SPEC
+#define LIB_SPEC OBSD_LIB_SPEC
+
+#if defined(HAVE_LD_EH_FRAME_HDR)
+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
#endif
#undef LIB_SPEC
@@ -281,10 +288,6 @@ do { \
/* Storage layout. */
-/* Otherwise, since we support weak, gthr.h erroneously tries to use
- #pragma weak. */
-#define GTHREAD_USE_WEAK 0
-
/* bug work around: we don't want to support #pragma weak, but the current
code layout needs HANDLE_PRAGMA_WEAK asserted for __attribute((weak)) to
work. On the other hand, we don't define HANDLE_PRAGMA_WEAK directly,
« no previous file with comments | « gcc/gcc/config/mn10300/mn10300.h ('k') | gcc/gcc/config/pa/constraints.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698