blob: e9a02891922701f38a2bc12002f420f13ca6c4ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
# This file is a shell script fragment that supplies the information
# necessary for a configure script to process the program in
# this directory. For more information, look at ../configure.
configdirs=
srctrigger=powerpc32
srcname="GNU Multi-Precision library/mpn"
# per-host:
# per-target:
case "${target}" in
sparc9*-*-* | sparc64*-*-* | ultrasparc*-*-*)
#path="sparc64" ;; Don't use this until compilers are ready
path="sparc32/v8 sparc" ;;
sparc8*-*-* | microsparc*-*-*)
path="sparc32/v8 sparc" ;;
supersparc*-*-*)
path="sparc32/v8/supersparc sparc32/v8 sparc"
extra_functions="udiv" ;;
sparc*-*-*) path="sparc32"
if [ x$floating_point = xno ]
then extra_functions="udiv_nfp"
else extra_functions="udiv_fp"
fi
;;
hppa7000*-*-*) path="hppa/hppa1_1 hppa"; extra_functions="udiv_qrnnd" ;;
hppa1.0*-*-*) path="hppa"; extra_functions="udiv_qrnnd" ;;
hppa*-*-*) # assume pa7100
path="hppa/hppa1_1/pa7100 hppa/hppa1_1 hppa"
extra_functions="udiv_qrnnd" ;;
cray2-cray-unicos* | [xy]mp-cray-unicos* | [ctj]90-cray-unicos*)
path="cray" ;;
alphaev5-*-*) path="alpha/ev5 alpha"; extra_functions="udiv_qrnnd" ;;
alpha*-*-*) path="alpha"; extra_functions="udiv_qrnnd" ;;
am29000*-*-*) path="am29000" ;;
a29k*-*-*) path="am29000" ;;
# Intel x86 configurations
i[34]86*-*-linuxaout* | i[34]86*-*-linuxoldld* | \
i[34]86*-*-*bsd*) # x86 running BSD or Linux with a.out
echo '#define BSD_SYNTAX' >asm-syntax.h
echo '#include "'$srcdir'/x86/syntax.h"' >>asm-syntax.h
path="x86" ;;
i[56]86*-*-linuxaout* | pentium-*-linuxaout* | pentiumpro-*-linuxaout* | \
i[56]86*-*-linuxoldld* | pentium-*-linuxoldld* | pentiumpro-*-linuxoldld* | \
i[56]86*-*-*bsd* | pentium-*-*bsd* | pentiumpro-*-*bsd*)
echo '#define BSD_SYNTAX' >asm-syntax.h
echo '#include "'$srcdir'/x86/syntax.h"' >>asm-syntax.h
path="x86/pentium x86" ;;
i[34]86*-*-*) # x86 with ELF/SysV format
echo '#define ELF_SYNTAX' >asm-syntax.h
echo '#include "'$srcdir'/x86/syntax.h"' >>asm-syntax.h
path="x86" ;;
i[56]86*-*-* | pentium-*-* | pentiumpro-*-*) # x86 with ELF/SysV format
echo '#define ELF_SYNTAX' >asm-syntax.h
echo '#include "'$srcdir'/x86/syntax.h"' >>asm-syntax.h
path="x86/pentium x86" ;;
# Motorola 68k configurations. Let m68k mean 68020-68040.
# mc68000 or mc68060 configurations need to be specified explicitly
m680[234]0*-*-linuxaout* | m68k*-*-linuxaout*)
echo '#define MIT_SYNTAX' >asm-syntax.h
echo '#include "'$srcdir'/m68k/syntax.h"' >>asm-syntax.h
path="m68k/mc68020 m68k" ;;
m68060*-*-linuxaout*)
echo '#define MIT_SYNTAX' >asm-syntax.h
echo '#include "'$srcdir'/m68k/syntax.h"' >>asm-syntax.h
path="m68k" ;;
m680[234]0*-*-linux* | m68k*-*-linux*)
echo '#define ELF_SYNTAX' >asm-syntax.h
echo '#include "'$srcdir'/m68k/syntax.h"' >>asm-syntax.h
path="m68k/mc68020 m68k" ;;
m68060*-*-linux*)
echo '#define ELF_SYNTAX' >asm-syntax.h
echo '#include "'$srcdir'/m68k/syntax.h"' >>asm-syntax.h
path="m68k" ;;
m68000*-*-* | m68060*-*-*)
echo '#define MIT_SYNTAX' >asm-syntax.h
echo '#include "'$srcdir'/m68k/syntax.h"' >>asm-syntax.h
path="m68k/mc68000" ;;
m680[234]0*-*-* | m68k*-*-*)
echo '#define MIT_SYNTAX' >asm-syntax.h
echo '#include "'$srcdir'/m68k/syntax.h"' >>asm-syntax.h
path="m68k/mc68020 m68k" ;;
i960*-*-*) path="i960" ;;
m88k*-*-*bsd* | m88110*-*-*bsd*)
echo '#define BSD_SYNTAX' >asm-syntax.h
echo '#include "'$srcdir'/m88k/syntax.h"' >>asm-syntax.h
path="m88k" ;;
m88k*-*-*) path="m88k" ;;
m88110*-*-*) path="m88k/mc88110 m88k" ;;
ns32k*-*-*) path="n32k" ;;
ppc601-*-*) path="power powerpc32" ;;
ppc620-*-* | powerpc64*-*-*) path="powerpc64" ;;
powerpc*-*-openbsd*) path= ;; # until ASM is fixed........ XXXXXX
ppc60[234]*-*-* | powerpc*-*-*) path="powerpc32" ;;
pyramid-*-*) path="pyr" ;;
rs6000-*-* | power-*-* | power2-*-*)
path="power"; extra_functions="udiv_w_sdiv" ;;
sh-*-*) path="sh" ;;
sh2-*-*) path="sh/sh2 sh" ;;
mips[34]*-*-*) path="mips3" ;;
mips*-*-irix6*) path="mips3" ;;
mips*-*-*) path="mips2" ;;
vax*-*-*) path="vax"; extra_functions="udiv_w_sdiv" ;;
z8000x*-*-*) path="z8000x"; extra_functions="udiv_w_sdiv" ;;
z8000*-*-*) path="z8000"; extra_functions="udiv_w_sdiv" ;;
clipper*-*-*) path="clipper" ;;
*-*-*) ;;
esac
case "${target}" in
*-*-linuxaout* | *-*-linuxoldld*) config=bsd.h ;;
*-sysv* | *-solaris* | *-*-linux*) config="sysv.h" ;;
*) config="bsd.h" ;;
esac
case "${target}" in
i[3456]86*-*-*bsd* | i[3456]86*-*-linuxaout* | i[3456]86*-*-linuxoldld* | \
pentium-*-*bsd* | pentium-*-linuxaout* | pentium-*-linuxoldld* | \
pentiumpro-*-*bsd* | pentiumpro-*-linuxaout* | pentiumpro-*-linuxoldld*)
target_makefile_frag=config/t-oldgas ;;
rs6000-*-aix[456789]* | rs6000-*-aix3.2.[456789])
target_makefile_frag=config/t-pwr-aix ;;
ppc601-*-aix[456789]* | ppc601-*-aix3.2.[456789] | \
ppc60[234]*-*-aix[456789]* | ppc60[234]*-*-aix3.2.[456789] | \
powerpc*-*-aix[456789]* | powerpc*-*-aix3.2.[456789])
target_makefile_frag=config/t-ppc-aix ;;
esac
functions="${extra_functions} inlines add_n addmul_1 cmp divmod_1 \
divrem divrem_1 dump lshift mod_1 mul mul_1 mul_n random2 rshift sqrtrem \
sub_n submul_1 get_str set_str scan0 scan1 popcount hamdist gcd_1 \
pre_mod_1 perfsqr bdivmod gcd gcdext"
path="$path generic"
mpn_objects=
for fn in $functions ; do
mpn_objects="$mpn_objects $fn.o"
for dir in $path ; do
rm -f $fn.[Ssc]
if test -f $srcdir/$dir/$fn.S ; then
files="$files $dir/$fn.S"
links="$links $fn.S"
break
elif test -f $srcdir/$dir/$fn.s ; then
files="$files $dir/$fn.s"
links="$links $fn.s"
break
elif test -f $srcdir/$dir/$fn.c ; then
files="$files $dir/$fn.c"
links="$links $fn.c"
break
fi
done
done
for dir in $path ; do
rm -f gmp-mparam.h
if test -f $srcdir/$dir/gmp-mparam.h ; then
files="$files $dir/gmp-mparam.h"
links="$links gmp-mparam.h"
break
fi
done
links="sysdep.h $links"
files="$config $files"
mpn_links=$links
# post-target:
sed <Makefile >Makefile.tmp \
-e "s/MPN_LINKS = .*/MPN_LINKS =${mpn_links}/" \
-e "s/MPN_OBJECTS = .*/MPN_OBJECTS =${mpn_objects}/"
mv Makefile.tmp Makefile
|