Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Remove the dead --disable-visiblity configure option
Browse files Browse the repository at this point in the history
At the same time, document --disable-Bsymbolic.
  • Loading branch information
Matthias Clasen committed Dec 15, 2010
1 parent 9411d0c commit 1bbf4cb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 24 deletions.
8 changes: 0 additions & 8 deletions configure.ac
Expand Up @@ -224,10 +224,6 @@ AC_ARG_ENABLE(rebuilds,
[AC_HELP_STRING([--disable-rebuilds],
[disable all source autogeneration rules])],,
[enable_rebuilds=yes])
AC_ARG_ENABLE(visibility,
[AC_HELP_STRING([--disable-visibility],
[don't use ELF visibility attributes])],,
[enable_visibility=yes])

if test "x$enable_threads" != "xyes"; then
enable_threads=no
Expand Down Expand Up @@ -296,10 +292,6 @@ else
fi
fi

if test "x$enable_visibility" = "xno"; then
GLIB_DEBUG_FLAGS="$GLIB_DEBUG_FLAGS -DDISABLE_VISIBILITY"
fi

# Ensure MSVC-compatible struct packing convention is used when
# compiling for Win32 with gcc.
# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
Expand Down
25 changes: 12 additions & 13 deletions docs/reference/glib/building.sgml
Expand Up @@ -232,8 +232,8 @@ How to compile GLib itself
<arg>--enable-included-printf</arg>
</group>
<group>
<arg>--disable-visibility</arg>
<arg>--enable-visibility</arg>
<arg>--disable-Bsymbolic</arg>
<arg>--enable-Bsymbolic</arg>
</group>
<group>
<arg>--disable-gtk-doc</arg>
Expand Down Expand Up @@ -510,19 +510,18 @@ How to compile GLib itself
</formalpara>

<formalpara>
<title><systemitem>--disable-visibility</systemitem> and
<systemitem>--enable-visibility</systemitem></title>
<title><systemitem>--disable-Bsymbolic</systemitem> and
<systemitem>--enable-Bsymbolic</systemitem></title>

<para>
By default, GLib uses ELF visibility attributes to optimize
PLT table entries if the compiler supports ELF visibility
attributes. A side-effect of the way in which this is currently
implemented is that any header change forces a full
recompilation, and missing includes may go unnoticed.
Therefore, it makes sense to turn this feature off while
doing GLib development, even if the compiler supports ELF
visibility attributes. The <option>--disable-visibility</option>
option allows to do that.
By default, GLib uses the -Bsymbolic-functions linker
flag to avoid intra-library PLT jumps. A side-effect
of this is that it is no longer possible to override
internal uses of GLib functions with
<envvar>LD_PRELOAD</envvar>. Therefore, it may make
sense to turn this feature off in some situations.
The <option>--disable-Bsymbolic</option> option allows
to do that.
</para>
</formalpara>

Expand Down
3 changes: 0 additions & 3 deletions gthread/tests/1bit-mutex.c
Expand Up @@ -26,9 +26,6 @@
*/

/* side-step some glib build stuff */
#ifndef DISABLE_VISIBILITY
#define DISABLE_VISIBILITY
#endif
#define GLIB_COMPILATION
/* rebuild gbitlock.c without futex support,
Expand Down

0 comments on commit 1bbf4cb

Please sign in to comment.