Commit 13a93b4a authored by Alexandre Julliard's avatar Alexandre Julliard

configure: Set rpath on all executables that link to libwine.

Also add the -multiply_defined suppress option for executables on MacOS.
parent ff2bd661
......@@ -84,6 +84,7 @@ DLLDIR = $(TOPOBJDIR)/dlls
LIBPORT = $(TOPOBJDIR)/libs/port/libwine_port.a
LIBWPP = $(TOPOBJDIR)/libs/wpp/libwpp.a
LIBWINE = -L$(TOPOBJDIR)/libs/wine -lwine
LIBWINE_LDFLAGS = @LIBWINE_LDFLAGS@ $(LIBWINE)
@SET_MAKE@
......
......@@ -738,13 +738,13 @@ LDSHARED
LDDLLFLAGS
LIBEXT
IMPLIBEXT
LIBWINE_LDFLAGS
DLLTOOL
DLLWRAP
COREFOUNDATIONLIB
IOKITLIB
LDEXECFLAGS
COREAUDIO
LDEXERPATH
CROSSTEST
CROSSCC
CROSSWINDRES
......@@ -15224,6 +15224,8 @@ LIBEXT="so"
IMPLIBEXT="def"
LIBWINE_LDFLAGS=""
case $host_os in
cygwin*|mingw32*)
......@@ -15433,6 +15435,7 @@ fi
LIBEXT="dylib"
DLLFLAGS="$DLLFLAGS -fPIC"
LDDLLFLAGS="-bundle -multiply_defined suppress"
LIBWINE_LDFLAGS="-multiply_defined suppress"
LDSHARED="\$(CC) -dynamiclib -install_name @executable_path/\`\$(RELPATH) \$(bindir) \$(libdir)\`/\$(DYNAME)"
STRIP="$STRIP -u -r"
COREFOUNDATIONLIB="-framework CoreFoundation"
......@@ -16042,8 +16045,7 @@ ac_res=`eval echo '${'$as_ac_var'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_var'}'` = yes; then
LDEXERPATH="-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`"
LIBWINE_LDFLAGS="-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`"
fi
......@@ -25170,13 +25172,13 @@ LDSHARED!$LDSHARED$ac_delim
LDDLLFLAGS!$LDDLLFLAGS$ac_delim
LIBEXT!$LIBEXT$ac_delim
IMPLIBEXT!$IMPLIBEXT$ac_delim
LIBWINE_LDFLAGS!$LIBWINE_LDFLAGS$ac_delim
DLLTOOL!$DLLTOOL$ac_delim
DLLWRAP!$DLLWRAP$ac_delim
COREFOUNDATIONLIB!$COREFOUNDATIONLIB$ac_delim
IOKITLIB!$IOKITLIB$ac_delim
LDEXECFLAGS!$LDEXECFLAGS$ac_delim
COREAUDIO!$COREAUDIO$ac_delim
LDEXERPATH!$LDEXERPATH$ac_delim
CROSSTEST!$CROSSTEST$ac_delim
CROSSCC!$CROSSCC$ac_delim
CROSSWINDRES!$CROSSWINDRES$ac_delim
......
......@@ -999,6 +999,7 @@ AC_SUBST(LDSHARED,"")
AC_SUBST(LDDLLFLAGS,"")
AC_SUBST(LIBEXT,"so")
AC_SUBST(IMPLIBEXT,"def")
AC_SUBST(LIBWINE_LDFLAGS,"")
case $host_os in
cygwin*|mingw32*)
......@@ -1020,6 +1021,7 @@ case $host_os in
LIBEXT="dylib"
DLLFLAGS="$DLLFLAGS -fPIC"
LDDLLFLAGS="-bundle -multiply_defined suppress"
LIBWINE_LDFLAGS="-multiply_defined suppress"
LDSHARED="\$(CC) -dynamiclib -install_name @executable_path/\`\$(RELPATH) \$(bindir) \$(libdir)\`/\$(DYNAME)"
STRIP="$STRIP -u -r"
dnl declare needed frameworks
......@@ -1066,7 +1068,7 @@ case $host_os in
[AC_SUBST(LDEXECFLAGS,["-Wl,--export-dynamic"])])
WINE_TRY_CFLAGS([-fPIC -Wl,--rpath,\$ORIGIN/../lib],
[AC_SUBST(LDEXERPATH,["-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`"])])
[LIBWINE_LDFLAGS="-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`"])
case $host_cpu in
*i[[3456789]]86* | x86_64)
......
......@@ -28,19 +28,18 @@ all: $(WINE_BINARIES) $(MODULE) $(MANPAGES)
LIBPTHREAD = @LIBPTHREAD@
LDEXECFLAGS = @LDEXECFLAGS@
LDRPATH = @LDEXERPATH@
wine-glibc: glibc.o Makefile.in
$(CC) -o $@ glibc.o $(LDRPATH) $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS)
$(CC) -o $@ glibc.o $(LIBWINE_LDFLAGS) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS)
wine-preloader: preloader.o Makefile.in
$(CC) -o $@ -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c000000 preloader.o $(LIBPORT) $(LDFLAGS)
wine-kthread: $(KTHREAD_OBJS) Makefile.in
$(CC) -o $@ $(LDEXECFLAGS) $(LDRPATH) $(KTHREAD_OBJS) $(LIBWINE) $(LIBPORT) $(EXTRALIBS) $(LDFLAGS)
$(CC) -o $@ $(LDEXECFLAGS) $(KTHREAD_OBJS) $(LIBWINE_LDFLAGS) $(LIBPORT) $(EXTRALIBS) $(LDFLAGS)
wine-pthread: $(PTHREAD_OBJS) Makefile.in
$(CC) -o $@ $(LDEXECFLAGS) $(LDRPATH) $(PTHREAD_OBJS) $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS)
$(CC) -o $@ $(LDEXECFLAGS) $(PTHREAD_OBJS) $(LIBWINE_LDFLAGS) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS)
$(MODULE): $(MAIN_BINARY)
$(RM) $(MODULE) && $(LN_S) $(MAIN_BINARY) $(MODULE)
......
......@@ -60,10 +60,8 @@ all: $(PROGRAMS) $(MANPAGES)
@MAKE_RULES@
LDEXERPATH = @LDEXERPATH@
wineserver: $(OBJS)
$(CC) -o $@ $(LDEXERPATH) $(OBJS) $(LIBWINE) $(LIBPORT) $(LDFLAGS) $(LIBS)
$(CC) -o $@ $(OBJS) $(LIBWINE_LDFLAGS) $(LIBPORT) $(LDFLAGS) $(LIBS)
install:: $(PROGRAMS) $(MANPAGES) $(INSTALLDIRS)
$(INSTALL_PROGRAM) wineserver $(DESTDIR)$(bindir)/wineserver
......
......@@ -27,7 +27,7 @@ mcl.o: mcy.tab.h
@MAKE_RULES@
wmc$(EXEEXT): $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBWINE) $(LIBPORT) $(LEXLIB) $(LDFLAGS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBWINE_LDFLAGS) $(LIBPORT) $(LEXLIB) $(LDFLAGS)
mcy.tab.c mcy.tab.h: mcy.y
$(BISON) -d -t $(SRCDIR)/mcy.y -o mcy.tab.c
......
......@@ -29,7 +29,7 @@ all: $(PROGRAMS) $(MANPAGES)
@MAKE_RULES@
wrc$(EXEEXT): $(OBJS) $(LIBWPP)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBWPP) $(LIBWINE) $(LIBPORT) $(LEXLIB) $(LDFLAGS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBWPP) $(LIBWINE_LDFLAGS) $(LIBPORT) $(LEXLIB) $(LDFLAGS)
parser.tab.c parser.tab.h: parser.y
$(BISON) -d -t $(SRCDIR)/parser.y -o parser.tab.c
......
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