* configure.ac (extra_ldflags_libobjc): Define appropriately for
Cygwin and MinGW hosts.
* Makefile.am (libobjc_s.a): Remove dead pre-libtool target.
(libobjc.dll): Likewise.
* configure: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157662
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-03-23 Dave Korn <dave.korn.cygwin@gmail.com>
+
+ PR libobjc/30445
+ * configure.ac (extra_ldflags_libobjc): Define appropriately for
+ Cygwin and MinGW hosts.
+ * Makefile.am (libobjc_s.a): Remove dead pre-libtool target.
+ (libobjc.dll): Likewise.
+ * configure: Regenerate.
+
2009-12-05 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
-version-info $(LIBOBJC_GC_VERSION) $(extra_ldflags_libobjc) \
$(LTLDFLAGS)
-#
-# FIXME -- The following part does not fit in the libtool context.
-# Libtool is supposed to [going to] be able to create a win 32 DLL
-# without extra code but since I don't have a win machine to test
-# if it already works, I leave the old code here.
-#
-libobjc_s.a: libobjc.la
- mv libobjc.a libobjc_s.a
-
-# Create a relocatable DLL
-libobjc.dll: libobjc_s.a libobjc_entry.o
- $(CC) -mdll -Wl,--base-file -Wl,libobjc.base \
- -o libobjc.dll libobjc_s.a libobjc_entry.o -lkernel32
- $(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/libobjc.def \
- --base-file libobjc.base --output-exp libobjc.exp
- $(GCC_FOR_TARGET) -mdll -Wl,--base-file libobjc.base libobjc.exp \
- -o libobjc.dll libobjc_s.a libobjc_entry.o -lkernel32
- $(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/libobjc.def \
- --base-file libobjc.base --output-exp libobjc.exp
- $(GCC_FOR_TARGET) libobjc.exp -mdll \
- -o libobjc.dll libobjc_s.a libobjc_entry.o -lkernel32
- $(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/libobjc.def \
- --output-lib libobjc.a
-#
-#
-#
-#
-#
-
info:
dvi:
pdf:
# Darwin needs -single_module when linking libobjc
extra_ldflags_libobjc=-Wl,-single_module
;;
+ *-cygwin*|*-mingw*)
+ # Tell libtool to build DLLs on Windows
+ extra_ldflags_libobjc='-no-undefined -bindir $(bindir)'
+ ;;
esac
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10565 "configure"
+#line 10569 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10671 "configure"
+#line 10675 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
enableval=$enable_sjlj_exceptions; :
else
cat > conftest.$ac_ext << EOF
-#line 11245 "configure"
+#line 11249 "configure"
@interface Frob
@end
@implementation Frob
# Darwin needs -single_module when linking libobjc
extra_ldflags_libobjc=-Wl,-single_module
;;
+ *-cygwin*|*-mingw*)
+ # Tell libtool to build DLLs on Windows
+ extra_ldflags_libobjc='-no-undefined -bindir $(bindir)'
+ ;;
esac
AC_SUBST(extra_ldflags_libobjc)