summaryrefslogtreecommitdiff
path: root/hints/linux.sh
diff options
context:
space:
mode:
authorAndy Dougherty <doughera@lafcol.lafayette.edu>1995-04-06 20:20:47 +0000
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1995-04-06 20:20:47 +0000
commit232e078e289220085e912e3d740ae77767611478 (patch)
tree6dc7bc545fe55ce0be8fd1420256058ca7f26c57 /hints/linux.sh
parent56febc5ef28a2ff414c466231d08046390ce0f59 (diff)
downloadperl-232e078e289220085e912e3d740ae77767611478.tar.gz
perl5.001 patch.1c
Configure Updated to dist PL53. Fix overlapping memcpy test. Add check for ld. Use $cc instead, if on an ELF system. With -d, don't reuse config.sh unless $myuname matches. Warn more explicitly about changing compilers before reloading old config.sh. Detect Linux ELF format in nm scan. Better detection of d_castneg. (ISC 4.1 was passing the test, but couldn't cast in an argument list.) Suggest -fpic for dynamic loading if you're using GNU CC under any name. No longer test for byacc, fmod, or drem, since they are not used. Makefile.SH Use $ld, not ld (only matters for SVR4) Silence some byacc-related harmless error messages. README Suggest using -Dcc=gcc (or whatever). Warn about reusing old config.sh. (The warning was already there in 5.001; I've just expanded it a little.) Warn against using GNU as and GNU ld on SunOS & Solaris. config.H config_h.SH Updated to match Configure. doio.c Add socket includes. ext/Fcntl/Fcntl.xs Fix typo: s/SETFL/F_SETFL/; handy.h Check _G_HAVE_BOOL, not just if it's defined. hints/dynix.sh hints/hpux_9.sh hints/linux.sh hints/netbsd.sh hints/titanos.sh Updated. ELF on linux should probably work. installperl Install pod2html, pod2latex, and pod2man. lib/ExtUtils/MakeMaker.pm Updated to 4.091. (4.09 + a small writedoc() patch.) myconfig Now includes 'ld' command. perl.c Revised an #elif clause since Pyramid's cpp doesn't understand #elif. perl.h Fix U_L, I_V, and I_32 cast macros to ensure that the cast_ulong(), cast_iv(), and cast_i32() functions (if used) are passed a double. In particular, the FIXSTATUS macros were handing int's to U_L(). Remove unnecessary HAS_FMOD testing (See util.c). proto.h Remove my_fmod() prototype. (See util.c) sv.h Fix GV/CV typo. util.c Simplified cast_i32() and cast_iv() to mimic what *actually* happens on a SPARC running SunOS 4.1.3. (Previously, they did some complicated fmod() calculation. I've since discovered that's not what happens on the SPARC.) With this change, fmod() is no longer necessary. Hence my_fmod is removed. This also means the HAS_FMOD and HAS_DREM tests are no longer needed in Configure, so they are gone too. vms/config.vms Remove unnecessary HAS_FMOD and HAS_DREM defines. x2p/Makefile.SH Silence byacc-related things.
Diffstat (limited to 'hints/linux.sh')
-rw-r--r--hints/linux.sh94
1 files changed, 73 insertions, 21 deletions
diff --git a/hints/linux.sh b/hints/linux.sh
index 97be1d76cd..71afccd1f9 100644
--- a/hints/linux.sh
+++ b/hints/linux.sh
@@ -2,20 +2,38 @@
# Original version by rsanders
# Additional support by Kenneth Albanowski <kjahds@kjahds.com>
#
-# First pass at ELF support by Andy Dougherty <doughera@lafcol.lafayette.edu>
-# Fri Feb 3 14:05:00 EST 1995
-# Use sh Configure -Dcc=gcc-elf to try using gcc-elf. It might work.
+# ELF support by H.J. Lu <hjl@nynexst.com>
+# Additional info from Nigel Head <nhead@ESOC.bitnet>
+# and Kenneth Albanowski <kjahds@kjahds.com>
#
-# Last updated Mon Mar 6 10:18:10 EST 1995
+# Consolidated by Andy Dougherty <doughera@lafcol.lafayette.edu>
#
+# Last updated Thu Apr 6 12:22:03 EDT 1995
+#
+
+# perl goes into the /usr tree. See the Filesystem Standard
+# available via anonymous FTP at tsx-11.mit.edu in
+# /pub/linux/docs/linux-standards/fsstnd.
+# This used to be
+# bin='/usr/bin'
+# but it doesn't seem sensible to put the binary in /usr and all the
+# rest of the support stuff (lib, man pages) into /usr/local.
+# However, allow a command line override, e.g. Configure -Dprefix=/foo/bar
+case "$prefix" in
+'') prefix='/usr' ;;
+esac
-# Why is this needed?
-bin='/usr/bin'
+# Perl expects BSD style signal handling.
+ccflags="-D__USE_BSD_SIGNAL $ccflags"
-# Apparently some versions of gcc 2.6.2 are picking up _G_HAVE_BOOL
-# from somewhere (_G_config.h maybe?) but not actually defining bool.
-# Anyone really know what's going on?
-ccflags='-Dbool=char -DHAS_BOOL'
+# The following functions are gcc built-ins, but the Configure test
+# may fail because it doesn't supply a proper prototype.
+d_memcmp=define
+d_memcpy=define
+
+# Configure may fail to find lstat() since it's a static/inline
+# function in <sys/stat.h>.
+d_lstat=define
d_dosuid='define'
@@ -26,26 +44,60 @@ case "$optimize" in
'') optimize='-O2' ;;
esac
-case "$cc" in
-*cc-elf*)
+# Are we using ELF? Thanks to Kenneth Albanowski <kjahds@kjahds.com>
+# for this test.
+cat >try.c <<'EOM'
+/* Test for whether ELF binaries are produced */
+#include <fcntl.h>
+#include <stdlib.h>
+main() {
+ char buffer[4];
+ int i=open("a.out",O_RDONLY);
+ if(i==-1)
+ exit(1); /* fail */
+ if(read(i,&buffer[0],4)<4)
+ exit(1); /* fail */
+ if(buffer[0] != 127 || buffer[1] != 'E' ||
+ buffer[2] != 'L' || buffer[3] != 'F')
+ exit(1); /* fail */
+ exit(0); /* succeed (yes, it's ELF) */
+}
+EOM
+if gcc try.c >/dev/null 2>&1 && ./a.out; then
+ cat <<'EOM'
+
+You appear to have ELF support. I'll try to use it for dynamic loading.
+EOM
+ # Be careful not to overwrite lddlflags, since the user might
+ # have specified some -L/path options on the Configure command line.
+ lddlflags="-shared $lddlflags"
+ ccdlflags='-rdynamic'
so='so'
dlext='so'
- # Configure might not understand nm output for ELF.
- usenm=false
- ;;
-*)
- lddlflags='-r'
+ ld=gcc
+else
+ echo "You don't have an ELF gcc, using dld if available."
+ # We might possibly have a version of DLD around.
+ lddlflags="-r $lddlflags"
so='sa'
dlext='o'
## If you are using DLD 3.2.4 which does not support shared libs,
## uncomment the next two lines:
#ldflags="-static"
#so='none'
- ;;
-esac
+fi
+rm -rf try.c a.out
-cat <<EOM
+cat <<'EOM'
You should take a look at hints/linux.sh. There are a some lines you
-may wish to change near the bottom.
+may wish to change.
EOM
+
+# And -- reported by one user:
+# We need to get -lc away from the link lines.
+# If we leave it there we get SEGV from miniperl during the build.
+# This may have to do with bugs in the pre-release version of libc for ELF.
+# Uncomment the next two lines to remove -lc from the link line.
+# set `echo " $libswanted " | sed -e 's@ c @ @'`
+# libswanted="$*"