* commit '6cdd33db4ad73f337530d2be33532f005a114c57': Use -fvisibility=hidden to build libm.
This commit is contained in:
commit
b854440098
@ -239,6 +239,7 @@ libm_common_cflags := \
|
|||||||
-Wno-sign-compare \
|
-Wno-sign-compare \
|
||||||
-Wno-uninitialized \
|
-Wno-uninitialized \
|
||||||
-Wno-unknown-pragmas \
|
-Wno-unknown-pragmas \
|
||||||
|
-fvisibility=hidden \
|
||||||
|
|
||||||
libm_common_includes := $(LOCAL_PATH)/upstream-freebsd/lib/msun/src/
|
libm_common_includes := $(LOCAL_PATH)/upstream-freebsd/lib/msun/src/
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include <machine/fenv.h>
|
#include <machine/fenv.h>
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
#pragma GCC visibility push(default)
|
||||||
|
|
||||||
int feclearexcept(int);
|
int feclearexcept(int);
|
||||||
int fegetexceptflag(fexcept_t *, int);
|
int fegetexceptflag(fexcept_t *, int);
|
||||||
@ -64,6 +65,7 @@ int fegetexcept(void);
|
|||||||
extern const fenv_t __fe_dfl_env;
|
extern const fenv_t __fe_dfl_env;
|
||||||
#define FE_DFL_ENV (&__fe_dfl_env)
|
#define FE_DFL_ENV (&__fe_dfl_env)
|
||||||
|
|
||||||
|
#pragma GCC visibility pop
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
#endif /* ! _FENV_H_ */
|
#endif /* ! _FENV_H_ */
|
||||||
|
@ -20,6 +20,9 @@
|
|||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
|
__BEGIN_DECLS
|
||||||
|
#pragma GCC visibility push(default)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ANSI/POSIX
|
* ANSI/POSIX
|
||||||
*/
|
*/
|
||||||
@ -165,7 +168,7 @@ extern int signgam;
|
|||||||
* effect of raising floating-point exceptions, so they are not declared
|
* effect of raising floating-point exceptions, so they are not declared
|
||||||
* as __pure2. In C99, FENV_ACCESS affects the purity of these functions.
|
* as __pure2. In C99, FENV_ACCESS affects the purity of these functions.
|
||||||
*/
|
*/
|
||||||
__BEGIN_DECLS
|
|
||||||
/*
|
/*
|
||||||
* ANSI/POSIX
|
* ANSI/POSIX
|
||||||
*/
|
*/
|
||||||
@ -282,6 +285,7 @@ double trunc(double);
|
|||||||
double drem(double, double);
|
double drem(double, double);
|
||||||
int finite(double) __pure2;
|
int finite(double) __pure2;
|
||||||
int isnanf(float) __pure2;
|
int isnanf(float) __pure2;
|
||||||
|
long double significandl(long double);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reentrant version of gamma & lgamma; passes signgam back by reference
|
* Reentrant version of gamma & lgamma; passes signgam back by reference
|
||||||
@ -464,6 +468,7 @@ void sincosf(float, float*, float*);
|
|||||||
void sincosl(long double, long double*, long double*);
|
void sincosl(long double, long double*, long double*);
|
||||||
#endif /* _GNU_SOURCE */
|
#endif /* _GNU_SOURCE */
|
||||||
|
|
||||||
|
#pragma GCC visibility pop
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
#endif /* !_MATH_H_ */
|
#endif /* !_MATH_H_ */
|
||||||
|
@ -1067,8 +1067,6 @@ TEST(math, significandf) {
|
|||||||
ASSERT_FLOAT_EQ(1.5375f, significandf(12.3f));
|
ASSERT_FLOAT_EQ(1.5375f, significandf(12.3f));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" long double significandl(long double); // BSD's <math.h> doesn't declare this.
|
|
||||||
|
|
||||||
TEST(math, significandl) {
|
TEST(math, significandl) {
|
||||||
ASSERT_DOUBLE_EQ(0.0L, significandl(0.0L));
|
ASSERT_DOUBLE_EQ(0.0L, significandl(0.0L));
|
||||||
ASSERT_DOUBLE_EQ(1.2L, significandl(1.2L));
|
ASSERT_DOUBLE_EQ(1.2L, significandl(1.2L));
|
||||||
|
Loading…
Reference in New Issue
Block a user