diff options
Diffstat (limited to 'hints')
-rw-r--r-- | hints/dynix.sh | 1 | ||||
-rw-r--r-- | hints/hpux_9.sh | 4 | ||||
-rw-r--r-- | hints/linux.sh | 94 | ||||
-rw-r--r-- | hints/netbsd.sh | 15 | ||||
-rw-r--r-- | hints/titanos.sh | 20 |
5 files changed, 105 insertions, 29 deletions
diff --git a/hints/dynix.sh b/hints/dynix.sh index 51eae905a6..3b759cba25 100644 --- a/hints/dynix.sh +++ b/hints/dynix.sh @@ -1,2 +1,3 @@ +# If this doesn't work, try specifying 'none' for hints. d_castneg=undef libswanted=`echo $libswanted | sed -e 's/socket /socket seq /'` diff --git a/hints/hpux_9.sh b/hints/hpux_9.sh index 8e326e28a1..fe5c2c7517 100644 --- a/hints/hpux_9.sh +++ b/hints/hpux_9.sh @@ -14,8 +14,8 @@ case "$cc" in ;; esac libswanted='m dld' -# ldflags="-Wl,-E -Wl,-a,shared" # Force all shared? -ldflags="-Wl,-E" +# ccdlflags="-Wl,-E -Wl,-a,shared $ccdlflags" # Force all shared? +ccdlflags="-Wl,-E $ccdlflags" usemymalloc='y' alignbytes=8 selecttype='int *' 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="$*" diff --git a/hints/netbsd.sh b/hints/netbsd.sh index f5f5a74f93..33a7bf1c00 100644 --- a/hints/netbsd.sh +++ b/hints/netbsd.sh @@ -1,10 +1,17 @@ # hints/netbsd.sh +# netbsd keeps dynamic loading dl*() functions in /lib/crt0.o, +# so Configure doesn't find them (unless you abandon the nm scan). case "$osvers" in -0.9|0.8) +0.9*|0.8*) usedl="$undef" ;; -*) d_dlopen="$define" - cccdlflags='-DPIC -fpic' - lddlflags='-Bforcearchive -Bshareable' +*) d_dlopen=$define + d_dlerror=$define + cccdlflags="-DPIC -fpic $cccdlflags" + lddlflags="-Bforcearchive -Bshareable $lddlflags" ;; esac + +# Avoid telldir prototype conflict in pp_sys.c (NetBSD uses const DIR *) +# Configure should test for this. Volunteers? +pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"' diff --git a/hints/titanos.sh b/hints/titanos.sh index b327037c8e..0f382ac0ff 100644 --- a/hints/titanos.sh +++ b/hints/titanos.sh @@ -2,6 +2,7 @@ # Created by: JT McDuffie (jt@kpc.com) 26 DEC 1991 # p5ed by: Jarkko Hietaniemi <jhi@hut.fi> Aug 27 1994 # NOTE: You should run Configure with tcsh (yes, tcsh). +# Comments by Andy Dougherty <doughera@lafcol.lafayette.edu> 28 Mar 1995 alignbytes="8" byteorder="4321" castflags='0' @@ -14,9 +15,24 @@ malloctype='void *' models='none' ccflags="$ccflags -I/usr/include/net -DDEBUGGING -DSTANDARD_C" cppflags="$cppflags -I/usr/include/net -DDEBUGGING -DSTANDARD_C" -libs='-lnsl -ldbm -lPW -lmalloc -lm' stdchar='unsigned char' -static_ext='DynaLoader NDBM_File Socket' +# +# Apparently there are some harmful libs in Configure's $libswanted. +# Perl5.000 had: libs='-lnsl -ldbm -lPW -lmalloc -lm' +# Unfortunately, this line prevents users from including things like +# -lgdbm and -ldb, which they may or may not have or want. +# We should probably fiddle with libswanted instead of libs. +# And even there, we should only bother to delete harmful libraries. +# However, I don't know what they are or why they should be deleted, +# so this will have to do for now. --AD 28 Mar 1995 +libswanted='nsl dbm gdbm db PW malloc m' +# +# Extensions: This system can not compile POSIX. We'll let Configure +# figure out the others. Certainly Fcntl, Socket, and at least one *DB* +# extension should be included. +# perl5.000 had: static_ext='DynaLoader NDBM_File Socket' +useposix='n' +# uidtype='ushort' voidflags='7' inclwanted='/usr/include /usr/include/net' |