[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patches] Fix PowerPC soft-float build with GCC hidden attribute changes



The patch for GCC bug 20218 causes hidden visibility attributes to
have an effect on references, not just on definitions.  This makes it
necessary to be more careful about when functions and objects are
declared hidden.  In particular, it breaks PowerPC soft-float glibc
because of some incorrect attribute_hidden declarations in
sysdeps/powerpc/nofpu/fesetenv.c.  There are correct declarations of
these variables in soft-supp.h, and removing the declarations from
fesetenv.c allows EGLIBC to build with a compiler with this patch.
Committed to EGLIBC trunk and 2.5 branch.

2007-01-02  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>

	* sysdeps/powerpc/nofpu/fesetenv.c (__sim_exceptions,
	__sim_disabled_exceptions, __sim_round_mode): Remove declarations.

Index: sysdeps/powerpc/nofpu/fesetenv.c
===================================================================
--- sysdeps/powerpc/nofpu/fesetenv.c	(revision 1089)
+++ sysdeps/powerpc/nofpu/fesetenv.c	(working copy)
@@ -1,5 +1,5 @@
 /* Set floating point environment (soft-float edition).
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2007 Free Software Foundation, Inc.
    Contributed by Aldy Hernandez <aldyh@xxxxxxxxxx>, 2002.
    This file is part of the GNU C Library.
 
@@ -22,10 +22,6 @@
 #include "soft-supp.h"
 #include <bp-sym.h>
 
-extern int __sim_exceptions attribute_hidden;
-extern int __sim_disabled_exceptions attribute_hidden;
-extern int __sim_round_mode attribute_hidden;
-
 int
 __fesetenv (const fenv_t *envp)
 {

-- 
Joseph S. Myers
joseph@xxxxxxxxxxxxxxxx