Bugzilla Bug 337887: use the -mnop-fun-dllimport flag so that we can use

a pointer to a function declared with the dllimport attribute as a constant
address.  We need to use such function pointers to initialize a const
structure in nss/lib/ssl/sslsock.c.  The patch is contributed by Chris
Seawood <cls@seawood.org>.  r=wtc.


git-svn-id: svn://10.0.0.236/trunk@197863 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
wtchang%redhat.com 2006-05-17 16:37:59 +00:00
parent f0b161c7c6
commit e0522cdabf

View File

@ -89,7 +89,10 @@ endif
DLL_SUFFIX = dll
ifdef NS_USE_GCC
OS_CFLAGS += -mno-cygwin -mms-bitfields
# The -mnop-fun-dllimport flag allows us to avoid a drawback of
# the dllimport attribute that a pointer to a function marked as
# dllimport cannot be used as as a constant address.
OS_CFLAGS += -mno-cygwin -mms-bitfields -mnop-fun-dllimport
_GEN_IMPORT_LIB=-Wl,--out-implib,$(IMPORT_LIBRARY)
DLLFLAGS += -mno-cygwin -o $@ -shared -Wl,--export-all-symbols $(if $(IMPORT_LIBRARY),$(_GEN_IMPORT_LIB))
ifdef BUILD_OPT