summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-07 15:16:45 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-07 15:16:45 +0000
commit47c380e4136af664fdc8e773bcf29b523a9ce1d4 (patch)
tree57e722b9a3c6adaba87c5304fcd569e570c17e58
parentbeb12b9ac4b1b558994584b49349194c6d56549a (diff)
downloadgcc-47c380e4136af664fdc8e773bcf29b523a9ce1d4.tar.gz
* config/freebsd-spec.h: Add comment about what macros can be defined
in this header. (LINK_EH_SPEC, LINK_SSP_SPEC, USE_LD_AS_NEEDED): Don't define here. * config/freebsd.h (LINK_EH_SPEC, LINK_SSP_SPEC, USE_LD_AS_NEEDED): But here instead. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183970 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/freebsd-spec.h15
-rw-r--r--gcc/config/freebsd.h15
3 files changed, 25 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 117e87b90d5..0f424d81623 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2012-02-07 Jakub Jelinek <jakub@redhat.com>
+
+ * config/freebsd-spec.h: Add comment about what macros can be defined
+ in this header.
+ (LINK_EH_SPEC, LINK_SSP_SPEC, USE_LD_AS_NEEDED): Don't define here.
+ * config/freebsd.h (LINK_EH_SPEC, LINK_SSP_SPEC, USE_LD_AS_NEEDED): But
+ here instead.
+
2012-02-07 Richard Guenther <rguenther@suse.de>
* gimple-pretty-print.c (dump_gimple_phi): Avoid excessive
diff --git a/gcc/config/freebsd-spec.h b/gcc/config/freebsd-spec.h
index ab587edad61..770a3d1dc8d 100644
--- a/gcc/config/freebsd-spec.h
+++ b/gcc/config/freebsd-spec.h
@@ -134,15 +134,6 @@ is built with the --enable-threads configure-time option.} \
#define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1"
#endif
-#if defined(HAVE_LD_EH_FRAME_HDR)
-#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
-#endif
+/* NOTE: The freebsd-spec.h header is included also for various
+ non-FreeBSD powerpc targets, thus it should never define macros
+ other than FBSD_* prefixed ones, or USING_CONFIG_FREEBSD_SPEC. */
diff --git a/gcc/config/freebsd.h b/gcc/config/freebsd.h
index 51caad294be..f9a47132c3a 100644
--- a/gcc/config/freebsd.h
+++ b/gcc/config/freebsd.h
@@ -1,6 +1,6 @@
/* Base configuration file for all FreeBSD targets.
Copyright (C) 1999, 2000, 2001, 2007, 2008, 2009,
- 2010 Free Software Foundation, Inc.
+ 2010, 2011, 2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -45,6 +45,19 @@ along with GCC; see the file COPYING3. If not see
#undef LIB_SPEC
#define LIB_SPEC FBSD_LIB_SPEC
+#if defined(HAVE_LD_EH_FRAME_HDR)
+#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
+#endif
+
/************************[ Target stuff ]***********************************/
/* All FreeBSD Architectures support the ELF object file format. */