Skip to content

Commit 05954a8

Browse files
paulg1973Father Chrysostomos
authored and
Father Chrysostomos
committed
Build perl using the dynamic linking capabilities of OpenVOS Release 17.1. Remove private copies of some POSIX functions that are now implemented by OpenVOS.
1 parent f0d0a20 commit 05954a8

File tree

4 files changed

+27
-413
lines changed

4 files changed

+27
-413
lines changed

hints/vos.sh

+25-93
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,64 @@
1-
# $Id: vos.sh,v 1.0 2001-12-11 09:30:00-05 Green Exp $
2-
3-
# This is a hints file for Stratus VOS, using the POSIX environment
4-
# in VOS 14.4.0 and higher.
1+
# This is a hints file for Stratus OpenVOS, using the POSIX environment
2+
# found in VOS 17.1.0 and higher.
53
#
6-
# VOS POSIX is based on POSIX.1-1996 and contains elements of
4+
# OpenVOS POSIX is based on POSIX.1-1996 and contains elements of
75
# POSIX.1-2001. It ships with gcc as the standard compiler.
86
#
97
# Paul Green ([email protected])
108

119
# C compiler and default options.
1210
cc=gcc
13-
ccflags="-D_SVID_SOURCE -D_POSIX_C_SOURCE=200112L -D_VOS_EXTENDED_NAMES"
11+
ccflags="-D_XOPEN_SOURCE=700 -D_VOS_EXTENDED_NAMES"
12+
ccdlflags="-Wl,-rpath,$shrpdir"
13+
cccdlflags="-fPIC"
1414

1515
# Make command.
1616
make="/system/gnu_library/bin/gmake"
1717
# indented to not put it into config.sh
1818
_make="/system/gnu_library/bin/gmake"
1919

20-
# Architecture name
21-
if test `uname -m` = i786; then
22-
archname="i786"
23-
else
24-
archname="hppa1.1"
20+
# Check for the minimum acceptable release of OpenVOS (17.1.0).
21+
if test `uname -r | sed -e 's/OpenVOS Release //' -e 's/VOS Release //'` \< "17.1.0"; then
22+
cat >&4 <<EOF
23+
***
24+
*** This version of Perl 5 must be built on OpenVOS Release 17.1.0 or later.
25+
***
26+
EOF
27+
exit 1
2528
fi
2629

30+
# Always X86
31+
archname=`uname -m`
32+
2733
# Executable suffix.
2834
# No, this is not a typo. The ".pm" really is the native
2935
# executable suffix in VOS. Talk about cosmic resonance.
3036
_exe=".pm"
3137

3238
# Object library paths.
33-
loclibpth="/system/stcp/object_library"
34-
loclibpth="$loclibpth /system/stcp/object_library/common"
35-
loclibpth="$loclibpth /system/stcp/object_library/net"
36-
loclibpth="$loclibpth /system/stcp/object_library/socket"
37-
loclibpth="$loclibpth /system/posix_object_library/sysv"
3839
loclibpth="$loclibpth /system/posix_object_library"
3940
loclibpth="$loclibpth /system/c_object_library"
4041
loclibpth="$loclibpth /system/object_library"
4142
glibpth="$loclibpth"
4243

4344
# Include library paths
44-
# Pick up vos/syslog.h on Continuum Platform.
45-
if test "$archname" = "i786"; then
46-
locincpth=""
47-
else
48-
locincpth=`pwd`/vos
49-
fi
50-
locincpth="$locincpth /system/stcp/include_library"
51-
locincpth="$locincpth /system/include_library/sysv"
45+
locincpth=""
5246
usrinc="/system/include_library"
5347

5448
# Where to install perl5.
5549
prefix=/system/ported/perl5
5650

5751
# Linker is gcc.
5852
ld="gcc"
53+
lddlflags="-shared"
54+
55+
# Shared libraries!
56+
so="so"
5957

60-
# No shared libraries.
61-
so="none"
58+
# Build libperl.so
59+
useshrplib="true"
6260

63-
# Don't use nm.
61+
# Don't use nm. The VOS copy of libc.a is empty.
6462
usenm="n"
6563

6664
# Make the default be no large file support.
@@ -89,71 +87,5 @@ archobjs="vos.o"
8987
# Help gmake find vos.c
9088
test -h vos.c || ln -s vos/vos.c vos.c
9189

92-
# VOS returns a constant 1 for st_nlink when stat'ing a
93-
# directory. Therefore, we must set this variable to stop
94-
# File::Find using the link count to determine whether there are
95-
# subdirectories to be searched.
96-
dont_use_nlink=define
97-
9890
# Tell Configure where to find the hosts file.
9991
hostcat="cat /system/stcp/hosts"
100-
101-
# VOS does not have socketpair() but we supply one in vos.c
102-
d_sockpair="define"
103-
104-
# Once we have the compiler flags defined, Configure will
105-
# execute the following call-back script. See hints/README.hints
106-
# for details.
107-
cat > UU/cc.cbu <<'EOCBU'
108-
# This script UU/cc.cbu will get 'called-back' by Configure after it
109-
# has prompted the user for the C compiler to use.
110-
111-
# Compile and run the a test case to see if bug gnu_g++-220 is
112-
# present. If so, lower the optimization level when compiling
113-
# pp_pack.c. This works around a bug in unpack.
114-
115-
echo " "
116-
echo "Testing whether bug gnu_g++-220 is fixed in your compiler..."
117-
118-
# Try compiling the test case.
119-
if $cc -o t001 -O $ccflags $ldflags ../hints/t001.c; then
120-
gccbug=`$run ./t001`
121-
if [ "X$gccversion" = "X" ]; then
122-
# Done too late in Configure if hinted
123-
gccversion=`$cc -dumpversion`
124-
fi
125-
case "$gccbug" in
126-
*fails*) cat >&4 <<EOF
127-
This C compiler ($gccversion) is known to have optimizer
128-
problems when compiling pp_pack.c. The Stratus bug number
129-
for this problem is gnu_g++-220.
130-
131-
Disabling optimization for pp_pack.c.
132-
EOF
133-
case "$pp_pack_cflags" in
134-
'') pp_pack_cflags='optimize='
135-
echo "pp_pack_cflags='optimize=\"\"'" >> config.sh ;;
136-
*) echo "You specified pp_pack_cflags yourself, so we'll go with your value." >&4 ;;
137-
esac
138-
;;
139-
*) echo "Your compiler is ok." >&4
140-
;;
141-
esac
142-
else
143-
echo " "
144-
echo "*** WHOA THERE!!! ***" >&4
145-
echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
146-
case "$knowitall" in
147-
'')
148-
echo " You'd better start hunting for one and let me know about it." >&4
149-
exit 1
150-
;;
151-
esac
152-
fi
153-
154-
$rm -f t001$_o t001$_exe t001.kp
155-
EOCBU
156-
157-
158-
# VOS 14.7 has minimal support for dynamic linking. Too minimal for perl.
159-
usedl="undef"

vos/syslog.h

-75
This file was deleted.

0 commit comments

Comments
 (0)