This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add -mabi=64 to ccflags for 64-bit IRIX gcc.
[perl5.git] / hints / aix.sh
... / ...
CommitLineData
1# hints/aix.sh
2# AIX 3.x.x hints thanks to Wayne Scott <wscott@ichips.intel.com>
3# AIX 4.1 hints thanks to Christopher Chan-Nui <channui@austin.ibm.com>.
4# AIX 4.1 pthreading by Christopher Chan-Nui <channui@austin.ibm.com> and
5# Jarkko Hietaniemi <jhi@iki.fi>.
6# Merged on Mon Feb 6 10:22:35 EST 1995 by
7# Andy Dougherty <doughera@lafcol.lafayette.edu>
8
9
10# Configure finds setrgid and setruid, but they're useless. The man
11# pages state:
12# setrgid: The EPERM error code is always returned.
13# setruid: The EPERM error code is always returned. Processes cannot
14# reset only their real user IDs.
15d_setrgid='undef'
16d_setruid='undef'
17
18alignbytes=8
19
20case "$usemymalloc" in
21'') usemymalloc='n' ;;
22esac
23
24# Intuiting the existence of system calls under AIX is difficult, at best;
25# the safest (and slowest...) technique is to find them empirically.
26usenm='undef'
27
28so="a"
29dlext="so"
30
31# Make setsockopt work correctly. See man page.
32# ccflags='-D_BSD=44'
33
34# uname -m output is too specific and not appropriate here
35case "$archname" in
36'') archname="$osname" ;;
37esac
38
39case "$osvers" in
403*) d_fchmod=undef
41 ccflags="$ccflags -D_ALL_SOURCE"
42 ;;
43*) # These hints at least work for 4.x, possibly other systems too.
44 ccflags="$ccflags -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE"
45 case "$cc" in
46 *gcc*) ;;
47 *) ccflags="$ccflags -qmaxmem=8192" ;;
48 esac
49 nm_opt='-B'
50 ;;
51esac
52
53# These functions don't work like Perl expects them to.
54d_setregid='undef'
55d_setreuid='undef'
56
57# Changes for dynamic linking by Wayne Scott <wscott@ichips.intel.com>
58#
59# Tell perl which symbols to export for dynamic linking.
60case "$cc" in
61*gcc*) ccdlflags='-Xlinker -bE:perl.exp' ;;
62*) ccdlflags='-bE:perl.exp' ;;
63esac
64
65# The first 3 options would not be needed if dynamic libs. could be linked
66# with the compiler instead of ld.
67# -bI:$(PERL_INC)/perl.exp Read the exported symbols from the perl binary
68# -bE:$(BASEEXT).exp Export these symbols. This file contains only one
69# symbol: boot_$(EXP) can it be auto-generated?
70case "$osvers" in
713*)
72 lddlflags='-H512 -T512 -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -e _nostart -lc'
73 ;;
74*)
75 lddlflags='-bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -b noentry -lc'
76 ;;
77esac
78
79# This script UU/usethreads.cbu will get 'called-back' by Configure
80# after it has prompted the user for whether to use threads.
81cat > UU/usethreads.cbu <<'EOCBU'
82case "$usethreads" in
83$define|true|[yY]*)
84 ccflags="$ccflags -DNEED_PTHREAD_INIT"
85 case "$cc" in
86 xlc_r) ;;
87 cc)
88 echo >&4 "Switching cc to xlc_r because of POSIX threads."
89 cc=xlc_r
90 ;;
91 '' | cc_r)
92 cc=xlc_r
93 ;;
94 *)
95 cat >&4 <<EOM
96For pthreads you should use the AIX C compiler xlc_r.
97(now your compiler was '$cc')
98Cannot continue, aborting.
99EOM
100 exit 1
101 ;;
102 esac
103
104 # Add the POSIX threads library and the re-entrant libc.
105
106 lddlflags=`echo $lddlflags | sed 's/ -lc$/ -lpthreads -lc_r -lc/'`
107
108 # Add the c_r library to the list of wanted libraries.
109 # Make sure the c_r library is before the c library or
110 # make will fail.
111 set `echo X "$libswanted "| sed -e 's/ c / c_r c /'`
112 shift
113 libswanted="$*"
114 ;;
115esac
116EOCBU