2.5-18.1
[glibc.git] / sysdeps / ia64 / fpu / import_intel_libm
blob1aaa646a93765cd1b35fff4a3efb1bd52d47bcd8
1 #!/bin/sh
3 # Notes:
5 # We don't import copysign finite, fpclassify, isinf, isnan, and signbit
6 # since our own versions are nicer and just as correct and fast (except
7 # perhaps that they don't handle non-finite arguments well?).
9 # Also, leave out cabs for now since it doesn't seem overridable in
10 # glibc.
12 libm_dir=$1
14 import_s() {
15 # $1 = name
16 # $2 = source file-name
17 # $3 = destination file-name
18 echo "Importing $1 from $2 -> $3"
19 rm -f $3
20 awk -f import_file.awk FUNC=$1 $2 > $3
23 import_c() {
24 # $1 = name
25 # $2 = source file-name
26 # $3 = destination file-name
27 echo "Importing $1 from $2 -> $3"
28 rm -f $3
29 awk -f import_file.awk LICENSE_ONLY=y $2 > $3
32 do_imports() {
33 while read func_pattern src_file dst_file; do
34 case $src_file in
35 *.[ch])
36 import_c "$func_pattern" "$src_file" "$dst_file"
39 import_s "$func_pattern" "$src_file" "$dst_file"
41 esac
42 done
45 ./gen_import_file_list $libm_dir > import_file_list
47 do_imports < import_file_list
49 emptyfiles="
50 e_gamma_r.c
51 e_gammaf_r.c
52 e_gammal_r.c
53 s_sincos.c
54 s_sincosf.c
55 s_sincosl.c
56 t_exp.c
57 w_acosh.c
58 w_acoshf.c
59 w_acoshl.c
60 w_atanh.c
61 w_atanhf.c
62 w_atanhl.c
63 w_exp10.c
64 w_exp10f.c
65 w_exp10l.c
66 w_exp2.c
67 w_exp2f.c
68 w_exp2l.c
69 w_expl.c
70 w_lgamma_r.c
71 w_lgammaf_r.c
72 w_lgammal_r.c
73 w_log2.c
74 w_log2f.c
75 w_log2l.c
76 w_sinh.c
77 w_sinhf.c
78 w_sinhl.c
80 for f in $emptyfiles
82 rm -f $f
83 echo "/* Not needed. */" > $f
84 done
86 removedfiles="
87 libm_atan2_reg.S
88 s_ldexp.S
89 s_ldexpf.S
90 s_ldexpl.S
91 s_scalbn.S
92 s_scalbnf.S
93 s_scalbnl.S
96 rm -f $removedfiles
98 for f in lgammaf_r.c lgammal_r.c lgamma_r.c
100 import_c $f $libm_dir/$f e_$f
101 done
103 for f in lgamma.c lgammaf.c lgammal.c
105 import_c $f $libm_dir/$f w_$f
106 done