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