Commit 4502eb56 authored by Alexandre Julliard's avatar Alexandre Julliard

configure: Use hidden visibility also when building Unix libraries.

parent c7a2aaf2
...@@ -18655,6 +18655,34 @@ if test "x$ac_cv_cflags__fcf_protection_none" = xyes ...@@ -18655,6 +18655,34 @@ if test "x$ac_cv_cflags__fcf_protection_none" = xyes
then : then :
EXTRACFLAGS="$EXTRACFLAGS -fcf-protection=none" EXTRACFLAGS="$EXTRACFLAGS -fcf-protection=none"
fi fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fvisibility=hidden" >&5
printf %s "checking whether the compiler supports -fvisibility=hidden... " >&6; }
if test ${ac_cv_cflags__fvisibility_hidden+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_wine_try_cflags_saved=$CFLAGS
CFLAGS="$CFLAGS -fvisibility=hidden"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main(int argc, char **argv) { return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_cflags__fvisibility_hidden=yes
else $as_nop
ac_cv_cflags__fvisibility_hidden=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ac_wine_try_cflags_saved
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__fvisibility_hidden" >&5
printf "%s\n" "$ac_cv_cflags__fvisibility_hidden" >&6; }
if test "x$ac_cv_cflags__fvisibility_hidden" = xyes
then :
EXTRACFLAGS="$EXTRACFLAGS -fvisibility=hidden"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fno-stack-protector" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fno-stack-protector" >&5
printf %s "checking whether the compiler supports -fno-stack-protector... " >&6; } printf %s "checking whether the compiler supports -fno-stack-protector... " >&6; }
if test ${ac_cv_cflags__fno_stack_protector+y} if test ${ac_cv_cflags__fno_stack_protector+y}
...@@ -19359,34 +19387,6 @@ if test "x$ac_cv_cflags__fshort_wchar" = xyes ...@@ -19359,34 +19387,6 @@ if test "x$ac_cv_cflags__fshort_wchar" = xyes
then : then :
MSVCRTFLAGS="$MSVCRTFLAGS -fshort-wchar" MSVCRTFLAGS="$MSVCRTFLAGS -fshort-wchar"
fi fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fvisibility=hidden" >&5
printf %s "checking whether the compiler supports -fvisibility=hidden... " >&6; }
if test ${ac_cv_cflags__fvisibility_hidden+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_wine_try_cflags_saved=$CFLAGS
CFLAGS="$CFLAGS -fvisibility=hidden"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main(int argc, char **argv) { return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_cflags__fvisibility_hidden=yes
else $as_nop
ac_cv_cflags__fvisibility_hidden=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ac_wine_try_cflags_saved
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__fvisibility_hidden" >&5
printf "%s\n" "$ac_cv_cflags__fvisibility_hidden" >&6; }
if test "x$ac_cv_cflags__fvisibility_hidden" = xyes
then :
MSVCRTFLAGS="$MSVCRTFLAGS -fvisibility=hidden"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wno-format" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wno-format" >&5
printf %s "checking whether the compiler supports -Wno-format... " >&6; } printf %s "checking whether the compiler supports -Wno-format... " >&6; }
if test ${ac_cv_cflags__Wno_format+y} if test ${ac_cv_cflags__Wno_format+y}
......
...@@ -1841,6 +1841,7 @@ then ...@@ -1841,6 +1841,7 @@ then
WINE_TRY_CFLAGS([-Werror=unused-command-line-argument],[CFLAGS="$CFLAGS -Werror=unused-command-line-argument"]) WINE_TRY_CFLAGS([-Werror=unused-command-line-argument],[CFLAGS="$CFLAGS -Werror=unused-command-line-argument"])
WINE_TRY_CFLAGS([-Werror=ignored-optimization-argument],[CFLAGS="$CFLAGS -Werror=ignored-optimization-argument"]) WINE_TRY_CFLAGS([-Werror=ignored-optimization-argument],[CFLAGS="$CFLAGS -Werror=ignored-optimization-argument"])
WINE_TRY_CFLAGS([-fcf-protection=none]) WINE_TRY_CFLAGS([-fcf-protection=none])
WINE_TRY_CFLAGS([-fvisibility=hidden])
WINE_TRY_CFLAGS([-fno-stack-protector]) WINE_TRY_CFLAGS([-fno-stack-protector])
WINE_TRY_CFLAGS([-fno-strict-aliasing]) WINE_TRY_CFLAGS([-fno-strict-aliasing])
WINE_TRY_CFLAGS([-Wdeclaration-after-statement]) WINE_TRY_CFLAGS([-Wdeclaration-after-statement])
...@@ -1922,7 +1923,6 @@ char*f(const char *h,char n) {return strchr(h,n);}]])],[ac_cv_c_logicalop_noisy= ...@@ -1922,7 +1923,6 @@ char*f(const char *h,char n) {return strchr(h,n);}]])],[ac_cv_c_logicalop_noisy=
*) MSVCRTFLAGS="-D_WIN32" *) MSVCRTFLAGS="-D_WIN32"
WINE_TRY_CFLAGS([-fno-builtin],[MSVCRTFLAGS="$MSVCRTFLAGS -fno-builtin"]) WINE_TRY_CFLAGS([-fno-builtin],[MSVCRTFLAGS="$MSVCRTFLAGS -fno-builtin"])
WINE_TRY_CFLAGS([-fshort-wchar],[MSVCRTFLAGS="$MSVCRTFLAGS -fshort-wchar"]) WINE_TRY_CFLAGS([-fshort-wchar],[MSVCRTFLAGS="$MSVCRTFLAGS -fshort-wchar"])
WINE_TRY_CFLAGS([-fvisibility=hidden],[MSVCRTFLAGS="$MSVCRTFLAGS -fvisibility=hidden"])
WINE_TRY_CFLAGS([-Wno-format],[MSVCRTFLAGS="$MSVCRTFLAGS -Wno-format"]) ;; WINE_TRY_CFLAGS([-Wno-format],[MSVCRTFLAGS="$MSVCRTFLAGS -Wno-format"]) ;;
esac esac
......
...@@ -2305,7 +2305,7 @@ static void check_command_line( int argc, char *argv[] ) ...@@ -2305,7 +2305,7 @@ static void check_command_line( int argc, char *argv[] )
* *
* Main entry point called by the wine loader. * Main entry point called by the wine loader.
*/ */
void __wine_main( int argc, char *argv[], char *envp[] ) DECLSPEC_EXPORT void __wine_main( int argc, char *argv[], char *envp[] )
{ {
init_paths( argv ); init_paths( argv );
......
...@@ -30,7 +30,7 @@ extern "C" { ...@@ -30,7 +30,7 @@ extern "C" {
#ifndef WINUSERAPI #ifndef WINUSERAPI
#if defined(_USER32_) || defined(WINE_UNIX_LIB) #if defined(_USER32_) || defined(WINE_UNIX_LIB)
#define WINUSERAPI #define WINUSERAPI DECLSPEC_EXPORT
#else #else
#define WINUSERAPI DECLSPEC_IMPORT #define WINUSERAPI DECLSPEC_IMPORT
#endif #endif
......
...@@ -28,7 +28,7 @@ extern "C" { ...@@ -28,7 +28,7 @@ extern "C" {
#ifndef WINUSERAPI #ifndef WINUSERAPI
#if defined(_USER32_) || defined(WINE_UNIX_LIB) #if defined(_USER32_) || defined(WINE_UNIX_LIB)
#define WINUSERAPI #define WINUSERAPI DECLSPEC_EXPORT
#else #else
#define WINUSERAPI DECLSPEC_IMPORT #define WINUSERAPI DECLSPEC_IMPORT
#endif #endif
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#ifndef W32KAPI #ifndef W32KAPI
# if defined(_WIN32U_) || defined(WINE_UNIX_LIB) # if defined(_WIN32U_) || defined(WINE_UNIX_LIB)
# define W32KAPI # define W32KAPI DECLSPEC_EXPORT
# else # else
# define W32KAPI DECLSPEC_IMPORT # define W32KAPI DECLSPEC_IMPORT
# endif # endif
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#ifndef W32KAPI #ifndef W32KAPI
# if defined(_WIN32U_) || defined(WINE_UNIX_LIB) # if defined(_WIN32U_) || defined(WINE_UNIX_LIB)
# define W32KAPI # define W32KAPI DECLSPEC_EXPORT
# else # else
# define W32KAPI DECLSPEC_IMPORT # define W32KAPI DECLSPEC_IMPORT
# endif # endif
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#if !defined(_RPCRT4_) && !defined(_KRPCENV_) #if !defined(_RPCRT4_) && !defined(_KRPCENV_)
#define RPCRTAPI DECLSPEC_IMPORT #define RPCRTAPI DECLSPEC_IMPORT
#else #else
#define RPCRTAPI #define RPCRTAPI DECLSPEC_EXPORT
#endif #endif
#endif #endif
......
...@@ -109,11 +109,11 @@ struct __wine_debug_channel ...@@ -109,11 +109,11 @@ struct __wine_debug_channel
#endif #endif
NTSYSAPI int WINAPI __wine_dbg_write( const char *str, unsigned int len ); NTSYSAPI int WINAPI __wine_dbg_write( const char *str, unsigned int len );
extern unsigned char __cdecl __wine_dbg_get_channel_flags( struct __wine_debug_channel *channel ); extern DECLSPEC_EXPORT unsigned char __cdecl __wine_dbg_get_channel_flags( struct __wine_debug_channel *channel );
extern const char * __cdecl __wine_dbg_strdup( const char *str ); extern DECLSPEC_EXPORT const char * __cdecl __wine_dbg_strdup( const char *str );
extern int __cdecl __wine_dbg_output( const char *str ); extern DECLSPEC_EXPORT int __cdecl __wine_dbg_output( const char *str );
extern int __cdecl __wine_dbg_header( enum __wine_debug_class cls, struct __wine_debug_channel *channel, extern DECLSPEC_EXPORT int __cdecl __wine_dbg_header( enum __wine_debug_class cls, struct __wine_debug_channel *channel,
const char *function ); const char *function );
/* /*
* Exported definitions and macros * Exported definitions and macros
......
...@@ -29,8 +29,8 @@ typedef UINT64 unixlib_handle_t; ...@@ -29,8 +29,8 @@ typedef UINT64 unixlib_handle_t;
typedef NTSTATUS (*unixlib_entry_t)( void *args ); typedef NTSTATUS (*unixlib_entry_t)( void *args );
extern const unixlib_entry_t __wine_unix_call_funcs[]; extern DECLSPEC_EXPORT const unixlib_entry_t __wine_unix_call_funcs[];
extern const unixlib_entry_t __wine_unix_call_wow64_funcs[]; extern DECLSPEC_EXPORT const unixlib_entry_t __wine_unix_call_wow64_funcs[];
/* some useful helpers from ntdll */ /* some useful helpers from ntdll */
NTSYSAPI const char *ntdll_get_build_dir(void); NTSYSAPI const char *ntdll_get_build_dir(void);
......
...@@ -26,7 +26,7 @@ extern "C" { ...@@ -26,7 +26,7 @@ extern "C" {
#ifndef WINGDIAPI #ifndef WINGDIAPI
#if defined(_GDI32_) || defined(WINE_UNIX_LIB) #if defined(_GDI32_) || defined(WINE_UNIX_LIB)
#define WINGDIAPI #define WINGDIAPI DECLSPEC_EXPORT
#else #else
#define WINGDIAPI DECLSPEC_IMPORT #define WINGDIAPI DECLSPEC_IMPORT
#endif #endif
......
...@@ -43,7 +43,7 @@ extern "C" { ...@@ -43,7 +43,7 @@ extern "C" {
#endif #endif
#if defined(_NTSYSTEM_) || defined(WINE_UNIX_LIB) #if defined(_NTSYSTEM_) || defined(WINE_UNIX_LIB)
#define NTSYSAPI #define NTSYSAPI DECLSPEC_EXPORT
#else #else
#define NTSYSAPI DECLSPEC_IMPORT #define NTSYSAPI DECLSPEC_IMPORT
#endif #endif
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#if !defined(_USER32_) && !defined(WINE_UNIX_LIB) #if !defined(_USER32_) && !defined(WINE_UNIX_LIB)
#define WINUSERAPI DECLSPEC_IMPORT #define WINUSERAPI DECLSPEC_IMPORT
#else #else
#define WINUSERAPI #define WINUSERAPI DECLSPEC_EXPORT
#endif #endif
#endif #endif
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
extern char **environ; extern char **environ;
/* the preloader will set this variable */ /* the preloader will set this variable */
const struct wine_preload_info *wine_main_preload_info = NULL; const __attribute((visibility("default"))) struct wine_preload_info *wine_main_preload_info = NULL;
/* canonicalize path and return its directory name */ /* canonicalize path and return its directory name */
static char *realpath_dirname( const char *name ) static char *realpath_dirname( const char *name )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment