Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 24213 | Differences between
and this patch

Collapse All | Expand All

(-)src/compiler.h (-1 / +3 lines)
Lines 26-32 Link Here
26
extern "C" {
26
extern "C" {
27
#endif
27
#endif
28
28
29
#if defined(__GNUC__) && __GNUC__ >= 4
29
#include <config.h>
30
31
#ifdef HAVE_VISIBILITY_HIDDEN
30
#    define EXPORT_SYMBOL __attribute__((visibility("default")))
32
#    define EXPORT_SYMBOL __attribute__((visibility("default")))
31
#else
33
#else
32
#    define EXPORT_SYMBOL
34
#    define EXPORT_SYMBOL
(-)src/Makefile.am (-1 / +5 lines)
Lines 36-42 Link Here
36
36
37
INCLUDES = -I$(srcdir)/../include
37
INCLUDES = -I$(srcdir)/../include
38
38
39
AM_CFLAGS = $(GLIB_CFLAGS) -DG_DISABLE_DEPRECATED -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Winline -pipe $(FVISIBILITY)
39
AM_CFLAGS = $(GLIB_CFLAGS) -DG_DISABLE_DEPRECATED \
40
	-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 \
41
	-D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations \
42
	-Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \
43
	-Winline -pipe @GCC_FVISIBILITY_HIDDEN@
40
44
41
install-data-hook:
45
install-data-hook:
42
	( \
46
	( \
(-)configure.ac (-11 / +21 lines)
Lines 48-67 Link Here
48
AC_PROG_CC
48
AC_PROG_CC
49
49
50
# GCC 4.x -fvisibility=hidden {
50
# GCC 4.x -fvisibility=hidden {
51
FVISIBILITY=""
51
AC_DEFUN([CHECK_GCC_FVISIBILITY],
52
[
52
AC_LANG_PUSH(C)
53
AC_LANG_PUSH(C)
53
saved_cflags="$CFLAGS"
54
saved_CFLAGS="$CFLAGS"
54
CFLAGS="$CFLAGS -fvisibility=hidden"
55
CFLAGS="$saved_CFLAGS -fvisibility=hidden"
55
AC_CACHE_CHECK([whether $CC supports -fvisibility=hidden], [ac_cv_gcc_fvis],
56
AC_CACHE_CHECK([whether compiler accepts -fvisibility=hidden],
56
    [AC_COMPILE_IFELSE([ ], [ac_cv_gcc_fvis=yes], [ac_cv_gcc_fvis=no])])
57
[cv_fvisibility_hidden],
57
CFLAGS="$saved_cflags"
58
	AC_COMPILE_IFELSE(
58
if test "$ac_cv_gcc_fvis" = yes; then
59
		AC_LANG_PROGRAM(
59
    FVISIBILITY="-fvisibility=hidden"
60
		[],
60
else
61
		[]),
61
    FVISIBILITY=""
62
		[cv_fvisibility_hidden=yes],
63
		[cv_fvisibility_hidden=no]
64
	)
65
)
66
if test "$cv_fvisibility_hidden" = "yes"; then
67
AC_DEFINE(HAVE_VISIBILITY_HIDDEN, [],
68
        [True if compiler supports -fvisibility=hidden])
69
AC_SUBST(GCC_FVISIBILITY_HIDDEN, [-fvisibility=hidden])
62
fi
70
fi
63
AC_SUBST(FVISIBILITY)
71
CFLAGS="$saved_CFLAGS"
64
AC_LANG_POP(C)
72
AC_LANG_POP(C)
73
])dnl
74
CHECK_GCC_FVISIBILITY()
65
# }
75
# }
66
76
67
AC_PROG_INSTALL
77
AC_PROG_INSTALL

Return to bug 24213