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