Closed atrosinenko closed 11 months ago
When compiling master branch of mainline newlib taken from git://sourceware.org/git/newlib-cygwin.git, some errors occurred:
master
newlib
git://sourceware.org/git/newlib-cygwin.git
clang
-mOs
msp430-elf-gcc
lrintl
lroundl
With the following patch applied, I have compiled it successfully:
diff --git a/newlib/configure.host b/newlib/configure.host index a84c0c80a..8cbf50eb3 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -263,7 +263,7 @@ case "${host_cpu}" in msp430*) newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY" newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections " - newlib_cflags="${newlib_cflags} -mOs " +# newlib_cflags="${newlib_cflags} -mOs " newlib_cflags="${newlib_cflags} -mhwmult=none " machine_dir=msp430 default_newlib_nano_malloc="yes" diff --git a/newlib/libm/common/lrintl.c b/newlib/libm/common/lrintl.c index 67c46384a..21cb90c14 100644 --- a/newlib/libm/common/lrintl.c +++ b/newlib/libm/common/lrintl.c @@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE. long int lrintl (long double x) { - return lrint(x); + return 0 /*lrint(x)*/; } #endif diff --git a/newlib/libm/common/lroundl.c b/newlib/libm/common/lroundl.c index 868752292..536a90b74 100644 --- a/newlib/libm/common/lroundl.c +++ b/newlib/libm/common/lroundl.c @@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE. long lroundl (long double x) { - return lround(x); + return 0 /*lround(x)*/; } #endif
There exists identical issue access-softek/msp430-clang#11.
When compiling
master
branch of mainlinenewlib
taken fromgit://sourceware.org/git/newlib-cygwin.git
, some errors occurred:clang
driver does not handle the-mOs
command line option that is supported bymsp430-elf-gcc
(see #14)lrintl
(see #9): ExpandIntegerResult #0: t13: i32 = lrint t12lroundl
(see #13): ExpandIntegerResult #0: t13: i32 = lround t12With the following patch applied, I have compiled it successfully: