Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
[dragonfly.git] / gnu / usr.bin / cc34 / cc_prep / patches / varasm.c.patch
blob5639dddeca18913c0f334b31a579ba1e0b14d913
1 $DragonFly: src/gnu/usr.bin/cc34/cc_prep/patches/varasm.c.patch,v 1.1 2004/12/21 13:10:48 joerg Exp $
3 ===================================================================
4 RCS file: /home/joerg/wd/repository/dragonflybsd/src/contrib/gcc-3.4/gcc/varasm.c,v
5 retrieving revision 1.2
6 diff -u -r1.2 varasm.c
7 --- varasm.c 20 Dec 2004 19:23:24 -0000 1.2
8 +++ varasm.c 20 Dec 2004 20:51:50 -0000
9 @@ -5151,8 +5151,8 @@
10 /* Static variables are always local. */
11 else if (! TREE_PUBLIC (exp))
12 local_p = true;
13 - /* A variable is local if the user tells us so. */
14 - else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
15 + /* A variable is local if the user explicitly tells us so. */
16 + else if (DECL_VISIBILITYSPECIFIED (exp) && DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
17 local_p = true;
18 /* Otherwise, variables defined outside this object may not be local. */
19 else if (DECL_EXTERNAL (exp))
20 @@ -5160,6 +5160,9 @@
21 /* Linkonce and weak data are never local. */
22 else if (DECL_ONE_ONLY (exp) || DECL_WEAK (exp))
23 local_p = false;
24 + /* If none of the above and visibility is not default, make local. */
25 + else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
26 + local_p = true;
27 /* If PIC, then assume that any global name can be overridden by
28 symbols resolved from other modules. */
29 else if (shlib)