From: Gilles Depeyrot Date: Fri, 19 Apr 2002 18:39:06 +0000 (+0000) Subject: use specific linker flags under Mac OS X when linking executables against the X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/40f7145ca55ccf1b197e70acf79bbd4aa5d85145 use specific linker flags under Mac OS X when linking executables against the wxWindows dynamic shared library (LDFLAGS_EXE) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/configure b/configure index 8cb80b0d64..b5ebf1bd03 100755 --- a/configure +++ b/configure @@ -13570,7 +13570,7 @@ echo "$ac_t""$wx_cv_prog_icc" 1>&6 *-*-darwin* ) CFLAGS="$CFLAGS -fno-common -DDYLIB_INIT" CXXFLAGS="$CXXFLAGS -fno-common -DDYLIB_INIT" - LDFLAGS="$LDFLAGS -Wl,-bind_at_load" + LDFLAGS_EXE="$LDFLAGS_EXE -Wl,-bind_at_load" SHARED_LD="$CXX -dynamiclib -init _wxWindowsDylibInit -o" PIC_FLAG="-dynamic -fPIC" SONAME_FLAGS="-compatibility_version ${WX_RELEASE} -current_version ${WX_VERSION}" @@ -20471,10 +20471,11 @@ SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:20478: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:20479: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -20752,6 +20753,7 @@ s%@PORT_FILES@%$PORT_FILES%g s%@DISTDIR@%$DISTDIR%g s%@SAMPLES_SUBDIRS@%$SAMPLES_SUBDIRS%g s%@LDFLAGS_GL@%$LDFLAGS_GL%g +s%@LDFLAGS_EXE@%$LDFLAGS_EXE%g s%@OPENGL_LIBS@%$OPENGL_LIBS%g s%@DMALLOC_LIBS@%$DMALLOC_LIBS%g s%@EXTRADEFS@%$EXTRADEFS%g diff --git a/configure.in b/configure.in index c0f0c90fe1..1903aa6f42 100644 --- a/configure.in +++ b/configure.in @@ -2433,7 +2433,7 @@ if test "$wxUSE_SHARED" = "yes"; then CXXFLAGS="$CXXFLAGS -fno-common -DDYLIB_INIT" dnl Executables must necessarily fully bind the wxWindows library at dnl program launch otherwise lazy binding breaks RTTI class info - LDFLAGS="$LDFLAGS -Wl,-bind_at_load" + LDFLAGS_EXE="$LDFLAGS_EXE -Wl,-bind_at_load" SHARED_LD="$CXX -dynamiclib -init _wxWindowsDylibInit -o" PIC_FLAG="-dynamic -fPIC" SONAME_FLAGS="-compatibility_version ${WX_RELEASE} -current_version ${WX_VERSION}" @@ -4883,6 +4883,7 @@ AC_SUBST(SAMPLES_SUBDIRS) dnl additional libraries and linker settings AC_SUBST(LDFLAGS) AC_SUBST(LDFLAGS_GL) +AC_SUBST(LDFLAGS_EXE) AC_SUBST(OPENGL_LIBS) AC_SUBST(DMALLOC_LIBS) AC_SUBST(EXTRADEFS) diff --git a/src/make.env.in b/src/make.env.in index 473217cd2f..f9a251650c 100644 --- a/src/make.env.in +++ b/src/make.env.in @@ -75,3 +75,7 @@ PICFLAGS = @PIC_FLAG@ # EXTRALIBS instead (see above) # LDFLAGS = @LDFLAGS@ +# specific linker flags for when building executables since there +# Mac OS X requires specific linker flags for executables linked +# against dynamic shared libraries +LDFLAGS_EXE = @LDFLAGS_EXE@ diff --git a/src/makeprog.env.in b/src/makeprog.env.in index 5611fbf13c..1b2d8aebd5 100644 --- a/src/makeprog.env.in +++ b/src/makeprog.env.in @@ -30,7 +30,7 @@ include $(top_builddir)/src/make.env all: $(BIN_PROGRAM) @MACOSX_BUNDLE@ install_dirs install_data $(BIN_PROGRAM): $(OBJECTS) $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(RES_PROGRAM_OBJ) @LIBWXMACRES@ - $(CXX) $(LDFLAGS) -o $(BIN_PROGRAM) $(OBJECTS) $(LDLIBS) $(LIBRARIES) $(RES_PROGRAM_OBJ) + $(CXX) $(LDFLAGS_EXE) -o $(BIN_PROGRAM) $(OBJECTS) $(LDLIBS) $(LIBRARIES) $(RES_PROGRAM_OBJ) @LIBWXMACRESCOMP@ install_dirs: diff --git a/wx-config.in b/wx-config.in index 86218ba3ab..f0380ce431 100755 --- a/wx-config.in +++ b/wx-config.in @@ -14,7 +14,8 @@ usage() { cat <