Skip to content

Commit 443e13e

Browse files
committed
Merge pull request #72 from talex5/travis
Fix build on ARM and add Travis tests
2 parents c013779 + 9101f61 commit 443e13e

4 files changed

Lines changed: 46 additions & 13 deletions

File tree

.travis.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/sh
2+
set -eux
3+
4+
case "$TARGET" in
5+
host)
6+
uname -a
7+
export LOADER=
8+
make ;;
9+
arm32)
10+
sudo bash -c 'echo >> /etc/apt/sources.list "deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe"'
11+
sudo apt-get update
12+
sudo apt-get -y install gcc-4.7-arm-linux-gnueabihf qemu binfmt-support
13+
make CC="arm-linux-gnueabihf-gcc-4.7"
14+
export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib
15+
#export LOADER=/usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3
16+
export LOADER="echo TESTS DISABLED ON ARM"
17+
;;
18+
*)
19+
echo 'Unknown TARGET!'
20+
exit 1
21+
;;
22+
esac
23+
24+
$LOADER ./test/test-double
25+
$LOADER ./test/test-float

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: c
2+
script: ./.travis.sh
3+
env:
4+
- TARGET=host
5+
- TARGET=arm32

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ clean:
4141
@for dir in $(SUBDIRS) .; do \
4242
rm -fr $$dir/*.o $$dir/*.a $$dir/*.$(SHLIB_EXT)*; \
4343
done
44+
@rm -f test/test-double test/test-float
4445

4546
distclean:
4647
-rm -f $(OBJS) *.a *.$(SHLIB_EXT) libopenlibm.*

src/Make.files

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ $(CUR_SRCS) = common.c \
1010
e_sinh.c e_sinhf.c e_sqrt.c e_sqrtf.c \
1111
k_cos.c k_exp.c k_expf.c k_rem_pio2.c k_sin.c k_tan.c \
1212
k_cosf.c k_sinf.c k_tanf.c \
13-
s_asinh.c s_asinhf.c s_atan.c s_atanf.c s_carg.c s_cargf.c s_cargl.c \
13+
s_asinh.c s_asinhf.c s_atan.c s_atanf.c s_carg.c s_cargf.c \
1414
s_cbrt.c s_cbrtf.c s_ceil.c s_ceilf.c \
1515
s_copysign.c s_copysignf.c s_cos.c s_cosf.c \
1616
s_csqrt.c s_csqrtf.c s_erf.c s_erff.c \
@@ -30,7 +30,7 @@ $(CUR_SRCS) = common.c \
3030
s_scalbln.c s_scalbn.c s_scalbnf.c s_signbit.c \
3131
s_signgam.c s_significand.c s_significandf.c s_sin.c s_sincos.c \
3232
s_sinf.c s_sincosf.c s_tan.c s_tanf.c s_tanh.c s_tanhf.c s_tgammaf.c \
33-
s_trunc.c s_truncf.c s_cpow.c s_cpowf.c s_cpowl.c \
33+
s_trunc.c s_truncf.c s_cpow.c s_cpowf.c \
3434
w_cabs.c w_cabsf.c w_drem.c w_dremf.c
3535

3636
ifneq ($(OS), WINNT)
@@ -48,22 +48,24 @@ $(CUR_SRCS) += e_acosl.c e_asinl.c e_atan2l.c e_fmodl.c \
4848
s_atanl.c s_ceill.c s_cosl.c s_cprojl.c \
4949
s_csqrtl.c s_floorl.c s_fmal.c \
5050
s_frexpl.c s_logbl.c s_nexttoward.c \
51-
s_remquol.c \
51+
s_remquol.c s_cpowl.c s_cargl.c \
5252
s_sinl.c s_sincosl.c s_tanl.c s_truncl.c w_cabsl.c \
53-
s_nextafterl.c s_rintl.c s_scalbnl.c polevll.c
53+
s_nextafterl.c s_rintl.c s_scalbnl.c polevll.c \
54+
s_casinl.c s_ctanl.c \
55+
s_cimagl.c s_conjl.c s_creall.c s_cacoshl.c s_catanhl.c s_casinhl.c \
56+
s_catanl.c s_csinl.c s_cacosl.c s_cexpl.c s_csinhl.c s_ccoshl.c \
57+
s_clogl.c s_ctanhl.c s_ccosl.c
5458
# s_cbrtl.c
5559
endif
5660

5761
# C99 complex functions
5862
$(CUR_SRCS) += s_ccosh.c s_ccoshf.c s_cexp.c s_cexpf.c \
59-
s_cimag.c s_cimagf.c s_cimagl.c \
60-
s_conj.c s_conjf.c s_conjl.c \
61-
s_cproj.c s_cprojf.c s_creal.c s_crealf.c s_creall.c \
63+
s_cimag.c s_cimagf.c \
64+
s_conj.c s_conjf.c \
65+
s_cproj.c s_cprojf.c s_creal.c s_crealf.c \
6266
s_csinh.c s_csinhf.c s_ctanh.c s_ctanhf.c \
6367
s_cacos.c s_cacosf.c \
64-
s_cacosh.c s_cacoshf.c s_cacoshl.c s_cacosl.c \
65-
s_casin.c s_casinf.c s_casinh.c s_casinhf.c s_casinhl.c \
66-
s_casinl.c s_catan.c s_catanf.c s_catanh.c s_catanhf.c s_catanhl.c \
67-
s_catanl.c s_ccoshl.c s_ccosl.c s_cexpl.c \
68-
s_clog.c s_clogf.c s_clogl.c \
69-
s_csinhl.c s_csinl.c s_ctanhl.c s_ctanl.c
68+
s_cacosh.c s_cacoshf.c \
69+
s_casin.c s_casinf.c s_casinh.c s_casinhf.c \
70+
s_catan.c s_catanf.c s_catanh.c s_catanhf.c \
71+
s_clog.c s_clogf.c

0 commit comments

Comments
 (0)