/* 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.
/* 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 \
{ \
%{!shared: \
%{!pg: %{pthread:-lpthread} -lc} \
%{pg: %{pthread:-lpthread_p} -lc_p} \
+ } \
+ %{shared: \
+ %{pthread:-lpthread} -lc \
}"
#endif
#endif
#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