Commit | Line | Data |
a1a0e61e |
1 | #! /usr/bin/bash -norc |
2 | # hints/posix-bc.sh |
3 | # |
4 | # BS2000 (Posix Subsystem) hints by Thomas Dorner <Thomas.Dorner@start.de> |
5 | # |
6 | # thanks to the authors of the os390.sh |
7 | # |
8 | |
c8e8bf6a |
9 | # To get ANSI C, we need to use c89, and ld does not exist |
a7a44c04 |
10 | # You can override this with Configure -Dcc=gcc -Dld=ld. |
11 | case "$cc" in |
12 | '') cc='c89' ;; |
13 | esac |
14 | case "$ld" in |
15 | '') ld='c89' ;; |
16 | esac |
a1a0e61e |
17 | |
18 | # C-Flags: |
a7a44c04 |
19 | # -DPOSIX_BC |
20 | # -DUSE_PURE_BISON |
21 | # -D_XOPEN_SOURCE_EXTENDED alters system headers. |
c77b533b |
22 | # -DPERL_IGNORE_FPUSIG=SIGFPE |
a7a44c04 |
23 | # Prepend your favorites with Configure -Dccflags=your_favorites |
6f2bd249 |
24 | ccflags="$ccflags -Kenum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED -DPERL_IGNORE_FPUSIG=SIGFPE" |
a7a44c04 |
25 | |
26 | # ccdlflags have yet to be determined. |
27 | #case "$ccdlflags" in |
28 | #'') ccdlflags='-c' ;; |
29 | #esac |
30 | |
31 | # cccdlflags have yet to be determined. |
32 | #case "$cccdlflags" in |
33 | #'') cccdlflags='' ;; |
34 | #esac |
35 | |
36 | # ldflags have yet to be determined. |
37 | #case "$ldflags" in |
38 | #'') ldflags='' ;; |
39 | #esac |
40 | |
41 | # lddlflags have yet to be determined. |
42 | #case "$lddlflags" in |
43 | #'') lddlflags='' ;; |
44 | #esac |
a1a0e61e |
45 | |
4113c5bc |
46 | # Flags on a RISC-Host (SUNRISE): |
47 | if [ -n "`bs2cmd SHOW-SYSTEM-INFO | egrep 'HSI-ATT.*TYPE.*SR'`" ]; then |
48 | echo |
49 | echo "Congratulations, you are running a machine with Sunrise CPUs." |
50 | echo "Let's hope you have the matching RISC compiler as well." |
c8e8bf6a |
51 | ccflags="-K risc_4000 $ccflags" |
4113c5bc |
52 | ldflags='-K risc_4000' |
53 | fi |
54 | |
a1a0e61e |
55 | # Turning on optimization breaks perl (CORE-DUMP): |
a7a44c04 |
56 | # You can override this with Configure -Doptimize='-O' or somesuch. |
57 | case "$optimize" in |
58 | '') optimize='none' ;; |
59 | esac |
a1a0e61e |
60 | |
61 | # we don''t use dynamic memorys (yet): |
a7a44c04 |
62 | case "$so" in |
63 | '') so='none' ;; |
64 | esac |
65 | |
66 | case "$usemymalloc" in |
67 | '') usemymalloc='n' ;; |
68 | esac |
a1a0e61e |
69 | |
c8e8bf6a |
70 | # On BS2000/Posix, libc.a does not really hold anything at all, |
a1a0e61e |
71 | # so running nm on it is pretty useless. |
a7a44c04 |
72 | # You can override this with Configure -Dusenm. |
73 | case "$usenm" in |
74 | '') usenm='false' ;; |
75 | esac |
a1a0e61e |
76 | |
a7a44c04 |
77 | # Dynamic loading doesn't work on OS/390 quite yet. |
78 | # You can override this with |
79 | # Configure -Dusedl -Ddlext=.so -Ddlsrc=dl_dllload.xs. |
80 | case "$usedl" in |
81 | '') usedl='n' ;; |
82 | esac |
83 | case "$dlext" in |
84 | '') dlext='none' ;; |
85 | esac |
86 | #case "$dlsrc" in |
87 | #'') dlsrc='none' ;; |
88 | #esac |
89 | #case "$ldlibpthname" in |
90 | #'') ldlibpthname=LIBPATH ;; |
91 | #esac |
a1a0e61e |
92 | |