From 6a352190025d95e9307ca42790f7e6aea147238d Mon Sep 17 00:00:00 2001 From: ro Date: Mon, 25 May 2009 12:12:08 +0000 Subject: [PATCH] PR bootstrap/40027 * config/i386/i386.c (USE_HIDDEN_LINKONCE): Only define if missing. * config/i386/sol2.h [!TARGET_GNU_LD] (USE_HIDDEN_LINKONCE): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147845 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 10 ++++++---- gcc/config/i386/sol2.h | 8 +++++++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5696b43b4ca..cbcd386e06b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-05-25 Rainer Orth + + PR bootstrap/40027 + * config/i386/i386.c (USE_HIDDEN_LINKONCE): Only define if missing. + * config/i386/sol2.h [!TARGET_GNU_LD] (USE_HIDDEN_LINKONCE): Define. + 2009-05-25 Ira Rosen PR tree-optimization/40238 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 205691fd5fe..55ec1d921cb 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -7433,10 +7433,12 @@ ix86_setup_frame_addresses (void) cfun->machine->accesses_prev_frame = 1; } -#if (defined(HAVE_GAS_HIDDEN) && (SUPPORTS_ONE_ONLY - 0)) || TARGET_MACHO -# define USE_HIDDEN_LINKONCE 1 -#else -# define USE_HIDDEN_LINKONCE 0 +#ifndef USE_HIDDEN_LINKONCE +# if (defined(HAVE_GAS_HIDDEN) && (SUPPORTS_ONE_ONLY - 0)) || TARGET_MACHO +# define USE_HIDDEN_LINKONCE 1 +# else +# define USE_HIDDEN_LINKONCE 0 +# endif #endif static int pic_labels_used; diff --git a/gcc/config/i386/sol2.h b/gcc/config/i386/sol2.h index 1d21cd9c043..4c2dfe975cf 100644 --- a/gcc/config/i386/sol2.h +++ b/gcc/config/i386/sol2.h @@ -1,6 +1,6 @@ /* Target definitions for GCC for Intel 80386 running Solaris 2 Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, - 2004, 2007, 2008 Free Software Foundation, Inc. + 2004, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Fred Fish (fnf@cygnus.com). This file is part of GCC. @@ -112,3 +112,9 @@ along with GCC; see the file COPYING3. If not see /* We do not need NT_VERSION notes. */ #undef X86_FILE_START_VERSION_DIRECTIVE #define X86_FILE_START_VERSION_DIRECTIVE false + +/* Only recent versions of Solaris 11 ld properly support hidden .gnu.linkonce + sections, so don't use them. */ +#ifndef TARGET_GNU_LD +#define USE_HIDDEN_LINKONCE 0 +#endif -- 2.11.0