Backed out 3 changesets (bug 1898476) for causing build bustages @ MozContainerSurfac...
[gecko.git] / security / nss / coreconf / NetBSD.mk
blob05ebb18f102c87a3bc201029a117651b176cec73
2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 include $(CORE_DEPTH)/coreconf/UNIX.mk
8 CC ?= gcc
9 CXX ?= g++
10 DEFAULT_COMPILER = ${CC}
11 CCC = ${CXX}
12 RANLIB = ranlib
14 CPU_ARCH := $(shell uname -p)
15 ifeq ($(CPU_ARCH),i386)
16 OS_REL_CFLAGS = -Di386
17 CPU_ARCH = x86
18 endif
19 ifeq (,$(filter-out earm%,$(CPU_ARCH)))
20 CPU_ARCH = arm
21 endif
22 ifeq ($(CPU_ARCH),aarch64eb)
23 CPU_ARCH = aarch64
24 endif
26 DLL_SUFFIX = so
28 OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wall -Wno-switch -pipe -DNETBSD -Dunix -DHAVE_STRERROR -DHAVE_BSD_FLOCK
30 OS_LIBS = -lcompat
32 ARCH = netbsd
34 DSO_CFLAGS = -fPIC -DPIC
35 DSO_LDOPTS = -shared -Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
38 # The default implementation strategy for NetBSD is pthreads.
40 ifndef CLASSIC_NSPR
41 USE_PTHREADS = 1
42 DEFINES += -D_THREAD_SAFE -D_REENTRANT
43 OS_LIBS += -pthread
44 DSO_LDOPTS += -pthread
45 endif
47 ifdef LIBRUNPATH
48 DSO_LDOPTS += -Wl,-R$(LIBRUNPATH)
49 endif
51 MKSHLIB = $(CC) $(DSO_LDOPTS)
52 ifdef MAPFILE
53 MKSHLIB += -Wl,--version-script,$(MAPFILE)
54 endif
55 PROCESS_MAP_FILE = grep -v ';-' $< | \
56 sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@