This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
5.004 removed deprecated %OVERLOAD support silently
[perl5.git] / hints / qnx.sh
CommitLineData
ff68c719 1#----------------------------------------------------------------
2# QNX hints
3#
4# As of perl5.003_09, perl5 will compile without errors
5# and pass almost all the tests in the test suite. The remaining
6# failures have been identified as bugs in the Watcom libraries
7# which I hope will be fixed in the near future.
8#
9# As with many unix ports, this one depends on a few "standard"
10# unix utilities which are not necessarily standard for QNX.
11#
12# /bin/sh This is used heavily by Configure and then by
13# perl itself. QNX's version is fine, but Configure
14# will choke on the 16-bit version, so if you are
15# running QNX 4.22, link /bin/sh to /bin32/ksh
16# ar This is the standard unix library builder.
17# We use wlib. With Watcom 10.6, when wlib is
18# linked as "ar", it behaves like ar and all is
19# fine. Under 9.5, a cover is required. One is
20# included in ../qnx
21# nm This is used (optionally) by configure to list
22# the contents of libraries. I will generate
23# a cover function on the fly in the UU directory.
24# cpp Configure and perl need a way to invoke a C
25# preprocessor. I have created a simple cover
26# for cc which does the right thing. Without this,
27# Configure will create it's own wrapper which works,
28# but it doesn't handle some of the command line arguments
29# that perl will throw at it.
30# make You really need GNU make to compile this. GNU make
31# ships by default with QNX 4.23, but you can get it
32# from quics for earlier versions.
33#----------------------------------------------------------------
34# Outstanding Issues:
35# lib/posix.t test fails on test 17 because acos(1) != 0.
36# Watcom promises to fix this in next release.
37# lib/io_udp.t test hangs because of a bug in getsockname().
38# Fixed in latest BETA socket3r.lib
39# If there is a softlink in your path, Findbin will fail.
40# This is a documented feature of getpwd().
41# There is currently no support for dynamically linked
42# libraries.
43#----------------------------------------------------------------
44# At present, all QNX systems are equivalent architectures,
45# so it might be reasonable to call archname=qnx rather than
46# making an unnecessary distinction between AT-qnx and PCI-qnx,
47# for example.
48#----------------------------------------------------------------
49# These hints were submitted by:
50# Norton T. Allen
51# Harvard University Atmospheric Research Project
52# allen@huarp.harvard.edu
53#
54# If you have suggestions or changes, please let me know.
55#----------------------------------------------------------------
56
57#----------------------------------------------------------------
58# QNX doesn't come with a csh and the ports of tcsh I've used
59# don't work reliably:
60#----------------------------------------------------------------
61csh=''
62d_csh='undef'
63full_csh=''
64
65#----------------------------------------------------------------
66# difftime is implemented as a preprocessor macro, so it doesn't show
67# up in the libraries:
68#----------------------------------------------------------------
69d_difftime='define'
70
71#----------------------------------------------------------------
72# strtod is in the math library, but we can't tell Configure
73# about the math library or it will confuse the linker
74#----------------------------------------------------------------
75d_strtod='define'
76
77#----------------------------------------------------------------
78# The following exist in the libraries, but there are no
79# prototypes available:
80#----------------------------------------------------------------
81d_setregid='undef'
82d_setreuid='undef'
83d_setlinebuf='undef'
84d_truncate='undef'
85d_getpgid='undef'
86
87lib_ext='3r.lib'
88libc='/usr/lib/clib3r.lib'
89
90#----------------------------------------------------------------
91# ccflags:
92# I like to turn the warnings up high, but a few common
93# constructs make a lot of noise, so I turn those warnings off.
94# A few still remain...
95#
96# HIDEMYMALLOC is necessary if using mymalloc since it is very
97# tricky (though not impossible) to totally replace the watcom
98# malloc/free set.
99#
100# unix.h is required as a general rule for unixy applications.
101#----------------------------------------------------------------
102ccflags='-DHIDEMYMALLOC -mf -w4 -Wc,-wcd=202 -Wc,-wcd=203 -Wc,-wcd=302 -Wc,-fi=unix.h'
103
104#----------------------------------------------------------------
105# ldflags:
106# If you want debugging information, you must specify -g on the
107# link as well as the compile. If optimize != -g, you should
108# remove this.
109#----------------------------------------------------------------
110ldflags="-g"
111
112so='none'
113selecttype='fd_set *'
114
115#----------------------------------------------------------------
116# Add -lunix to list of libs. This is needed mainly so the nm
117# search will find funcs in the unix lib. Including unix.h should
118# automatically include the library without -l.
119#----------------------------------------------------------------
120libswanted="$libswanted unix"
121
122if [ -z "`which ar 2>/dev/null`" ]; then
68dc0745 123 cat <<-'EOF' >&4
ff68c719 124 I don't see an 'ar', so I'm guessing you are running
125 Watcom 9.5 or earlier. You may want to install the ar
126 cover found in the qnx subdirectory of this distribution.
127 It might reasonably be placed in /usr/local/bin.
128
129 EOF
130fi
131#----------------------------------------------------------------
132# Here is a nm script which fixes up wlib's output to look
133# something like nm's, at least enough so that Configure can
134# use it.
135#----------------------------------------------------------------
136if [ -z "`which nm 2>/dev/null`" ]; then
137 cat <<-EOF
138 Creating a quick-and-dirty nm cover for Configure to use:
139
140 EOF
141 cat >../UU/nm <<-'EOF'
142 #! /bin/sh
143 #__USAGE
144 #%C <lib> [<lib> ...]
145 # Designed to mimic Unix's nm utility to list
146 # defined symbols in a library
147 for i in $*; do wlib $i; done |
148 awk '
149 /^ / {
150 for (i = 1; i <= NF; i++) {
151 sub("_$", "", $i)
152 print "000000 T " $i
153 }
154 }'
155 EOF
156 chmod +x ../UU/nm
157fi
158
159cppstdin=`which cpp 2>/dev/null`
160if [ -n "$cppstdin" ]; then
68dc0745 161 cat <<-EOF >&4
ff68c719 162 I found a cpp at $cppstdin and will assume it is a good
163 thing to use. If this proves to be false, there is a
164 thin cover for cpp in the qnx subdirectory of this
165 distribution which you could move into your path.
166 EOF
167 cpprun="$cppstdin"
168else
68dc0745 169 cat <<-EOF >&4
ff68c719 170
171 There is a cpp cover in the qnx subdirectory of this
172 distribution which works a little better than the
173 Configure default. You may wish to copy it to
174 /usr/local/bin or some other suitable location.
175 EOF
176fi