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