summaryrefslogtreecommitdiff
path: root/include/makeinclude/platform_chorus.GNU
blob: b9f905e8f85a461adfb4ef6557d7a06c93e76f0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# $Id$

# Chorus 3.1b with GNU g++ 2.7.2

CHORUS = 1
CROSS-COMPILE = 1

debug = 1
exceptions = 0
optimize = 1
shared_libs =
static_libs = 1

#
# Directory where the Chorus Development System is installed
#
ifndef CLX_CDSPATH
        CLX_CDSPATH = /vob/k_bbansw/chorus_r321_bin/CDS
endif #CLX_CDSPATH
ifndef CLX_CDSVERSION
        CLX_CDSVERSION = 4.3
endif #CLX_CDSVERSION
ifndef CLX_CDSHOST
        CLX_CDSHOST = solaris
endif #CLX_CDSHOST
ifndef CLASSIXDIR
        CLASSIXDIR=$(MERGEDIR)
endif #CLASSIXDIR
ifndef CPU
        CPU=powerpc
endif

XROOT = $(CLX_CDSPATH)/$(CPU)/$(CLX_CDSHOST)/$(CLX_CDSVERSION)
XDIR = $(XROOT)/$(CPU)-elf
CC = $(XDIR)/bin/gcc -B$(XROOT)/lib/gcc-lib/

#
# Tool PATH
#
TOOLDIR         = $(XDIR)/bin/
INC_DIR         = $(CLASSIXDIR)/include
BIN_DIR         =
LIB_DIR         = $(CLASSIXDIR)/lib
#CC             = gcc
#CXX            = g++
CXX             = $(CC)
CFLAGS          += -w
CCFLAGS         += $(CFLAGS) -fno-implicit-templates    \
                   -fno-strict-prototypes               \
                   -Usun                                \
                   -fno-builtin                         \
                   -fconserve-space                     \
                   -fcheck-new                          \
                   -nostdinc                            \
                   -fno-rtti                            \
                   -fwritable-strings                   \
                   -fsigned-char                        \
                   "-msoft-float"                       \
                   -D_POSIX_THREADS                     \
                   -D_POSIX_THREAD_SAFE_FUNCTIONS	\
                   "-DNO_FPU_SUPPORT"

pipes ?= 1

ifeq ($(CPU),powerpc)
CCFLAGS         += -mstrict-align                       \
                   -mno-sdata
endif

ifeq ($(exceptions),1)
else  # ! exceptions
  CCFLAGS += -fno-exceptions
endif # ! exceptions

# Chorus doesn't have rwho
rwho = 0

#DCFLAGS         += -gstabs+
INCLDIRS        += -I$(INC_DIR)/posix                   \
                   -I$(INC_DIR)/stdc                    \
                   -I$(INC_DIR)/chorus/                 \
                   -I$(INC_DIR)/chorus/iom              \
                   -I$(INC_DIR)/CC
DLD             =
LD              = $(XDIR)/bin/ld
#LDFLAGS         += -r $(CLASSIXDIR)/lib/CC/libC.a $(CLASSIXDIR)/lib/classix/libcx.u.a
MATHLIB         = -L$(CLASSIXDIR)/lib/libm -lm

LINK.cc.override        =       $(LD) -u _main -u _premain
LINK.cc=override

CHORUSLINK=true

#       $(CLASSIXDIR)/dtool/mkctors helloCxx_u.xp.o > helloCxx_u.ct.s
#       $(CXX) -c helloCxx_u.ct.s
#       $(RM) helloCxx_u.ct.s
#       $(LD) $(LDOPTIONS) -e _start -o helloCxx_u \
#       $(CLASSIXDIR)/lib/crt/crth.u.o $(CLASSIXDIR)/lib/crt/crt0.o $(CLASSIXDIR)/lib/crt/crti.o helloCxx_u.xp.o helloCxx_u.ct.o $(CLASSIXDIR)/lib/crt/crtn.o \
#       -dn -T $(CLASSIXDIR)/src/act/slots/act_u.ld
#       $(RM) helloCxx_u.xp.o
#       $(RM) helloCxx_u.ct.o

POSTLINK= -r $(CLASSIXDIR)/lib/CC/libC.a $(CLASSIXDIR)/lib/classix/libcx.u.a; \
	mv $@ $@.xp.o;					\
        $(CLASSIXDIR)/dtool/mkctors $@.xp.o > $@.ct.s;	\
        $(CXX) -c $@.ct.s;				\
        $(RM) $@.ct.s;					\
        $(LD) $(LDOPTIONS) -e _start -o $@ $(MERGEDIR)/lib/crt/crth.u.o $(MERGEDIR)/lib/crt/crt0.o $(MERGEDIR)/lib/crt/crti.o $@.xp.o $@.ct.o $(MERGEDIR)/lib/crt/crtn.o -dn -T $(MERGEDIR)/src/act/slots/act_u.ld;	\
        $(RM) $@.xp.o;					\
        $(RM) $@.ct.o


OCFLAGS         += -O
PIC             = -fPIC

AR              = $(TOOLDIR)ar
ARFLAGS         = srv

RANLIB          = $(TOOLDIR)ranlib
PRELIB          = @true