OSDN Git Service

* config/avr/avr.md: Resolve all AS1 and AS2 macros.
[pf3gnuchains/gcc-fork.git] / gcc / config / freebsd-spec.h
index 84d8127..ab587ed 100644 (file)
@@ -1,5 +1,6 @@
 /* Base configuration file for all FreeBSD targets.
-   Copyright (C) 1999, 2000, 2001, 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2004, 2005, 2007, 2009, 2010, 2011,
+   2012 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -33,25 +34,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 /* In case we need to know.  */
 #define USING_CONFIG_FREEBSD_SPEC 1
 
-/* This defines which switch letters take arguments.  On FreeBSD, most of
-   the normal cases (defined in gcc.c) apply, and we also have -h* and
-   -z* options (for the linker) (coming from SVR4).
-   We also have -R (alias --rpath), no -z, --soname (-h), --assert etc.  */
-
-#define FBSD_SWITCH_TAKES_ARG(CHAR)                                    \
-  (DEFAULT_SWITCH_TAKES_ARG (CHAR)                                     \
-    || (CHAR) == 'h'                                                   \
-    || (CHAR) == 'z' /* ignored by ld */                               \
-    || (CHAR) == 'R')
-
-/* This defines which multi-letter switches take arguments.  */
-
-#define FBSD_WORD_SWITCH_TAKES_ARG(STR)                                        \
-  (DEFAULT_WORD_SWITCH_TAKES_ARG (STR)                                 \
-   || !strcmp ((STR), "rpath") || !strcmp ((STR), "rpath-link")                \
-   || !strcmp ((STR), "soname") || !strcmp ((STR), "defsym")           \
-   || !strcmp ((STR), "assert") || !strcmp ((STR), "dynamic-linker"))
-
 #define FBSD_TARGET_OS_CPP_BUILTINS()                                  \
   do                                                                   \
     {                                                                  \
@@ -139,6 +121,9 @@ is built with the --enable-threads configure-time option.}          \
   %{!shared:                                                           \
     %{!pg: %{pthread:-lpthread} -lc}                                   \
     %{pg:  %{pthread:-lpthread_p} -lc_p}                               \
+  }                                                                    \
+  %{shared:                                                            \
+    %{pthread:-lpthread} -lc                                           \
   }"
 #endif
 #endif
@@ -153,6 +138,10 @@ is built with the --enable-threads configure-time option.}         \
 #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
 #endif
 
+#ifdef TARGET_LIBC_PROVIDES_SSP
+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp_nonshared}"
+#endif
+
 /* Use --as-needed -lgcc_s for eh support.  */
 #ifdef HAVE_LD_AS_NEEDED
 #define USE_LD_AS_NEEDED 1