Skip to content

Commit

Permalink
Build with gcc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Viral B. Shah committed Dec 31, 2011
1 parent 33f051a commit f5fb927
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
4 changes: 3 additions & 1 deletion Make.inc
@@ -1,6 +1,8 @@
CC=clang
CC=gcc
CFLAGS=-O2 -fPIC -I. -I../include -I../ld128 -I../src -D__BSD_VISIBLE -Wno-implicit-function-declaration

default: all

%.o: %.c
$(QUIET_CC)$(CC) $(CFLAGS) -c $< -o $@

Expand Down
9 changes: 5 additions & 4 deletions src/Makefile
Expand Up @@ -21,7 +21,7 @@ SRCS= \
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_fminf.o s_fminl.o s_frexp.o s_frexpf.o s_ilogb.o s_ilogbf.o \
s_ilogbl.o s_isfinite.o s_isnormal.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_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 \
Expand All @@ -43,7 +43,8 @@ SRCS+= e_acosl.o e_asinl.o e_atan2l.o e_fmodl.o \
s_csqrtl.o s_floorl.o s_fmal.o \
s_frexpl.o s_logbl.o s_nexttoward.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

# C99 complex functions
SRCS+= s_ccosh.o s_ccoshf.o s_cexp.o s_cexpf.o \
Expand All @@ -53,10 +54,10 @@ SRCS+= s_ccosh.o s_ccoshf.o s_cexp.o s_cexpf.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_isnan.o s_ldexp.o s_modf.o
#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 s_scalbnf.o s_nextafterl.o s_rintl.o s_scalbnl.o \
s_exp2l.o s_nanl.o

all: $(SRCS)
10 changes: 7 additions & 3 deletions src/math_private.h
Expand Up @@ -208,10 +208,13 @@ do { \
(d) = se_u.e; \
} while (0)


//VBS
#define STRICT_ASSIGN(type, lval, rval) ((lval) = (rval))

/* VBS
#ifdef FLT_EVAL_METHOD
/*
* Attempt to get strict C99 semantics for assignment with non-C99 compilers.
*/
// Attempt to get strict C99 semantics for assignment with non-C99 compilers.
#if FLT_EVAL_METHOD == 0 || __GNUC__ == 0
#define STRICT_ASSIGN(type, lval, rval) ((lval) = (rval))
#else
Expand All @@ -227,6 +230,7 @@ do { \
} while (0)
#endif
#endif
*/

/*
* Common routine to process the arguments to nan(), nanf(), and nanl().
Expand Down

0 comments on commit f5fb927

Please sign in to comment.