Link with -no-undefined

Simon Josefsson jas at extundo.com
Mon Jun 19 14:26:48 CEST 2006


Adding -no-undefined flag to libtool has a side-effect of producing an
DLL of libgcrypt when cross-compiling to mingw32.

The Libtool documentation for the flag is somewhat confusing, but the
intention is that the flag is used when the library doesn't need any
externals symbols, which is true for libgcrypt.

2006-06-19  Simon Josefsson  <jas at extundo.com>

	* Makefile.am (libgcrypt_la_LDFLAGS): Add -no-undefined since
	libgcrypt doesn't depend on any external symbols.

Index: Makefile.am
===================================================================
--- Makefile.am	(revision 1155)
+++ Makefile.am	(working copy)
@@ -1,4 +1,4 @@
-# Copyright (C) 1998,1999,2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc.
+# Copyright (C) 1998,1999,2000,2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
 #
 # This file is part of Libgcrypt.
 #
@@ -42,7 +42,8 @@
 	ath.h ath.c
 
 libgcrypt_la_LDFLAGS = $(libgcrypt_version_script_cmd) -version-info \
-	@LIBGCRYPT_LT_CURRENT@:@LIBGCRYPT_LT_REVISION@:@LIBGCRYPT_LT_AGE@
+	@LIBGCRYPT_LT_CURRENT@:@LIBGCRYPT_LT_REVISION@:@LIBGCRYPT_LT_AGE@ \
+	-no-undefined
 libgcrypt_la_DEPENDENCIES = ../cipher/libcipher.la ../mpi/libmpi.la \
 	$(srcdir)/libgcrypt.vers
 libgcrypt_la_LIBADD = ../cipher/libcipher.la ../mpi/libmpi.la \



More information about the Gcrypt-devel mailing list