1 | # |
---|
2 | # Config file for the 7100 pa-risc simulator |
---|
3 | # |
---|
4 | # $Id$ |
---|
5 | # |
---|
6 | |
---|
7 | include $(RTEMS_ROOT)/make/custom/default.cfg |
---|
8 | |
---|
9 | RTEMS_CPU=hppa1.1 |
---|
10 | RTEMS_CPU_MODEL=hppa7200 |
---|
11 | |
---|
12 | # This is the actual bsp directory used during the build process. |
---|
13 | RTEMS_BSP_FAMILY=simhppa |
---|
14 | |
---|
15 | # This contains the compiler options necessary to select the CPU model |
---|
16 | # and (hopefully) optimize for it. |
---|
17 | # |
---|
18 | # Possibles: |
---|
19 | # -mpa-risc-1-1 -- HPPA 1.1 instead of 1.0 |
---|
20 | # -mportable-runtime |
---|
21 | # |
---|
22 | CPU_CFLAGS = -mpa-risc-1-1 -mportable-runtime |
---|
23 | |
---|
24 | # Possibles: |
---|
25 | # -Wall -- lots of warnings |
---|
26 | # -pipe -- compiler uses pipes to talk to phases (usually faster) |
---|
27 | # -ansi -- ANSI C compliance |
---|
28 | # -fasm -- ANSI, but allow inline assembler |
---|
29 | # -mgas -- we are using gas as assembler |
---|
30 | # -fno-keep-inline-functions -- do not emit any inlines as static |
---|
31 | CFLAGS_DEFAULT = $(CPU_CFLAGS) -Wall -ansi -fasm -mgas |
---|
32 | |
---|
33 | # optimize flag: typically -0, could use -O4 or -fast |
---|
34 | # -O4 is ok for RTEMS |
---|
35 | # NOTE: some level of -O may be actually required by inline assembler |
---|
36 | CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions |
---|
37 | |
---|
38 | # This target does NOT support the TCP/IP stack so ignore requests |
---|
39 | # to enable it. |
---|
40 | HAS_NETWORKING=no |
---|
41 | |
---|
42 | # This makes the target dependent options file. |
---|
43 | |
---|
44 | # NDEBUG (C library) |
---|
45 | # if defined asserts do not generate code. This is commonly used |
---|
46 | # as a command line option. |
---|
47 | # |
---|
48 | # RTEMS_TEST_NO_PAUSE (RTEMS tests) |
---|
49 | # do not pause between screens of output in the rtems tests |
---|
50 | # |
---|
51 | # RTEMS_DEBUG (RTEMS) |
---|
52 | # If defined, debug checks in RTEMS and support library code are enabled. |
---|
53 | # |
---|
54 | # SIMHPPA_FAST_IDLE (simhppa) |
---|
55 | # If defined, speed up the clock ticks while the idle task is running so |
---|
56 | # time spent in the idle task is minimized. This significantly reduces |
---|
57 | # the wall time required to execute the RTEMS test suites. |
---|
58 | # |
---|
59 | |
---|
60 | define make-target-options |
---|
61 | @echo "/* #define NDEBUG 1 */ " >>$@ |
---|
62 | @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@ |
---|
63 | @echo "/* #define RTEMS_DEBUG 1 */" >>$@ |
---|
64 | @echo "#define SIMHPPA_FAST_IDLE 1 " >>$@ |
---|
65 | endef |
---|
66 | |
---|
67 | # |
---|
68 | # GNU ld options |
---|
69 | # `-Tbss ORG' |
---|
70 | # `-Tdata ORG' |
---|
71 | # `-Ttext ORG' |
---|
72 | # Use ORG as the starting address for--respectively--the `bss', |
---|
73 | # `data', or the `text' segment of the output file. ORG must be a |
---|
74 | # single hexadecimal integer; for compatibility with other linkers, |
---|
75 | # you may omit the leading `0x' usually associated with hexadecimal |
---|
76 | # values. |
---|
77 | |
---|
78 | # 'NODE' is set to 1 or 2 for multi cpu tests (ref: mptests/mp01/node1/Makefile) |
---|
79 | # If NODE is set as an environment variable, don't trust it, zero it out. |
---|
80 | # (NODE turns out to be a very common environment variable) |
---|
81 | ifeq (,$(NODE)) |
---|
82 | NODE=0 |
---|
83 | else |
---|
84 | ifeq "$(origin NODE)" "environment" |
---|
85 | NODE=0 |
---|
86 | endif |
---|
87 | endif |
---|
88 | |
---|
89 | # XXX some/all of this should move into 'linkcmds' |
---|
90 | # single processor |
---|
91 | DATA_0_BASE=0x40001000 |
---|
92 | TEXT_0_BASE=0x00001000 |
---|
93 | |
---|
94 | # first node (mptests number them from 1) |
---|
95 | DATA_1_BASE=$(DATA_0_BASE) |
---|
96 | TEXT_1_BASE=$(TEXT_0_BASE) |
---|
97 | |
---|
98 | # second node (mptests number them from 1) |
---|
99 | DATA_2_BASE=0x48001000 |
---|
100 | TEXT_2_BASE=0x08001000 |
---|
101 | |
---|
102 | # for hpux ld |
---|
103 | #LD_LOC_OPTIONS=-D $(DATA_$(NODE)_BASE) -R $(TEXT_$(NODE)_BASE) |
---|
104 | # for gnu ld |
---|
105 | LD_LOC_OPTIONS=-Tdata $(DATA_$(NODE)_BASE) -Ttext $(TEXT_$(NODE)_BASE) |
---|
106 | GCC_LD_LOC_OPTIONS=-W,l-T -W,ldata -W,l$(DATA_$(NODE)_BASE) \ |
---|
107 | -W,l-T -W,ltext -W,l$(TEXT_$(NODE)_BASE) |
---|
108 | |
---|
109 | |
---|
110 | # The following are definitions of make-exe which will work using ld as |
---|
111 | # is currently required. It is expected that as of gcc 2.8, the end user |
---|
112 | # will be able to override parts of the compilers specs and link using gcc. |
---|
113 | |
---|
114 | ifeq ($(RTEMS_USE_GCC272),yes) |
---|
115 | define make-exe |
---|
116 | $(LDARGS) $(LD) $(LD_LOC_OPTIONS) $(XLDFLAGS) -a archive \ |
---|
117 | -o $@ -u atexit \ |
---|
118 | $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group |
---|
119 | $(NM) -g -n $@ > $(basename $@).num |
---|
120 | $(SIZE) $@ |
---|
121 | endef |
---|
122 | else |
---|
123 | define make-exe |
---|
124 | $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) $(GCC_LD_LOC_OPTIONS) \ |
---|
125 | -o $(basename $@).exe \ |
---|
126 | $(LINK_OBJS) $(LINK_LIBS) |
---|
127 | $(NM) -g -n $@ > $(basename $@).num |
---|
128 | $(SIZE) $@ |
---|
129 | endef |
---|
130 | endif |
---|
131 | |
---|
132 | define make-rel |
---|
133 | $(LDARGS) $(LD) $(LDFLAGS_INCOMPLETE) $(XLDFLAGS) -o $@ $(OBJS) |
---|
134 | endef |
---|
135 | |
---|
136 | # Miscellaneous additions go here |
---|
137 | |
---|
138 | # BSP-specific tools |
---|
139 | PRINTDUMP=$(PROJECT_TOOLS)/print_dump |
---|
140 | |
---|
141 | # CPU-specific tools |
---|
142 | GENOFFSETS=$(PROJECT_RELEASE)/bin/genoffsets |
---|