Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit a1486ce

Browse files
committed
Bug 942043 - Straighten up zlib linkage wrt shared js and system zlib. r=gps,r=ted
1 parent e4d8733 commit a1486ce

32 files changed

Lines changed: 70 additions & 37 deletions

File tree

b2g/installer/Makefile.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ ifneq (,$(filter rtsp,$(NECKO_PROTOCOLS)))
5454
DEFINES += -DMOZ_RTSP
5555
endif
5656

57+
ifdef GKMEDIAS_SHARED_LIBRARY
58+
DEFINES += -DGKMEDIAS_SHARED_LIBRARY
59+
endif
60+
5761
ifdef MOZ_PKG_MANIFEST_P
5862
$(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) FORCE
5963
$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $< -o $@)

b2g/installer/package-manifest.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
[xpcom]
4545
@BINPATH@/dependentlibs.list
46-
#ifdef XP_WIN32
46+
#ifdef GKMEDIAS_SHARED_LIBRARY
4747
@BINPATH@/@DLL_PREFIX@gkmedias@DLL_SUFFIX@
4848
#endif
4949
#ifndef MOZ_STATIC_JS

browser/installer/Makefile.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ ifdef NECKO_WIFI
7575
DEFINES += -DNECKO_WIFI
7676
endif
7777

78+
ifdef GKMEDIAS_SHARED_LIBRARY
79+
DEFINES += -DGKMEDIAS_SHARED_LIBRARY
80+
endif
81+
7882
ifdef MOZ_PKG_MANIFEST_P
7983
MOZ_PKG_MANIFEST = package-manifest
8084

browser/installer/package-manifest.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
[xpcom]
5454
@BINPATH@/dependentlibs.list
55-
#ifdef XP_WIN32
55+
#ifdef GKMEDIAS_SHARED_LIBRARY
5656
@BINPATH@/@DLL_PREFIX@gkmedias@DLL_SUFFIX@
5757
#endif
5858
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@

config/moz.build

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ if CONFIG['HOST_OS_ARCH'] != 'WINNT':
2424
'pathsub.c',
2525
]
2626
HOST_PROGRAM = 'nsinstall_real'
27+
28+
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
29+
DEFINES['GKMEDIAS_SHARED_LIBRARY'] = True

config/rules.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ CPPSRCS += $(CPP_UNIT_TESTS)
117117
CPP_UNIT_TEST_BINS := $(CPP_UNIT_TESTS:.cpp=$(BIN_SUFFIX))
118118
SIMPLE_PROGRAMS += $(CPP_UNIT_TEST_BINS)
119119
INCLUDES += -I$(DIST)/include/testing
120-
LIBS += $(XPCOM_GLUE_LDOPTS) $(NSPR_LIBS) $(if $(JS_SHARED_LIBRARY),,$(MOZ_ZLIB_LIBS))
120+
LIBS += $(XPCOM_GLUE_LDOPTS) $(NSPR_LIBS)
121121

122122
ifndef MOZ_PROFILE_GENERATE
123123
libs:: $(CPP_UNIT_TEST_BINS) $(call mkdir_deps,$(DIST)/cppunittests)

config/system-headers

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ vpx/vpx_encoder.h
10921092
vpx/vp8cx.h
10931093
vpx/vp8dx.h
10941094
#endif
1095-
#ifdef XP_WIN
1095+
#ifdef GKMEDIAS_SHARED_LIBRARY
10961096
vpx/vpx_codec.h
10971097
vpx/vpx_decoder.h
10981098
vpx/vpx_encoder.h

configure.in

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7770,6 +7770,20 @@ AC_SUBST(JS_SHARED_LIBRARY)
77707770
AC_SUBST(LIBXUL_LIBS)
77717771
XPCOM_LIBS="$LIBXUL_LIBS"
77727772

7773+
if test "$OS_ARCH" = "WINNT"; then
7774+
GKMEDIAS_SHARED_LIBRARY=1
7775+
fi
7776+
AC_SUBST(GKMEDIAS_SHARED_LIBRARY)
7777+
7778+
if test -z "$MOZ_NATIVE_ZLIB"; then
7779+
if test -n "$JS_SHARED_LIBRARY" -o "$GKMEDIAS_SHARED_LIBRARY"; then
7780+
ZLIB_IN_MOZGLUE=1
7781+
AC_DEFINE(ZLIB_IN_MOZGLUE)
7782+
fi
7783+
fi
7784+
7785+
AC_SUBST(ZLIB_IN_MOZGLUE)
7786+
77737787
dnl ========================================================
77747788
dnl =
77757789
dnl = Standalone module options
@@ -9217,7 +9231,7 @@ fi
92179231
if test -n "$MOZ_GLUE_PROGRAM_LDFLAGS"; then
92189232
export MOZ_GLUE_PROGRAM_LDFLAGS
92199233
fi
9220-
if test "$MOZ_NATIVE_ZLIB" != 1 -a "$OS_ARCH" = "WINNT"; then
9234+
if test -n "$ZLIB_IN_MOZGLUE"; then
92219235
MOZ_ZLIB_LIBS=
92229236
fi
92239237
export MOZ_NATIVE_ZLIB
@@ -9232,6 +9246,7 @@ export STLPORT_LDFLAGS
92329246
export STLPORT_LIBS
92339247
export JS_STANDALONE=no
92349248
export MOZ_LINKER
9249+
export ZLIB_IN_MOZGLUE
92359250

92369251
if ! test -e js; then
92379252
mkdir js

gfx/angle/moz.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ UNIFIED_SOURCES += ['src/compiler/' + src for src in [
119119
]]
120120
MSVC_ENABLE_PGO = True
121121

122-
if CONFIG['OS_TARGET'] == 'WINNT':
122+
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
123123
NO_VISIBILITY_FLAGS = True
124124

125125
FINAL_LIBRARY = 'gkmedias'

gfx/graphite2/src/moz.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ UNIFIED_SOURCES += [
5757

5858
MSVC_ENABLE_PGO = True
5959

60-
if CONFIG['OS_TARGET'] == 'WINNT':
60+
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
6161
NO_VISIBILITY_FLAGS = True
6262
DEFINES['GRAPHITE2_EXPORTING'] = True
6363
else:

0 commit comments

Comments
 (0)