mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2024-12-29 13:03:42 +01:00
Get everything except a couple of files in ld128 to build with gcc.
A couple of small issues still remain with linking: LINK all /usr/bin/ranlib: file: libopenlibm.a(e_rem_pio2.o) has no symbols /usr/bin/ranlib: file: libopenlibm.a(e_rem_pio2f.o) has no symbols /usr/bin/ranlib: file: libopenlibm.a(k_cosf.o) has no symbols /usr/bin/ranlib: file: libopenlibm.a(k_sinf.o) has no symbols /usr/bin/ranlib: file: libopenlibm.a(k_tanf.o) has no symbols LINK all ld: duplicate symbol ___ieee754_rem_pio2 in src/s_sin.o and src/s_cos.o for architecture x86_64 collect2: ld returned 1 exit status
This commit is contained in:
parent
f5fb927467
commit
cd520e4350
5 changed files with 16 additions and 15 deletions
6
Makefile
6
Makefile
|
@ -3,10 +3,12 @@ include ./Make.inc
|
||||||
all:
|
all:
|
||||||
$(MAKE) -C src all
|
$(MAKE) -C src all
|
||||||
$(MAKE) -C ld128 all
|
$(MAKE) -C ld128 all
|
||||||
$(QUIET_LINK)ar -rcs libopenlibm.a src/*.o ld128/*.o
|
$(MAKE) -C bsdsrc all
|
||||||
$(QUIET_LINK)$(CC) -shared -fPIC src/*.o ld128/*.o -o libopenlibm.$(SHLIB_EXT)
|
$(QUIET_LINK)ar -rcs libopenlibm.a src/*.o ld128/*.o bsdsrc/*.o
|
||||||
|
$(QUIET_LINK)$(CC) -shared -fPIC src/*.o ld128/*.o bsdsrc/*.o -o libopenlibm.$(SHLIB_EXT)
|
||||||
|
|
||||||
cleanall:
|
cleanall:
|
||||||
$(MAKE) -C src clean
|
$(MAKE) -C src clean
|
||||||
$(MAKE) -C ld128 clean
|
$(MAKE) -C ld128 clean
|
||||||
|
$(MAKE) -C bsdsrc clean
|
||||||
rm -f *.a *.$(SHLIB_EXT)
|
rm -f *.a *.$(SHLIB_EXT)
|
||||||
|
|
|
@ -54,7 +54,9 @@
|
||||||
static __inline void
|
static __inline void
|
||||||
_b_trunc(volatile double *_dp)
|
_b_trunc(volatile double *_dp)
|
||||||
{
|
{
|
||||||
uint32_t _lw;
|
//VBS
|
||||||
|
//u_int32_t _lw;
|
||||||
|
u_int32_t _lw;
|
||||||
|
|
||||||
GET_LOW_WORD(_lw, *_dp);
|
GET_LOW_WORD(_lw, *_dp);
|
||||||
SET_LOW_WORD(*_dp, _lw & 0xf8000000);
|
SET_LOW_WORD(*_dp, _lw & 0xf8000000);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
include ../Make.inc
|
include ../Make.inc
|
||||||
|
|
||||||
SRCS= invtrig.o k_cosl.o k_sinl.o k_tanl.o # s_exp2l.o s_nanl.o
|
SRCS= invtrig.o k_cosl.o k_sinl.o k_tanl.o # s_nanl.o s_exp2l.o
|
||||||
|
|
||||||
all: $(SRCS)
|
all: $(SRCS)
|
||||||
|
|
15
src/Makefile
15
src/Makefile
|
@ -16,7 +16,7 @@ SRCS= \
|
||||||
s_cbrt.o s_cbrtf.o s_ceil.o s_ceilf.o \
|
s_cbrt.o s_cbrtf.o s_ceil.o s_ceilf.o \
|
||||||
s_copysign.o s_copysignf.o s_cos.o s_cosf.o \
|
s_copysign.o s_copysignf.o s_cos.o s_cosf.o \
|
||||||
s_csqrt.o s_csqrtf.o s_erf.o s_erff.o \
|
s_csqrt.o s_csqrtf.o s_erf.o s_erff.o \
|
||||||
s_exp2.o s_exp2f.o s_expm1.o s_expm1f.o s_fabsf.o s_fdim.o \
|
s_exp2.o s_exp2f.o s_expm1.o s_expm1f.o s_fabs.o s_fabsf.o s_fdim.o \
|
||||||
s_finite.o s_finitef.o \
|
s_finite.o s_finitef.o \
|
||||||
s_floor.o s_floorf.o s_fma.o s_fmaf.o \
|
s_floor.o s_floorf.o s_fma.o s_fmaf.o \
|
||||||
s_fmax.o s_fmaxf.o s_fmaxl.o s_fmin.o \
|
s_fmax.o s_fmaxf.o s_fmaxl.o s_fmin.o \
|
||||||
|
@ -24,11 +24,11 @@ SRCS= \
|
||||||
s_ilogbl.o s_isfinite.o s_isnormal.o s_isnan.o \
|
s_ilogbl.o s_isfinite.o s_isnormal.o s_isnan.o \
|
||||||
s_llrint.o s_llrintf.o s_llround.o s_llroundf.o s_llroundl.o \
|
s_llrint.o s_llrintf.o s_llround.o s_llroundf.o s_llroundl.o \
|
||||||
s_log1p.o s_log1pf.o s_logb.o s_logbf.o s_lrint.o s_lrintf.o \
|
s_log1p.o s_log1pf.o s_logb.o s_logbf.o s_lrint.o s_lrintf.o \
|
||||||
s_lround.o s_lroundf.o s_lroundl.o s_modff.o \
|
s_lround.o s_lroundf.o s_lroundl.o s_modf.o s_modff.o \
|
||||||
s_nan.o s_nearbyint.o s_nextafter.o s_nextafterf.o \
|
s_nan.o s_nearbyint.o s_nextafter.o s_nextafterf.o \
|
||||||
s_nexttowardf.o s_remquo.o s_remquof.o \
|
s_nexttowardf.o s_remquo.o s_remquof.o \
|
||||||
s_rint.o s_rintf.o s_round.o s_roundf.o s_roundl.o \
|
s_rint.o s_rintf.o s_round.o s_roundf.o s_roundl.o \
|
||||||
s_scalbln.o s_scalbn.o s_signbit.o \
|
s_scalbln.o s_scalbn.o s_scalbnf.o s_signbit.o \
|
||||||
s_signgam.o s_significand.o s_significandf.o s_sin.o s_sinf.o \
|
s_signgam.o s_significand.o s_significandf.o s_sin.o s_sinf.o \
|
||||||
s_tan.o s_tanf.o s_tanh.o s_tanhf.o s_tgammaf.o s_trunc.o s_truncf.o \
|
s_tan.o s_tanf.o s_tanh.o s_tanhf.o s_tgammaf.o s_trunc.o s_truncf.o \
|
||||||
w_cabs.o w_cabsf.o w_drem.o w_dremf.o
|
w_cabs.o w_cabsf.o w_drem.o w_dremf.o
|
||||||
|
@ -44,7 +44,7 @@ SRCS+= e_acosl.o e_asinl.o e_atan2l.o e_fmodl.o \
|
||||||
s_frexpl.o s_logbl.o s_nexttoward.o \
|
s_frexpl.o s_logbl.o s_nexttoward.o \
|
||||||
s_remquol.o \
|
s_remquol.o \
|
||||||
s_sinl.o s_tanl.o s_truncl.o w_cabsl.o \
|
s_sinl.o s_tanl.o s_truncl.o w_cabsl.o \
|
||||||
s_scalbnf.o s_nextafterl.o s_rintl.o s_scalbnl.o
|
s_nextafterl.o s_rintl.o s_scalbnl.o
|
||||||
|
|
||||||
# C99 complex functions
|
# C99 complex functions
|
||||||
SRCS+= s_ccosh.o s_ccoshf.o s_cexp.o s_cexpf.o \
|
SRCS+= s_ccosh.o s_ccoshf.o s_cexp.o s_cexpf.o \
|
||||||
|
@ -53,11 +53,4 @@ SRCS+= s_ccosh.o s_ccoshf.o s_cexp.o s_cexpf.o \
|
||||||
s_cproj.o s_cprojf.o s_creal.o s_crealf.o s_creall.o \
|
s_cproj.o s_cprojf.o s_creal.o s_crealf.o s_creall.o \
|
||||||
s_csinh.o s_csinhf.o s_ctanh.o s_ctanhf.o
|
s_csinh.o s_csinhf.o s_ctanh.o s_ctanhf.o
|
||||||
|
|
||||||
# FreeBSD's C library supplies these functions. Need to build them in openlibm.
|
|
||||||
#SRCS+= s_fabs.o s_frexp.o s_ldexp.o s_modf.o
|
|
||||||
|
|
||||||
# These do not yet compile
|
|
||||||
#SRCS+= b_exp.o b_log.o b_tgamma.o fenv.o s_isnan.o \
|
|
||||||
s_exp2l.o s_nanl.o
|
|
||||||
|
|
||||||
all: $(SRCS)
|
all: $(SRCS)
|
||||||
|
|
|
@ -32,6 +32,10 @@
|
||||||
|
|
||||||
#include "fpmath.h"
|
#include "fpmath.h"
|
||||||
|
|
||||||
|
//VBS
|
||||||
|
#include "math_private.h"
|
||||||
|
|
||||||
|
|
||||||
#if LDBL_MAX_EXP != 0x4000
|
#if LDBL_MAX_EXP != 0x4000
|
||||||
/* We also require the usual bias, min exp and expsign packing. */
|
/* We also require the usual bias, min exp and expsign packing. */
|
||||||
#error "Unsupported long double format"
|
#error "Unsupported long double format"
|
||||||
|
|
Loading…
Reference in a new issue