From: Jarkko Hietaniemi Date: Wed, 21 Nov 2001 15:03:53 +0000 (+0000) Subject: Dynaloading for POSIX-BC from Thomas Dorner. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8489188508bafece71d2019cb0dac6720f8529f0;p=p5sagit%2Fp5-mst-13.2.git Dynaloading for POSIX-BC from Thomas Dorner. p4raw-id: //depot/perl@13171 --- diff --git a/hints/posix-bc.sh b/hints/posix-bc.sh index a7d3d2c..683bbcc 100644 --- a/hints/posix-bc.sh +++ b/hints/posix-bc.sh @@ -1,26 +1,120 @@ -#! /usr/bin/bash -norc +: # hints/posix-bc.sh # # BS2000 (Posix Subsystem) hints by Thomas Dorner # -# thanks to the authors of the os390.sh +# Thanks to the authors of the os390.sh for the very first draft. # +# You can modify almost any parameter set here using Configure with +# the appropriate -D option. -# To get ANSI C, we need to use c89, and ld does not exist -# You can override this with Configure -Dcc=gcc -Dld=ld. +# remove this line if dynamic libraries are working for you: +bs2000_ignoredl='y' + +# To get ANSI C, we need to use c89 +# You can override this with Configure -Dcc=gcc +# (if you ever get a gcc ported to BS2000 ;-). case "$cc" in '') cc='c89' ;; esac -case "$ld" in -'') ld='c89' ;; -esac # C-Flags: # -DPOSIX_BC # -DUSE_PURE_BISON # -D_XOPEN_SOURCE_EXTENDED alters system headers. # Prepend your favorites with Configure -Dccflags=your_favorites -ccflags="$ccflags -Kenum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED" +ccflags="$ccflags -Kc_names_unlimited,enum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED" + +# Now, what kind of BS2000 system are we running on? +echo +if [ -n "`bs2cmd SHOW-SYSTEM-INFO | egrep 'HSI-ATT.*TYPE.*SR'`" ]; then + echo "You are running a BS2000 machine with Sunrise CPUs." + echo "Let's hope you have the matching RISC compiler as well." + ccflags="-K risc_4000 $ccflags" + bs2000_ldflags='-K risc_4000' +else + echo "Seems like a standard 390 BS2000 machine to me." + bs2000_ldflags='' +fi +echo +if [ -z "$bs2000_ignoredl" -a -e /usr/lib/libdl.a ]; then + echo "Wow, your BS2000 is State Of The Art and seems to support dynamic libraries." + echo "I just can't resist giving them a try." + bs2000_lddlflags='-Bsymbolic -Bdynamic' + # dynamic linkage of system libraries gave us runtime linker + # errors, so we use static linkage while generating our DLLs :-( +# bs2000_lddlflags='-Bstatic' + bs2000_so='none' + bs2000_usedl='define' + bs2000_dlext='so' + case $bs2000_ldflags in + *risc_4000*) + bs2000_ld="perl_genso" + echo " +Now you must buy everything they sell you, musn't you? +Didn't somebody tell you that RISC machines and dynamic library support gives +you helluva lot of configuration problems at the moment? +Sigh. Now you'll expect me to fix it for you, eh? +OK, OK, I'll give you a wrapper. +Just copy $bs2000_ld anywhere into your path before you try to install +additional modules!" + +cat > $bs2000_ld <