On 9/10/19, Alexandre Julliard julliard@winehq.org wrote:
Evgeny Litvinenko evgeny.v.litvinenko@gmail.com writes:
@@ -940,6 +940,60 @@ case $host_os in fi ;;
- solaris*)
- DLLFLAGS="$DLLFLAGS -fPIC"
- LDDLLFLAGS="-shared -fPIC"
- WINE_TRY_CFLAGS([-fPIC -Wl,-pie], [LDEXECFLAGS="-Wl,-pie"])
- AC_CACHE_CHECK([for linker flags to build shared library],
ac_cv_c_dll_ld_opts,
[WINE_TRY_SHLIB_FLAGS([$LDDLLFLAGS -Wl,-G,-B,symbolic],
[ac_cv_c_dll_ld_opts="-Wl,-G,-B,symbolic"],
[WINE_TRY_SHLIB_FLAGS([$LDDLLFLAGS -Wl,-shared,-Bsymbolic],
[ac_cv_c_dll_ld_opts="-Wl,-shared,-Bsymbolic"],
[ac_cv_c_dll_ld_opts=""])])])
- AC_CACHE_CHECK([for linker flags to record a shared object name],
ac_cv_c_dll_ld_soname,
[WINE_TRY_SHLIB_FLAGS([$LDDLLFLAGS -Wl,-soname,confest.so.1],
[ac_cv_c_dll_ld_soname="-Wl,-soname,libwine.so.$libwine_soversion"],
[WINE_TRY_SHLIB_FLAGS([$LDDLLFLAGS -Wl,-h,confest.so.1],
[ac_cv_c_dll_ld_soname="-Wl,-h,libwine.so.$libwine_soversion"],
[ac_cv_c_dll_ld_soname=""])])])
- echo '{ global: *; };' >conftest.map
- AC_CACHE_CHECK([for linker flags to use mapfile],
ac_cv_c_dll_ld_map,
[WINE_TRY_SHLIB_FLAGS([$LDDLLFLAGS
-Wl,--version-script=conftest.map],
[ac_cv_c_dll_ld_map="-Wl,--version-script=$(srcdir)/wine.map"],
[WINE_TRY_SHLIB_FLAGS([$LDDLLFLAGS -Wl,-M,conftest.map],
[ac_cv_c_dll_ld_map="-Wl,-M,\$(srcdir)/wine.map"],
[ac_cv_c_dll_ld_map=""])])])
- rm -f conftest.map
- AC_SUBST(LIBWINE_LDFLAGS,"$LDDLLFLAGS $ac_cv_c_dll_ld_opts
$ac_cv_c_dll_ld_soname $ac_cv_c_dll_ld_map")
- WINEPRELOADER_LDFLAGS="-static -nostartfiles -nodefaultlibs
-Wl,-Ttext=0x7c400000"
- WINE_TRY_CFLAGS([-Wl,--export-dynamic],
[WINELOADER_LDFLAGS="-Wl,--export-dynamic"])
- WINE_TRY_CFLAGS([-Wl,--rpath,$ORIGIN/../lib],
[LDRPATH_INSTALL="-Wl,--rpath,\$$ORIGIN/`$(MAKEDEP) -R ${bindir} ${libdir}`"
LDRPATH_LOCAL="-Wl,--rpath,\$$ORIGIN/$(top_builddir)/libs/wine"],
[WINE_TRY_CFLAGS([-Wl,-R,\$ORIGIN/../lib],
[LDRPATH_INSTALL="-Wl,-R,\$$ORIGIN/`$(MAKEDEP) -R ${bindir} ${libdir}`"
LDRPATH_LOCAL="-Wl,-R,\$$ORIGIN/$(top_builddir)/libs/wine"])])
- WINE_TRY_CFLAGS([-Wl,--enable-new-dtags],
[LDRPATH_INSTALL="$LDRPATH_INSTALL
-Wl,--enable-new-dtags"])
- WINE_TRY_CFLAGS([-Wl,-z,max-page-size=0x1000],
[WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS
-Wl,-z,max-page-size=0x1000"])
- AC_SUBST(LIBWINE_SHAREDLIB,"libwine.so.$libwine_version")
- AC_SUBST(LIBWINE_DEPENDS,"wine.map")
- TOP_INSTALL_LIB="$TOP_INSTALL_LIB
libs/wine/libwine.so.$libwine_version libs/wine/libwine.so.$libwine_soversion"
- TOP_INSTALL_DEV="$TOP_INSTALL_DEV libs/wine/libwine.so"
This is pretty much the same as the existing default case. Do you really need to duplicate all this? What are you trying to fix? -- Alexandre Julliard
The default case of 'case $host_os' has variables DLLFLAGS and LDDLLFLAGS with "-fno-PIC" which is incorrect for Solaris when building shared objects. I get many errors like the following when try to use original configure.ac
/usr/gcc/6/bin/gcc -o libwine.so.1.0 config.o debug.o ldt.o loader.o mmap.o port.o version.o -shared \ -Wl,-soname,libwine.so.1 ../../libs/port/libwine_port.a -lsocket -lnsl -m32 Text relocation remains referenced against symbol offset in file .rodata.str1.1 (merged string section) 0x141 config.o .text (section) 0x15e config.o .rodata.str1.1 (merged string section) 0x1ee config.o .rodata (section) 0x233 config.o
The config.log and build log attached. I agree that it may be enough to change the default case.
Thanks, Evgeny.