Commit | Line | Data |
92d0bc23 |
1 | # Hints for the Power MAX OS operating system (formerly PowerUX - hence the |
2 | # name) running on Concurrent (formerly Harris) NightHawk machines. Written |
3 | # by Tom.Horsley@ccur.com |
94b6baf5 |
4 | # |
92d0bc23 |
5 | # This hint uses dynamic linking and the new Concurrent C compiler (based |
6 | # on the Edison front end). This hint file was produced for a build of the |
7 | # 5.7.3 development release of perl running on a PowerMAX_OS 5.1SR2 system |
8 | # (but it should work on any Power MAX release using the newer "ec" (versus |
9 | # "cc") compiler, and hopefully will also work for the upcoming 5.8 |
10 | # development release of perl). |
94b6baf5 |
11 | |
92d0bc23 |
12 | # First find out where the root of the source tree is located. |
13 | |
14 | SRCROOT="" |
15 | if [ -f ./INSTALL ] |
94b6baf5 |
16 | then |
92d0bc23 |
17 | SRCROOT="." |
18 | else |
19 | if [ -f ../INSTALL ] |
20 | then |
21 | SRCROOT=".." |
22 | fi |
23 | fi |
24 | if [ -z "$SRCROOT" ] |
25 | then |
26 | echo "powerux hint file cannot locate root perl source!" 1>&2 |
27 | exit 2 |
94b6baf5 |
28 | fi |
29 | |
30 | # We DO NOT want -lmalloc or -lPW, we DO need -lgen to follow -lnsl, so |
2755218d |
31 | # fixup libswanted to reflect that desire (also need -lresolv if you want |
32 | # DNS name lookup to work, which seems desirable :-). |
94b6baf5 |
33 | # |
2755218d |
34 | libswanted=`echo ' '$libswanted' ' | sed -e 's/ malloc / /' -e 's/ PW / /' -e 's/ nsl / nsl gen resolv /'` |
94b6baf5 |
35 | |
36 | # We DO NOT want /usr/ucblib in glibpth |
37 | # |
38 | glibpth=`echo ' '$glibpth' ' | sed -e 's@ /usr/ucblib @ @'` |
39 | |
40 | # Yes, csh exists, but doesn't work worth beans, if perl tries to use it, |
41 | # the glob test fails, so just pretend it isn't there... |
42 | # |
43 | d_csh='undef' |
44 | |
92d0bc23 |
45 | # Need to use Concurrent ec for most of these options to be meaningful (if you |
94b6baf5 |
46 | # want to get this to work with gcc, you're on your own :-). Passing |
47 | # -Bexport to the linker when linking perl is important because it leaves |
48 | # the interpreter internal symbols visible to the shared libs that will be |
92d0bc23 |
49 | # loaded on demand (and will try to reference those symbols). The -usys_nerr |
50 | # drags in some stuff from libc that perl proper doesn't reference but |
51 | # some dynamically linked extension will need to be in the static part |
52 | # of perl (there are probably more of these that might be useful, but |
53 | # for the extensions I build, this turned out to be enough). The -uldexp |
54 | # makes sure the custom ldexp.o I add to archobjs actually gets pulled |
be0a2b40 |
55 | # into perl from libperl.a. The -unanosleep makes Timer::HiRes happy. |
94b6baf5 |
56 | # |
92d0bc23 |
57 | cc='/usr/ccs/bin/ec' |
94b6baf5 |
58 | cccdlflags='-Zpic' |
be0a2b40 |
59 | ccdlflags='-Zlink=dynamic -Wl,-usys_nerr -Wl,-uldexp -Wl,-unanosleep -Wl,-Bexport' |
5d94fbed |
60 | lddlflags='-Zlink=so' |
94b6baf5 |
61 | |
92d0bc23 |
62 | # Sigh... Various versions of Power MAX went out with a broken ldexp runtime |
63 | # routine in libc (it is fixed for sure in the upcoming SR4 release, but |
64 | # that hasn't made it out the door yet). Since libc is linked dynamically, |
65 | # and the perl you build might try to run on one of the broken systems, we |
66 | # need to statically link a corrected copy of ldexp.o into perl. What the |
67 | # following code does is determine if the ldexp.o on the current system |
68 | # works right. If it does, it simply extracts the ldexp.o from the system C |
69 | # library and uses that .o file. If the system .o is broken, the btoa |
70 | # encoded copy of a correct ldexp.o file included in this hint file is used |
71 | # (what a pain...) |
72 | # |
73 | if [ ! -f $SRCROOT/ldexp.o ] |
74 | then |
75 | echo Finding a correct copy of ldexp.o to link with... 1>&2 |
76 | cat > $SRCROOT/UU/ldexptest.c <<'EOF' |
77 | #include <stdio.h> |
78 | #include <math.h> |
79 | #include <string.h> |
80 | int |
81 | main(int argc, char ** argv) { |
82 | double result = pow(2.0, 38.0); |
83 | char buf[100]; |
84 | sprintf(buf, "%g", result); |
85 | if (strncmp(buf, "inf", 3) == 0) { |
86 | exit(2); |
87 | } |
88 | return 0; |
89 | } |
90 | EOF |
91 | GOODLDEXP="no" |
92 | $cc -v -Zlink=static -o $SRCROOT/UU/ldexptest $SRCROOT/UU/ldexptest.c -lm > $SRCROOT/UU/ldexptest.lo 2>&1 |
93 | if [ $? -eq 0 ] |
94 | then |
95 | $SRCROOT/UU/ldexptest |
96 | if [ $? -eq 0 ] |
97 | then |
98 | LDEXPLIB=`fgrep libc.a $SRCROOT/UU/ldexptest.lo | tail -1 | sed -e 's@^[^/]*@@'` |
99 | if [ -s "$LDEXPLIB" ] |
100 | then |
101 | if [ -f "$LDEXPLIB" ] |
102 | then |
103 | GOODLDEXP="yes" |
104 | fi |
105 | fi |
106 | fi |
107 | fi |
108 | if [ "$GOODLDEXP" = "yes" ] |
109 | then |
110 | echo Congratulations! The ldexp.o on this system looks good! 1>&2 |
111 | echo Using ldexp.o from $LDEXPLIB 1>&2 |
112 | ( cd $SRCROOT ; ar x $LDEXPLIB ldexp.o ) |
113 | else |
114 | echo Sorry, the ldexp.o on this system is busted. 1>&2 |
115 | echo Using the ldexp.o from the powerux hint file 1>&2 |
116 | atob > $SRCROOT/ldexp.o << 'EOF' |
117 | xbtoa Begin |
118 | Imm%#!<N9%zz!!*'-!!!!"zz!!!8Jz!&OZU!!!!I!"/c-!%r>7Ecb`!!%rA)G]Wp<Ec5JsFC>/%FC\ |
119 | s(@fS,lAR]dp?YjFoAH3u00JG4;0JEJZF*VVE@:B4QA7^")/n4k]/hUsNAU&0$@rH4'?Zg7#FC/KgB |
120 | 5)5`!%om?A7^")?Yj7aG]7#$DI``"/o5'0G]7#+A7^")?N:'+5\stBG]7#+Bl7KhF*(i2F9"RBA7^" |
121 | )?YjFoARB"dA,nl2A7^")?YjFoARAnXB5)5`5\stBG]7#/Ec5c4B6@cmASu#Y5\stBG]7#/Ec5c4B6 |
122 | @cm@V'1dD?'ZQA7^")!+0)TBQ@HkEcQ&9!+p7_G]3XiCh[?cG%G]8Bl@kh?XIJhB4YFn@;GorEb0&q |
123 | /p(ZLF9!q6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!!!)z!!!!8!!!!"!!!!#z!!!.X!!!! |
148 | Ezz!!!!%z!!!!?!!!!"zz!!!/'!!!"Dzz!!!!%z!!!!KJ,fQLzz!!!0J!!!!Ezz!!!!%z!!!!T!!!! |
149 | #zz!!!0n!!!$b!!!!"!!!!0!!!!%!!!!1!!!$1!!!!%zz!!!4Z!!!$B!!!!(!!!!#!!!!%!!!!-!!! |
150 | $<!!!!%zz!!!8&!!!!9!!!!(!!!!%!!!!%!!!!-!!!$H!!!!%zz!!!8>!!!!-!!!!(!!!!&!!!!%!! |
151 | !!- |
152 | xbtoa End N 2436 984 E ad S 1bf43 R a7867666 |
153 | EOF |
154 | fi |
155 | ( cd $SRCROOT/UU ; rm -f ldexptest* ) |
156 | fi |
157 | if [ -f $SRCROOT/ldexp.o ] |
158 | then |
159 | archobjs='ldexp.o' |
160 | fi |
161 | |
94b6baf5 |
162 | # Configure sometime finds what it believes to be ndbm header files on the |
163 | # system and imagines that we have the NDBM library, but we really don't. |
164 | # There is something there that once resembled ndbm, but it is purely |
165 | # for internal use in some tool and has been hacked beyond recognition |
166 | # (or even function :-) |
167 | # |
168 | i_ndbm='undef' |
169 | |
92d0bc23 |
170 | # I have no clue what perl thinks it wants <sys/mode.h> for, but if you |
171 | # include it in a program in PowerMAX without first including <sys/vnode.h> |
172 | # the code don't compile (apparently some other operating system has |
173 | # something completely different in its sys/mode.h) |
ecf07db8 |
174 | # |
175 | i_sysmode='undef' |
176 | |
92d0bc23 |
177 | # There was a bug in memcmp (which was fixed a while ago) which sometimes |
178 | # fails to provide the correct compare status (it is data dependant). I |
179 | # don't wnat to figure out if you are building with the correct version or |
180 | # not, so just pretend there is no memcmp (since perl has its own handy |
181 | # substitute). |
2755218d |
182 | # |
183 | d_memcmp='undef' |
184 | |
185 | # Due to problems with dynamic linking (which I also hope will be fixed soon) |
186 | # you can't build a libperl.so, the core has to be in the static part of the |
187 | # perl executable. |
188 | # |
189 | useshrplib='false' |
190 | |
34f407e2 |
191 | # PowerMAX OS has support for a few different kinds of filesystems. The |
192 | # newer "xfs" filesystem does *not* report a reasonable value in the |
193 | # 'nlinks' field of stat() info for directories (in fact, it is always 1). |
194 | # Since xfs is the only filesystem which supports partitions bigger than |
195 | # 2gig and you can't hardly buy a disk that small anymore, xfs is coming in |
196 | # to greater and greater use, so we pretty much have no choice but to |
197 | # abandon all hope that number of links will mean anything. |
198 | # |
199 | dont_use_nlink=define |
200 | |
ecf07db8 |
201 | # Configure comes up with the wrong type for these for some reason. The |
202 | # pointers shouldn't have const in them. (And it looks like I have to |
203 | # provide netdb_hlen_type as well becuase when I predefine the others it |
204 | # comes up empty :-). |
205 | # |
206 | netdb_host_type='char *' |
207 | netdb_name_type='char *' |
208 | netdb_hlen_type='int' |
209 | |
94b6baf5 |
210 | # Misc other flags that might be able to change, but I know these work right. |
211 | # |
212 | d_suidsafe='define' |
213 | d_isascii='define' |
214 | d_mymalloc='undef' |
215 | usemymalloc='n' |
216 | ssizetype='ssize_t' |
217 | usevfork='false' |
92d0bc23 |
218 | |