Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | # |
michael@0 | 2 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 5 | |
michael@0 | 6 | include $(CORE_DEPTH)/coreconf/UNIX.mk |
michael@0 | 7 | |
michael@0 | 8 | # |
michael@0 | 9 | # The default implementation strategy for Irix is classic nspr. |
michael@0 | 10 | # |
michael@0 | 11 | ifeq ($(USE_PTHREADS),1) |
michael@0 | 12 | ifeq ($(USE_N32),1) |
michael@0 | 13 | IMPL_STRATEGY = _n32_PTH |
michael@0 | 14 | else |
michael@0 | 15 | IMPL_STRATEGY = _PTH |
michael@0 | 16 | endif |
michael@0 | 17 | endif |
michael@0 | 18 | |
michael@0 | 19 | DEFAULT_COMPILER = cc |
michael@0 | 20 | |
michael@0 | 21 | ifdef NS_USE_GCC |
michael@0 | 22 | CC = gcc |
michael@0 | 23 | AS = $(CC) -x assembler-with-cpp |
michael@0 | 24 | ODD_CFLAGS = -Wall -Wno-format -Wno-switch |
michael@0 | 25 | ifdef BUILD_OPT |
michael@0 | 26 | OPTIMIZER = -O6 |
michael@0 | 27 | endif |
michael@0 | 28 | else |
michael@0 | 29 | CC = cc |
michael@0 | 30 | CCC = CC |
michael@0 | 31 | ODD_CFLAGS = -fullwarn -xansi -woff 1209 |
michael@0 | 32 | ifdef BUILD_OPT |
michael@0 | 33 | ifeq ($(USE_N32),1) |
michael@0 | 34 | OPTIMIZER = -O -OPT:Olimit=4000 |
michael@0 | 35 | else |
michael@0 | 36 | OPTIMIZER = -O -Olimit 4000 |
michael@0 | 37 | endif |
michael@0 | 38 | endif |
michael@0 | 39 | |
michael@0 | 40 | # For 6.x machines, include this flag |
michael@0 | 41 | ifeq (6., $(findstring 6., $(OS_RELEASE))) |
michael@0 | 42 | ifeq ($(USE_N32),1) |
michael@0 | 43 | ODD_CFLAGS += -n32 -mips3 -exceptions |
michael@0 | 44 | else |
michael@0 | 45 | ODD_CFLAGS += -32 -multigot |
michael@0 | 46 | endif |
michael@0 | 47 | else |
michael@0 | 48 | ODD_CFLAGS += -xgot |
michael@0 | 49 | endif |
michael@0 | 50 | ifeq ($(USE_N32),1) |
michael@0 | 51 | OS_CFLAGS += -dollar |
michael@0 | 52 | endif |
michael@0 | 53 | endif |
michael@0 | 54 | |
michael@0 | 55 | ODD_CFLAGS += -DSVR4 -DIRIX |
michael@0 | 56 | |
michael@0 | 57 | CPU_ARCH = mips |
michael@0 | 58 | |
michael@0 | 59 | RANLIB = /bin/true |
michael@0 | 60 | # For purify |
michael@0 | 61 | # NOTE: should always define _SGI_MP_SOURCE |
michael@0 | 62 | NOMD_OS_CFLAGS += $(ODD_CFLAGS) -D_SGI_MP_SOURCE |
michael@0 | 63 | |
michael@0 | 64 | OS_CFLAGS += $(NOMD_OS_CFLAGS) |
michael@0 | 65 | ifdef USE_MDUPDATE |
michael@0 | 66 | OS_CFLAGS += -MDupdate $(DEPENDENCIES) |
michael@0 | 67 | endif |
michael@0 | 68 | |
michael@0 | 69 | ifeq ($(USE_N32),1) |
michael@0 | 70 | SHLIB_LD_OPTS += -n32 -mips3 |
michael@0 | 71 | endif |
michael@0 | 72 | |
michael@0 | 73 | MKSHLIB += $(LD) $(SHLIB_LD_OPTS) -shared -soname $(@:$(OBJDIR)/%.so=%.so) |
michael@0 | 74 | ifdef MAPFILE |
michael@0 | 75 | # Add LD options to restrict exported symbols to those in the map file |
michael@0 | 76 | endif |
michael@0 | 77 | # Change PROCESS to put the mapfile in the correct format for this platform |
michael@0 | 78 | PROCESS_MAP_FILE = cp $< $@ |
michael@0 | 79 | |
michael@0 | 80 | DSO_LDOPTS = -elf -shared -all |
michael@0 | 81 | |
michael@0 | 82 | ifdef DSO_BACKEND |
michael@0 | 83 | DSO_LDOPTS += -soname $(DSO_NAME) |
michael@0 | 84 | endif |
michael@0 | 85 | |
michael@0 | 86 | # |
michael@0 | 87 | # Revision notes: |
michael@0 | 88 | # |
michael@0 | 89 | # In the IRIX compilers prior to version 7.2, -n32 implied -mips3. |
michael@0 | 90 | # Beginning in the 7.2 compilers, -n32 implies -mips4 when the compiler |
michael@0 | 91 | # is running on a system with a mips4 CPU (e.g. R8K, R10K). |
michael@0 | 92 | # We want our code to explicitly be mips3 code, so we now explicitly |
michael@0 | 93 | # set -mips3 whenever we set -n32. |
michael@0 | 94 | # |