Regenerate META.yml
[p5sagit/p5-mst-13.2.git] / hints / qnx.sh
CommitLineData
ff68c719 1#----------------------------------------------------------------
2# QNX hints
3#
ecd6d377 4# Most of the hints in this file are for QNX4, which needed
5# more help. The QNX6 hints are located toward the bottom.
af23fe4d 6#
3ed0a8dd 7# perl-5.7.3 passes all tests under QNX4.24G
4f6a2eb2 8# Watcom 10.6 with Beta/970211.wcc.update.tar.F
9# socket3r.lib Nov21 1996.
3ed0a8dd 10# perl-5.7.3 fails 2 known tests under QNX6.1.0
ff68c719 11#
be8a15fc 12# perl-5.10.0-tobe compiles with Watcom C 10.6
13# and QNX 4.25 patch G w/TCPSDK installed
14# Some tests still fail, mostly to do with dynamic/static
15# or unsuported features in QNX.
16#
17## As with many unix ports, this one depends on a few "standard"
af23fe4d 18# unix utilities which are not necessarily standard for QNX4.
ff68c719 19#
20# /bin/sh This is used heavily by Configure and then by
af23fe4d 21# perl itself. QNX4's version is fine, but Configure
ff68c719 22# will choke on the 16-bit version, so if you are
23# running QNX 4.22, link /bin/sh to /bin32/ksh
24# ar This is the standard unix library builder.
25# We use wlib. With Watcom 10.6, when wlib is
26# linked as "ar", it behaves like ar and all is
27# fine. Under 9.5, a cover is required. One is
28# included in ../qnx
29# nm This is used (optionally) by configure to list
30# the contents of libraries. I will generate
31# a cover function on the fly in the UU directory.
32# cpp Configure and perl need a way to invoke a C
33# preprocessor. I have created a simple cover
34# for cc which does the right thing. Without this,
022735b4 35# Configure will create its own wrapper which works,
ff68c719 36# but it doesn't handle some of the command line arguments
37# that perl will throw at it.
38# make You really need GNU make to compile this. GNU make
39# ships by default with QNX 4.23, but you can get it
40# from quics for earlier versions.
41#----------------------------------------------------------------
af23fe4d 42# Outstanding Issues for QNX4:
43# There is no support for dynamically linked libraries in
44# QNX4.
3ed0a8dd 45#
46# If you wish to compile with the Socket extension, you need
47# to have the TCP/IP toolkit, and you need to make sure that
48# -lsocket locates the correct copy of socket3r.lib. Beware
49# that the Watcom compiler ships with a stub version of
50# socket3r.lib which has very little functionality. Also
51# beware the order in which wlink searches directories for
52# libraries. You may have /usr/lib/socket3r.lib pointing to
53# the correct library, but wlink may pick up
54# /usr/watcom/10.6/usr/lib/socket3r.lib instead. Make sure
55# they both point to the correct library, that is,
56# /usr/tcptk/current/usr/lib/socket3r.lib.
af23fe4d 57#
58# ext/Cwd/Cwd.t will complain if `pwd` and cwd don't give
59# the same results. cwd calls `fullpath -t`, so if you
60# cd `fullpath -t` before running the test, it will
61# pass.
62#
63# lib/File/Find/taint.t will complain if '.' is in your
64# PATH. The PATH test is triggered because cwd calls
65# `fullpath -t`.
66#
a181ddb7 67# ext/IO/lib/IO/t/io_sock.t: Subtest 14 is skipped due to
68# the fact that the functionality to read back the non-blocking
69# status of a socket is not implemented in QNX's TCP/IP. This
70# has been reported to QNX and it may work with later versions
71# of TCP/IP.
af23fe4d 72#
73# Older issues:
74# lib/posix.t test failed on test 17 because acos(1) != 0.
4f6a2eb2 75# Resolved in 970211 Beta
ff68c719 76# lib/io_udp.t test hangs because of a bug in getsockname().
77# Fixed in latest BETA socket3r.lib
ff68c719 78#----------------------------------------------------------------
ecd6d377 79# Outstanding Issues for QNX6:
3ed0a8dd 80# The following tests are still failing as of 5.7.3:
ecd6d377 81#
82# op/sprintf.........................FAILED at test 91
3ed0a8dd 83# lib/Benchmark......................FAILED at test 26
84#
85# This is due to a bug in the C library's printf routine.
86# printf("'%e'", 0. ) produces '0.000000e+0', but ANSI requires
87# '0.000000e+00'. QNX has acknowledged the bug and it should be
88# fixed in 6.2.0.
ecd6d377 89#
90#----------------------------------------------------------------
ff68c719 91# These hints were submitted by:
92# Norton T. Allen
93# Harvard University Atmospheric Research Project
94# allen@huarp.harvard.edu
95#
96# If you have suggestions or changes, please let me know.
97#----------------------------------------------------------------
98
4f6a2eb2 99echo ""
100echo "Some tests may fail. Please read the hints/qnx.sh file."
101echo ""
102
ff68c719 103#----------------------------------------------------------------
af23fe4d 104# At present, all QNX4 systems are equivalent architectures,
7fbf1995 105# so it is reasonable to call archname=x86-qnx rather than
106# making an unnecessary distinction between AT-qnx and PCI-qnx,
af23fe4d 107# for example. I will use uname's architecture for Neutrino.
108#----------------------------------------------------------------
109set X `uname -a`
110shift
111[ "$1" != "QNX" ] && echo "uname doesn't look like QNX!"
112case $4 in
113 42[2-9]) archname='x86-qnx';;
114 *) osname='nto'
115 osvers=$3
116 archname="$5-nto";;
117esac
7fbf1995 118
af23fe4d 119if [ "$osname" = "qnx" ]; then
120 #----------------------------------------------------------------
121 # QNX doesn't come with a csh and the ports of tcsh I've used
122 # don't work reliably:
123 #----------------------------------------------------------------
124 csh=''
125 d_csh='undef'
126 full_csh=''
ff68c719 127
af23fe4d 128 #----------------------------------------------------------------
129 # setuid scripts are secure under QNX.
130 # (Basically, the same race conditions apply, but assuming
131 # the scripts are located in a secure directory, the methods
132 # for exploiting the race condition are defeated because
133 # the loader expands the script name fully before executing
134 # the interpreter.)
135 #----------------------------------------------------------------
136 d_suidsafe='define'
4f6a2eb2 137
af23fe4d 138 #----------------------------------------------------------------
139 # difftime is implemented as a preprocessor macro, so it doesn't show
140 # up in the libraries:
141 #----------------------------------------------------------------
142 d_difftime='define'
ff68c719 143
af23fe4d 144 #----------------------------------------------------------------
145 # strtod is in the math library, but we can't tell Configure
146 # about the math library or it will confuse the linker
147 #----------------------------------------------------------------
148 d_strtod='define'
ff68c719 149
af23fe4d 150 lib_ext='3r.lib'
151 libc='/usr/lib/clib3r.lib'
ff68c719 152
af23fe4d 153 #----------------------------------------------------------------
154 # ccflags:
155 # I like to turn the warnings up high, but a few common
156 # constructs make a lot of noise, so I turn those warnings off.
157 # A few still remain...
158 #
159 # unix.h is required as a general rule for unixy applications.
160 #----------------------------------------------------------------
161 ccflags='-mf -w4 -Wc,-wcd=202 -Wc,-wcd=203 -Wc,-wcd=302 -Wc,-fi=unix.h'
ff68c719 162
af23fe4d 163 #----------------------------------------------------------------
164 # ldflags:
165 # If you want debugging information, you must specify -g on the
166 # link as well as the compile. If optimize != -g, you should
167 # remove this.
168 #----------------------------------------------------------------
169 ldflags="-g -N1M"
ff68c719 170
af23fe4d 171 so='none'
172 selecttype='fd_set *'
ff68c719 173
af23fe4d 174 #----------------------------------------------------------------
175 # Add -lunix to list of libs. This is needed mainly so the nm
176 # search will find funcs in the unix lib. Including unix.h should
177 # automatically include the library without -l.
178 #----------------------------------------------------------------
179 libswanted="$libswanted unix"
ff68c719 180
af23fe4d 181 if [ -z "`which ar 2>/dev/null`" ]; then
182 cat <<-'EOF' >&4
183 I don't see an 'ar', so I'm guessing you are running
184 Watcom 9.5 or earlier. You may want to install the ar
185 cover found in the qnx subdirectory of this distribution.
186 It might reasonably be placed in /usr/local/bin.
ff68c719 187
188 EOF
af23fe4d 189 fi
190 #----------------------------------------------------------------
191 # Here is a nm script which fixes up wlib's output to look
192 # something like nm's, at least enough so that Configure can
193 # use it.
194 #----------------------------------------------------------------
195 if [ -z "`which nm 2>/dev/null`" ]; then
196 cat <<-EOF
197 Creating a quick-and-dirty nm cover for Configure to use:
ff68c719 198
199 EOF
af23fe4d 200 cat >./UU/nm <<-'EOF'
201 #! /bin/sh
202 #__USAGE
203 #%C <lib> [<lib> ...]
204 # Designed to mimic Unix's nm utility to list
205 # defined symbols in a library
206 unset WLIB
207 for i in $*; do wlib $i; done |
208 awk '
209 /^ / {
210 for (i = 1; i <= NF; i++) {
211 sub("_$", "", $i)
212 print "000000 T " $i
213 }
214 }'
ff68c719 215 EOF
af23fe4d 216 chmod +x ./UU/nm
217 fi
ff68c719 218
af23fe4d 219 cppstdin=`which cpp 2>/dev/null`
220 if [ -n "$cppstdin" ]; then
221 cat <<-EOF >&4
222 I found a cpp at $cppstdin and will assume it is a good
223 thing to use. If this proves to be false, there is a
224 thin cover for cpp in the qnx subdirectory of this
225 distribution which you could move into your path.
ff68c719 226 EOF
af23fe4d 227 cpprun="$cppstdin"
228 else
229 cat <<-EOF >&4
ff68c719 230
af23fe4d 231 There is a cpp cover in the qnx subdirectory of this
232 distribution which works a little better than the
233 Configure default. You may wish to copy it to
234 /usr/local/bin or some other suitable location.
ff68c719 235 EOF
af23fe4d 236 fi
be8a15fc 237
238 # includes a matherr() to silence noise from watcom libc
239 archobjs="qnx.o"
240 test -f qnx.c || cp qnx/qnx.c .
241
ecd6d377 242else
243 # $^O eq nto
244
245 ccflags='-DDLOPEN_WONT_DO_RELATIVE_PATHS'
246
247 # Options required to get dynamic linking to work
248 lddlflags='-shared'
249 ccdlflags='-Wl,-E'
250
251 # Somewhere in the build, something tries to throw a gcc
252 # option to $cc if it knows it invokes gcc. Our cc doesn't
253 # recognize that option, so we're better off setting cc=gcc.
254 cc='gcc'
255
27e6e014 256 # gcc uses $QNX_TARGET/usr/include as the include directory.
257 usrinc="$QNX_TARGET/usr/include"
258
ecd6d377 259 # If we use perl's malloc, it dies with an invalid sbrk.
260 # This is probably worth tracking down someday.
261 usemymalloc='false'
af23fe4d 262fi