am 6cdd33db: am 509348b8: am c4794a74: Merge "Use -fvisibility=hidden to build libm."

* commit '6cdd33db4ad73f337530d2be33532f005a114c57':
  Use -fvisibility=hidden to build libm.
This commit is contained in:
Elliott Hughes 2014-05-20 00:58:00 +00:00 committed by Android Git Automerger
commit b854440098
4 changed files with 9 additions and 3 deletions

View File

@ -239,6 +239,7 @@ libm_common_cflags := \
-Wno-sign-compare \
-Wno-uninitialized \
-Wno-unknown-pragmas \
-fvisibility=hidden \
libm_common_includes := $(LOCAL_PATH)/upstream-freebsd/lib/msun/src/

View File

@ -34,6 +34,7 @@
#include <machine/fenv.h>
__BEGIN_DECLS
#pragma GCC visibility push(default)
int feclearexcept(int);
int fegetexceptflag(fexcept_t *, int);
@ -64,6 +65,7 @@ int fegetexcept(void);
extern const fenv_t __fe_dfl_env;
#define FE_DFL_ENV (&__fe_dfl_env)
#pragma GCC visibility pop
__END_DECLS
#endif /* ! _FENV_H_ */

View File

@ -20,6 +20,9 @@
#include <sys/cdefs.h>
#include <limits.h>
__BEGIN_DECLS
#pragma GCC visibility push(default)
/*
* ANSI/POSIX
*/
@ -165,7 +168,7 @@ extern int signgam;
* effect of raising floating-point exceptions, so they are not declared
* as __pure2. In C99, FENV_ACCESS affects the purity of these functions.
*/
__BEGIN_DECLS
/*
* ANSI/POSIX
*/
@ -282,6 +285,7 @@ double trunc(double);
double drem(double, double);
int finite(double) __pure2;
int isnanf(float) __pure2;
long double significandl(long double);
/*
* 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*);
#endif /* _GNU_SOURCE */
#pragma GCC visibility pop
__END_DECLS
#endif /* !_MATH_H_ */

View File

@ -1067,8 +1067,6 @@ TEST(math, significandf) {
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) {
ASSERT_DOUBLE_EQ(0.0L, significandl(0.0L));
ASSERT_DOUBLE_EQ(1.2L, significandl(1.2L));