1 ?RCS: $Id: models.U,v 3.0.1.2 1997/02/28 16:13:17 ram Exp $
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
11 ?RCS: $Log: models.U,v $
12 ?RCS: Revision 3.0.1.2 1997/02/28 16:13:17 ram
13 ?RCS: patch61: added ?F: metalint hint
15 ?RCS: Revision 3.0.1.1 1993/08/25 14:02:39 ram
16 ?RCS: patch6: added default for large
18 ?RCS: Revision 3.0 1993/08/18 12:09:17 ram
19 ?RCS: Baseline for dist 3.0 netwide release.
21 ?MAKE:models split small medium large huge: test cat Myread sysman Oldconfig \
23 ?MAKE: -pick add $@ %<
25 ?S: This variable contains the list of memory models supported by this
26 ?S: system. Possible component values are none, split, unsplit, small,
27 ?S: medium, large, and huge. The component values are space separated.
30 ?S: This variable contains a flag which will tell the C compiler and loader
31 ?S: to produce a program that will run in separate I and D space, for those
32 ?S: machines that support separation of instruction and data space. It is
33 ?S: up to the Makefile to use this.
36 ?S: This variable contains a flag which will tell the C compiler and loader
37 ?S: to produce a program running with a small memory model. It is up to
38 ?S: the Makefile to use this.
41 ?S: This variable contains a flag which will tell the C compiler and loader
42 ?S: to produce a program running with a medium memory model. If the
43 ?S: medium model is not supported, contains the flag to produce large
44 ?S: model programs. It is up to the Makefile to use this.
47 ?S: This variable contains a flag which will tell the C compiler and loader
48 ?S: to produce a program running with a large memory model. It is up to
49 ?S: the Makefile to use this.
52 ?S: This variable contains a flag which will tell the C compiler and loader
53 ?S: to produce a program running with a huge memory model. If the
54 ?S: huge model is not supported, contains the flag to produce large
55 ?S: model programs. It is up to the Makefile to use this.
57 ?T:unsplit tans modelcc
58 ?X: This really is a temporary file, but Metalint gets fooled :-(. --AD.
62 : see what memory models we can support
65 ?X: We may not use Cppsym or we get a circular dependency through cc.
66 ?X: But this should work regardless of which cc we eventually use.
76 ?X: Run cc in a subshell in case they don't have a 'cc' command.
77 ?X: Presumably they do have gcc or something.
82 ( $modelcc -o pdp11 pdp11.c ) >/dev/null 2>&1
83 if $test -f pdp11 && ./pdp11 2>/dev/null; then
86 tans=`./loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge`
89 *) if $test -d /lib/small || $test -d /usr/lib/small; then
94 if $test -d /lib/medium || $test -d /usr/lib/medium; then
97 if $test -d /lib/large || $test -d /usr/lib/large; then
100 if $test -d /lib/huge || $test -d /usr/lib/huge; then
109 Some systems have different model sizes. On most systems they are called
110 small, medium, large, and huge. On the PDP11 they are called unsplit and
111 split. If your system doesn't support different memory models, say "none".
112 If you wish to force everything to one memory model, say "none" here and
113 put the appropriate flags later when it asks you for other cc and ld flags.
114 Venix systems may wish to put "none" and let the compiler figure things out.
115 (In the following question multiple model names should be space separated.)
117 The default for most systems is "none".
120 rp="Which memory models are supported?"
135 '') if $contains '\-i' $sysman/ld.1 >/dev/null 2>&1 || \
136 $contains '\-i' $sysman/cc.1 >/dev/null 2>&1; then
143 rp="What flag indicates separate I and D space?"
151 *large*|*small*|*medium*|*huge*)
158 rp="What flag indicates large model?"
168 *huge*) case "$huge" in
172 rp="What flag indicates huge model?"
182 *medium*) case "$medium" in
186 rp="What flag indicates medium model?"
196 *small*) case "$small" in
200 rp="What flag indicates small model?"
211 echo "Unrecognized memory models--you may have to edit Makefile.SH" >&4