xref: /aoo41x/main/nss/nss.patch.mingw (revision c38ced1b)
1--- misc/nss-3.13.6/mozilla/nsprpub/config/autoconf.mk.in	2009-03-04 07:04:23.000000000 +0900
2+++ misc/build/nss-3.13.6/mozilla/nsprpub/config/autoconf.mk.in	2010-06-17 08:42:08.010625000 +0900
3@@ -22,6 +22,7 @@
4 RELEASE_OBJDIR_NAME = @RELEASE_OBJDIR_NAME@
5 OBJDIR_NAME	= @OBJDIR_NAME@
6 OBJDIR		= @OBJDIR@
7+LIB_PREFIX	= @LIB_PREFIX@
8 OBJ_SUFFIX	= @OBJ_SUFFIX@
9 LIB_SUFFIX	= @LIB_SUFFIX@
10 DLL_SUFFIX	= @DLL_SUFFIX@
11--- misc/nss-3.13.6/mozilla/nsprpub/config/rules.mk	2009-12-10 06:24:37.000000000 +0900
12+++ misc/build/nss-3.13.6/mozilla/nsprpub/config/rules.mk	2010-06-17 08:42:08.057500000 +0900
13@@ -113,9 +113,9 @@
14 # other platforms do not.
15 #
16 ifeq (,$(filter-out WIN95 WINCE WINMO OS2,$(OS_TARGET)))
17-LIBRARY		= $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
18+LIBRARY		= $(OBJDIR)/$(LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
19 SHARED_LIBRARY	= $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
20-IMPORT_LIBRARY	= $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
21+IMPORT_LIBRARY	= $(OBJDIR)/$(LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
22 SHARED_LIB_PDB	= $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).pdb
23 else
24 LIBRARY		= $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
25--- misc/nss-3.13.6/mozilla/nsprpub/configure	2010-02-09 03:41:35.000000000 +0900
26+++ misc/build/nss-3.13.6/mozilla/nsprpub/configure	2010-06-17 08:42:10.000000000 +0900
27@@ -2770,6 +2770,7 @@
28 LIB_SUFFIX=a
29 DLL_SUFFIX=so
30 ASM_SUFFIX=s
31+LIB_PREFIX=lib
32 MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
33 PR_MD_ASFILES=
34 PR_MD_CSRCS=
35@@ -4000,6 +4001,7 @@
36         OBJ_SUFFIX=obj
37         LIB_SUFFIX=lib
38         DLL_SUFFIX=dll
39+        LIB_PREFIX=
40
41         # Determine compiler version
42         CC_VERSION=`"${CC}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' -e 's| .*||'`
43@@ -6262,6 +6264,7 @@
44 s%@LIB_SUFFIX@%$LIB_SUFFIX%g
45 s%@DLL_SUFFIX@%$DLL_SUFFIX%g
46 s%@ASM_SUFFIX@%$ASM_SUFFIX%g
47+s%@LIB_PREFIX@%$LIB_PREFIX%g
48 s%@MKSHLIB@%$MKSHLIB%g
49 s%@DSO_CFLAGS@%$DSO_CFLAGS%g
50 s%@DSO_LDOPTS@%$DSO_LDOPTS%g
51--- misc/nss-3.13.6/mozilla/nsprpub/pr/src/Makefile.in	2009-12-19 18:06:07.000000000 +0900
52+++ misc/build/nss-3.13.6/mozilla/nsprpub/pr/src/Makefile.in	2010-06-17 08:42:08.151250000 +0900
53@@ -195,7 +195,7 @@
54
55 ifeq ($(OS_ARCH),WINNT)
56 ifdef NS_USE_GCC
57-OS_LIBS		= -ladvapi32 -lwsock32 -lwinmm
58+OS_LIBS		+= -ladvapi32 -lwsock32 -lwinmm
59 else
60 OS_LIBS		= advapi32.lib wsock32.lib winmm.lib
61 endif
62--- misc/nss-3.13.6/mozilla/security/coreconf/WIN32.mk	2009-07-29 09:15:46.000000000 +0900
63+++ misc/build/nss-3.13.6/mozilla/security/coreconf/WIN32.mk	2010-06-17 08:42:08.198125000 +0900
64@@ -43,8 +43,8 @@
65 DEFAULT_COMPILER = cl
66
67 ifdef NS_USE_GCC
68-	CC           = gcc
69-	CCC          = g++
70+#	CC           = gcc
71+	CCC          = $(CXX)
72 	LINK         = ld
73 	AR           = ar
74 	AR          += cr $@
75--- misc/nss-3.13.6/mozilla/security/coreconf/WIN95.mk	2009-02-14 14:51:10.000000000 +0900
76+++ misc/build/nss-3.13.6/mozilla/security/coreconf/WIN95.mk	2010-06-17 08:42:08.245000000 +0900
77@@ -44,4 +44,8 @@
78 DEFINES += -DWIN95
79
80 # WINNT uses the lib prefix, Win95 and WinCE don't
81-NSPR31_LIB_PREFIX = $(NULL)
82+ifdef NS_USE_GCC
83+  NSPR31_LIB_PREFIX = lib
84+else
85+  NSPR31_LIB_PREFIX = $(NULL)
86+endif
87\ No newline at end of file
88--- misc/nss-3.13.6/mozilla/security/coreconf/rules.mk	2009-12-08 10:33:36.000000000 +0900
89+++ misc/build/nss-3.13.6/mozilla/security/coreconf/rules.mk	2010-06-17 08:42:08.291875000 +0900
90@@ -281,8 +281,12 @@
91 	fi
92 endif	# MSVC with manifest tool
93 else
94+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
95+	$(MKPROG) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) -Wl,--start-group $(EXTRA_LIBS) -Wl,--end-group $(EXTRA_SHARED_LIBS) $(OS_LIBS)
96+else
97 	$(MKPROG) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
98 endif
99+endif
100
101 get_objs:
102 	@echo $(OBJS)
103--- misc/nss-3.13.6/mozilla/security/nss/Makefile	2009-12-09 01:47:03.000000000 +0900
104+++ misc/build/nss-3.13.6/mozilla/security/nss/Makefile	2010-06-17 08:42:08.338750000 +0900
105@@ -108,7 +108,7 @@
106 NSPR_CONFIGURE_OPTS += --enable-debug-rtl
107 endif
108 ifdef NS_USE_GCC
109-NSPR_COMPILERS = CC=gcc CXX=g++
110+NSPR_COMPILERS = CC="$(CC)" CXX="$(CXX)"
111 endif
112
113 #
114--- misc/nss-3.13.6/mozilla/security/nss/cmd/crmftest/Makefile	2005-11-14 09:17:21.000000000 +0900
115+++ misc/build/nss-3.13.6/mozilla/security/nss/cmd/crmftest/Makefile	2010-06-17 08:42:08.370000000 +0900
116@@ -90,7 +90,7 @@
117 LDDIST = $(DIST)/lib
118
119 ifeq (,$(filter-out WIN%,$(OS_TARGET)))
120-EXTRA_LIBS += $(LDDIST)/sectool.lib
121+EXTRA_LIBS += $(LDDIST)/$(LIB_PREFIX)sectool.$(LIB_SUFFIX)
122 endif
123
124 include ../platrules.mk
125--- misc/nss-3.13.6/mozilla/security/nss/cmd/shlibsign/Makefile	2009-08-08 04:06:37.000000000 +0900
126+++ misc/build/nss-3.13.6/mozilla/security/nss/cmd/shlibsign/Makefile	2010-06-17 08:42:10.000000000 +0900
127@@ -115,10 +115,16 @@
128 	$(call core_abspath,$(OBJDIR)) $(OS_TARGET) \
129 	$(call core_abspath,$(NSPR_LIB_DIR)) $(call core_abspath,$<)
130 else
131+ifeq ($(OS_TARGET), WIN95)
132+	sh ./sign.sh $(shell cygpath -m -a $(DIST)) \
133+	$(shell cygpath -m -a $(OBJDIR)) $(OS_TARGET) \
134+	$(shell cygpath -m -a $(NSPR_LIB_DIR)) $(shell cygpath -m -a $<)
135+else
136 	cd $(OBJDIR) ; sh $(SRCDIR)/sign.sh $(call core_abspath,$(DIST)) \
137 	$(call core_abspath,$(OBJDIR)) $(OS_TARGET) \
138 	$(call core_abspath,$(NSPR_LIB_DIR)) $(call core_abspath,$<)
139 endif
140+endif
141
142 libs install :: $(CHECKLOC)
143
144