mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-21 17:09:06 -07:00
configure: Add a separate variable for wineloader-specific flags.
And apply the common link flags also to the wineserver. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
61d4ea17cb
commit
655e5e8c70
5 changed files with 26 additions and 23 deletions
|
@ -88,6 +88,7 @@ conf_manext = 5
|
|||
WINELOADER_PROGRAMS = @WINELOADER_PROGRAMS@
|
||||
WINELOADER_DEPENDS = @WINELOADER_DEPENDS@
|
||||
WINELOADER_INSTALL = @WINELOADER_INSTALL@
|
||||
WINELOADER_LDFLAGS = @WINELOADER_LDFLAGS@
|
||||
LIBWINE_SHAREDLIB = @LIBWINE_SHAREDLIB@
|
||||
LIBWINE_IMPORTLIB = @LIBWINE_IMPORTLIB@
|
||||
LIBWINE_INSTALL_LIB = @LIBWINE_INSTALL_LIB@
|
||||
|
|
22
configure
vendored
22
configure
vendored
|
@ -723,6 +723,7 @@ SUBDIRS
|
|||
READELF
|
||||
OTOOL
|
||||
LDD
|
||||
WINELOADER_LDFLAGS
|
||||
LDEXECFLAGS
|
||||
LDRPATH_LOCAL
|
||||
LDRPATH_INSTALL
|
||||
|
@ -7346,6 +7347,8 @@ LDRPATH_LOCAL=""
|
|||
|
||||
LDEXECFLAGS=""
|
||||
|
||||
WINELOADER_LDFLAGS=""
|
||||
|
||||
LIBEXT="so"
|
||||
DLLEXT=".so"
|
||||
IMPLIBEXT="def"
|
||||
|
@ -8135,7 +8138,7 @@ done
|
|||
|
||||
APPKIT_LIBS="-framework AppKit"
|
||||
|
||||
LDEXECFLAGS="-image_base 0x7bf00000 -Wl,-pagezero_size,0x1000,-segaddr,WINE_DOS,0x00001000,-segaddr,WINE_SHAREDHEAP,0x7f000000,-sectcreate,__TEXT,__info_plist,wine_info.plist"
|
||||
WINELOADER_LDFLAGS="-image_base 0x7bf00000 -Wl,-pagezero_size,0x1000,-segaddr,WINE_DOS,0x00001000,-segaddr,WINE_SHAREDHEAP,0x7f000000,-sectcreate,__TEXT,__info_plist,wine_info.plist"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,-no_pie" >&5
|
||||
$as_echo_n "checking whether the compiler supports -Wl,-no_pie... " >&6; }
|
||||
if ${ac_cv_cflags__Wl__no_pie+:} false; then :
|
||||
|
@ -8159,7 +8162,7 @@ fi
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__Wl__no_pie" >&5
|
||||
$as_echo "$ac_cv_cflags__Wl__no_pie" >&6; }
|
||||
if test "x$ac_cv_cflags__Wl__no_pie" = xyes; then :
|
||||
LDEXECFLAGS="-Wl,-no_pie $LDEXECFLAGS"
|
||||
WINELOADER_LDFLAGS="-Wl,-no_pie $WINELOADER_LDFLAGS"
|
||||
fi
|
||||
if test "$ac_cv_header_DiskArbitration_DiskArbitration_h" = "yes"
|
||||
then
|
||||
|
@ -8377,7 +8380,7 @@ fi
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__fPIC__Wl___export_dynamic" >&5
|
||||
$as_echo "$ac_cv_cflags__fPIC__Wl___export_dynamic" >&6; }
|
||||
if test "x$ac_cv_cflags__fPIC__Wl___export_dynamic" = xyes; then :
|
||||
LDEXECFLAGS="$LDEXECFLAGS -Wl,--export-dynamic"
|
||||
WINELOADER_LDFLAGS="-Wl,--export-dynamic"
|
||||
fi
|
||||
as_ac_var=`$as_echo "ac_cv_cflags_-fPIC -Wl,--rpath,\\$ORIGIN/../lib" | $as_tr_sh`
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fPIC -Wl,--rpath,\$ORIGIN/../lib" >&5
|
||||
|
@ -8472,7 +8475,6 @@ fi
|
|||
|
||||
*)
|
||||
DLLFLAGS="$DLLFLAGS -fPIC"
|
||||
LDEXECFLAGS=""
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can build a GNU style ELF dll" >&5
|
||||
$as_echo_n "checking whether we can build a GNU style ELF dll... " >&6; }
|
||||
if ${ac_cv_c_dll_gnuelf+:} false; then :
|
||||
|
@ -8601,7 +8603,7 @@ fi
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__fPIC__Wl___export_dynamic" >&5
|
||||
$as_echo "$ac_cv_cflags__fPIC__Wl___export_dynamic" >&6; }
|
||||
if test "x$ac_cv_cflags__fPIC__Wl___export_dynamic" = xyes; then :
|
||||
LDEXECFLAGS="-Wl,--export-dynamic"
|
||||
WINELOADER_LDFLAGS="-Wl,--export-dynamic"
|
||||
fi
|
||||
|
||||
as_ac_var=`$as_echo "ac_cv_cflags_-fPIC -Wl,--rpath,\\$ORIGIN/../lib" | $as_tr_sh`
|
||||
|
@ -8714,8 +8716,8 @@ fi
|
|||
$as_echo "$ac_cv_cflags__Wl__Ttext_segment_0x7bc00000" >&6; }
|
||||
if test "x$ac_cv_cflags__Wl__Ttext_segment_0x7bc00000" = xyes; then :
|
||||
case $host_os in
|
||||
freebsd* | kfreebsd*-gnu) LDEXECFLAGS="$LDEXECFLAGS -Wl,-Ttext-segment=0x60000000" ;;
|
||||
*) LDEXECFLAGS="$LDEXECFLAGS -Wl,-Ttext-segment=0x7c000000" ;;
|
||||
freebsd* | kfreebsd*-gnu) WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,-Ttext-segment=0x60000000" ;;
|
||||
*) WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,-Ttext-segment=0x7c000000" ;;
|
||||
esac
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,--section-start,.interp=0x7c000400" >&5
|
||||
|
@ -8742,8 +8744,8 @@ fi
|
|||
$as_echo "$ac_cv_cflags__Wl___section_start__interp_0x7c000400" >&6; }
|
||||
if test "x$ac_cv_cflags__Wl___section_start__interp_0x7c000400" = xyes; then :
|
||||
case $host_os in
|
||||
freebsd* | kfreebsd*-gnu) LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x60000400" ;;
|
||||
*) LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7c000400" ;;
|
||||
freebsd* | kfreebsd*-gnu) WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,--section-start,.interp=0x60000400" ;;
|
||||
*) WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,--section-start,.interp=0x7c000400" ;;
|
||||
esac
|
||||
fi
|
||||
# Extract the first word of "prelink", so it can be a program name with args.
|
||||
|
@ -8815,7 +8817,7 @@ fi
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__Wl__z_max_page_size_0x1000" >&5
|
||||
$as_echo "$ac_cv_cflags__Wl__z_max_page_size_0x1000" >&6; }
|
||||
if test "x$ac_cv_cflags__Wl__z_max_page_size_0x1000" = xyes; then :
|
||||
LDEXECFLAGS="$LDEXECFLAGS -Wl,-z,max-page-size=0x1000"
|
||||
WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,-z,max-page-size=0x1000"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
20
configure.ac
20
configure.ac
|
@ -678,6 +678,7 @@ AC_SUBST(DLLFLAGS,"-D_REENTRANT")
|
|||
AC_SUBST(LDRPATH_INSTALL,"")
|
||||
AC_SUBST(LDRPATH_LOCAL,"")
|
||||
AC_SUBST(LDEXECFLAGS,"")
|
||||
AC_SUBST(WINELOADER_LDFLAGS,"")
|
||||
LIBEXT="so"
|
||||
DLLEXT=".so"
|
||||
IMPLIBEXT="def"
|
||||
|
@ -736,9 +737,9 @@ case $host_os in
|
|||
AC_SUBST(APPLICATIONSERVICES_LIBS,"-framework ApplicationServices")
|
||||
AC_SUBST(CORESERVICES_LIBS,"-framework CoreServices")
|
||||
AC_SUBST(APPKIT_LIBS,"-framework AppKit")
|
||||
LDEXECFLAGS="-image_base 0x7bf00000 -Wl,-pagezero_size,0x1000,-segaddr,WINE_DOS,0x00001000,-segaddr,WINE_SHAREDHEAP,0x7f000000,-sectcreate,__TEXT,__info_plist,wine_info.plist"
|
||||
WINELOADER_LDFLAGS="-image_base 0x7bf00000 -Wl,-pagezero_size,0x1000,-segaddr,WINE_DOS,0x00001000,-segaddr,WINE_SHAREDHEAP,0x7f000000,-sectcreate,__TEXT,__info_plist,wine_info.plist"
|
||||
WINE_TRY_CFLAGS([-Wl,-no_pie],
|
||||
[LDEXECFLAGS="-Wl,-no_pie $LDEXECFLAGS"])
|
||||
[WINELOADER_LDFLAGS="-Wl,-no_pie $WINELOADER_LDFLAGS"])
|
||||
if test "$ac_cv_header_DiskArbitration_DiskArbitration_h" = "yes"
|
||||
then
|
||||
dnl DiskArbitration API is not public on Darwin < 8.0, use it only if header found
|
||||
|
@ -849,7 +850,7 @@ case $host_os in
|
|||
DLLFLAGS="$DLLFLAGS -fPIC"
|
||||
LDEXECFLAGS="-Wl,-pie"
|
||||
WINE_TRY_CFLAGS([-fPIC -Wl,--export-dynamic],
|
||||
[LDEXECFLAGS="$LDEXECFLAGS -Wl,--export-dynamic"])
|
||||
[WINELOADER_LDFLAGS="-Wl,--export-dynamic"])
|
||||
WINE_TRY_CFLAGS([-fPIC -Wl,--rpath,\$ORIGIN/../lib],
|
||||
[LDRPATH_INSTALL="-Wl,--rpath,\\\$\$ORIGIN/\`\$(MAKEDEP) -R \${bindir} \${libdir}\`"
|
||||
LDRPATH_LOCAL="-Wl,--rpath,\\\$\$ORIGIN/\$(top_builddir)/libs/wine"],
|
||||
|
@ -866,7 +867,6 @@ case $host_os in
|
|||
|
||||
*)
|
||||
DLLFLAGS="$DLLFLAGS -fPIC"
|
||||
LDEXECFLAGS=""
|
||||
AC_CACHE_CHECK([whether we can build a GNU style ELF dll], ac_cv_c_dll_gnuelf,
|
||||
[WINE_TRY_SHLIB_FLAGS([-fPIC -shared -Wl,-Bsymbolic],
|
||||
ac_cv_c_dll_gnuelf="yes",ac_cv_c_dll_gnuelf="no")])
|
||||
|
@ -884,7 +884,7 @@ case $host_os in
|
|||
rm -f conftest.map
|
||||
|
||||
WINE_TRY_CFLAGS([-fPIC -Wl,--export-dynamic],
|
||||
[LDEXECFLAGS="-Wl,--export-dynamic"])
|
||||
[WINELOADER_LDFLAGS="-Wl,--export-dynamic"])
|
||||
|
||||
WINE_TRY_CFLAGS([-fPIC -Wl,--rpath,\$ORIGIN/../lib],
|
||||
[LDRPATH_INSTALL="-Wl,--rpath,\\\$\$ORIGIN/\`\$(MAKEDEP) -R \${bindir} \${libdir}\`"
|
||||
|
@ -900,13 +900,13 @@ case $host_os in
|
|||
*i[[3456789]]86* | x86_64)
|
||||
WINE_TRY_CFLAGS([-Wl,-Ttext-segment=0x7bc00000],
|
||||
[case $host_os in
|
||||
freebsd* | kfreebsd*-gnu) LDEXECFLAGS="$LDEXECFLAGS -Wl,-Ttext-segment=0x60000000" ;;
|
||||
*) LDEXECFLAGS="$LDEXECFLAGS -Wl,-Ttext-segment=0x7c000000" ;;
|
||||
freebsd* | kfreebsd*-gnu) WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,-Ttext-segment=0x60000000" ;;
|
||||
*) WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,-Ttext-segment=0x7c000000" ;;
|
||||
esac],
|
||||
[WINE_TRY_CFLAGS([-Wl,--section-start,.interp=0x7c000400],
|
||||
[case $host_os in
|
||||
freebsd* | kfreebsd*-gnu) LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x60000400" ;;
|
||||
*) LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7c000400" ;;
|
||||
freebsd* | kfreebsd*-gnu) WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,--section-start,.interp=0x60000400" ;;
|
||||
*) WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,--section-start,.interp=0x7c000400" ;;
|
||||
esac])
|
||||
AC_PATH_PROG(PRELINK, prelink, false, [/sbin /usr/sbin $PATH])
|
||||
if test "x$PRELINK" = xfalse
|
||||
|
@ -914,7 +914,7 @@ case $host_os in
|
|||
WINE_WARNING([prelink not found and linker does not support relocation, base address of core dlls won't be set correctly.])
|
||||
fi])
|
||||
WINE_TRY_CFLAGS([-Wl,-z,max-page-size=0x1000],
|
||||
[LDEXECFLAGS="$LDEXECFLAGS -Wl,-z,max-page-size=0x1000"])
|
||||
[WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,-z,max-page-size=0x1000"])
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -19,11 +19,11 @@ preloader_EXTRADEFS = $(MSVCRTFLAGS)
|
|||
|
||||
wine_OBJS = main.o
|
||||
wine_DEPS = $(WINELOADER_DEPENDS)
|
||||
wine_LDFLAGS = $(LDEXECFLAGS) -lwine $(PTHREAD_LIBS)
|
||||
wine_LDFLAGS = $(WINELOADER_LDFLAGS) $(LDEXECFLAGS) -lwine $(PTHREAD_LIBS)
|
||||
|
||||
wine64_OBJS = main.o
|
||||
wine64_DEPS = $(WINELOADER_DEPENDS)
|
||||
wine64_LDFLAGS = $(LDEXECFLAGS) -lwine $(PTHREAD_LIBS)
|
||||
wine64_LDFLAGS = $(WINELOADER_LDFLAGS) $(LDEXECFLAGS) -lwine $(PTHREAD_LIBS)
|
||||
|
||||
wine_preloader_OBJS = preloader.o
|
||||
wine_preloader_LDFLAGS = -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000
|
||||
|
|
|
@ -50,6 +50,6 @@ MANPAGES = \
|
|||
wineserver.fr.UTF-8.man.in \
|
||||
wineserver.man.in
|
||||
|
||||
EXTRALIBS = -lwine $(POLL_LIBS) $(RT_LIBS)
|
||||
EXTRALIBS = $(LDEXECFLAGS) -lwine $(POLL_LIBS) $(RT_LIBS)
|
||||
|
||||
INSTALL_LIB = $(PROGRAMS)
|
||||
|
|
Loading…
Reference in a new issue