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 |
24 | case "$ccflags" in |
c77b533b |
25 | '') ccflags='-K enum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -DPERL_IGNORE_FPUSIG=SIGFPE' ;; |
26 | *) ccflags='$ccflags -Kenum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -DPERL_IGNORE_FPUSIG=SIGFPE' ;; |
a7a44c04 |
27 | esac |
28 | |
29 | # ccdlflags have yet to be determined. |
30 | #case "$ccdlflags" in |
31 | #'') ccdlflags='-c' ;; |
32 | #esac |
33 | |
34 | # cccdlflags have yet to be determined. |
35 | #case "$cccdlflags" in |
36 | #'') cccdlflags='' ;; |
37 | #esac |
38 | |
39 | # ldflags have yet to be determined. |
40 | #case "$ldflags" in |
41 | #'') ldflags='' ;; |
42 | #esac |
43 | |
44 | # lddlflags have yet to be determined. |
45 | #case "$lddlflags" in |
46 | #'') lddlflags='' ;; |
47 | #esac |
a1a0e61e |
48 | |
4113c5bc |
49 | # Flags on a RISC-Host (SUNRISE): |
50 | if [ -n "`bs2cmd SHOW-SYSTEM-INFO | egrep 'HSI-ATT.*TYPE.*SR'`" ]; then |
51 | echo |
52 | echo "Congratulations, you are running a machine with Sunrise CPUs." |
53 | echo "Let's hope you have the matching RISC compiler as well." |
c8e8bf6a |
54 | ccflags="-K risc_4000 $ccflags" |
4113c5bc |
55 | ldflags='-K risc_4000' |
56 | fi |
57 | |
a1a0e61e |
58 | # Turning on optimization breaks perl (CORE-DUMP): |
a7a44c04 |
59 | # You can override this with Configure -Doptimize='-O' or somesuch. |
60 | case "$optimize" in |
61 | '') optimize='none' ;; |
62 | esac |
a1a0e61e |
63 | |
64 | # we don''t use dynamic memorys (yet): |
a7a44c04 |
65 | case "$so" in |
66 | '') so='none' ;; |
67 | esac |
68 | |
69 | case "$usemymalloc" in |
70 | '') usemymalloc='n' ;; |
71 | esac |
a1a0e61e |
72 | |
c8e8bf6a |
73 | # On BS2000/Posix, libc.a does not really hold anything at all, |
a1a0e61e |
74 | # so running nm on it is pretty useless. |
a7a44c04 |
75 | # You can override this with Configure -Dusenm. |
76 | case "$usenm" in |
77 | '') usenm='false' ;; |
78 | esac |
a1a0e61e |
79 | |
a7a44c04 |
80 | # Dynamic loading doesn't work on OS/390 quite yet. |
81 | # You can override this with |
82 | # Configure -Dusedl -Ddlext=.so -Ddlsrc=dl_dllload.xs. |
83 | case "$usedl" in |
84 | '') usedl='n' ;; |
85 | esac |
86 | case "$dlext" in |
87 | '') dlext='none' ;; |
88 | esac |
89 | #case "$dlsrc" in |
90 | #'') dlsrc='none' ;; |
91 | #esac |
92 | #case "$ldlibpthname" in |
93 | #'') ldlibpthname=LIBPATH ;; |
94 | #esac |
a1a0e61e |
95 | |