Browse Source

newlib: Build internal strtold code only if HAVE_LONG_DOUBLE defined

Commit fbace81684
("Import correctly working strtold from David M. Gay.")
introduced two new files, strtorx.c and strtodg.c.  The functions
are only called from strtold.c.  However, while strtold.c is only
built if HAVE_LONG_DOUBLE is defined, the patch erroneously added
the two new files to GENERAL_SOURCES unconditionally.

Fix this by building both files only if HAVE_LONG_DOUBLE has been
defined.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
sh3port
Corinna Vinschen 3 years ago
parent
commit
256f1171ac
  1. 6
      newlib/libc/stdlib/Makefile.am
  2. 11
      newlib/libc/stdlib/Makefile.in

6
newlib/libc/stdlib/Makefile.am

@ -58,10 +58,8 @@ GENERAL_SOURCES = \
reallocf.c \
sb_charsets.c \
strtod.c \
strtodg.c \
strtoimax.c \
strtol.c \
strtorx.c \
strtoul.c \
strtoumax.c \
utoa.c \
@ -77,7 +75,9 @@ GENERAL_SOURCES = \
if HAVE_LONG_DOUBLE
GENERAL_SOURCES += \
strtold.c \
strtodg.c \
strtold.c \
strtorx.c \
wcstold.c
endif # HAVE_LONG_DOUBLE

11
newlib/libc/stdlib/Makefile.in

@ -154,7 +154,8 @@ am__objects_6 = lib_a-rpmatch.$(OBJEXT) lib_a-system.$(OBJEXT)
@USE_LIBTOOL_FALSE@ $(am__objects_3) $(am__objects_7)
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
LTLIBRARIES = $(noinst_LTLIBRARIES)
@HAVE_LONG_DOUBLE_TRUE@am__objects_8 = strtold.lo wcstold.lo
@HAVE_LONG_DOUBLE_TRUE@am__objects_8 = strtodg.lo strtold.lo strtorx.lo \
wcstold.lo
am__objects_9 = __adjust.lo __atexit.lo __call_atexit.lo __exp10.lo \
__ten_mu.lo _Exit.lo abort.lo abs.lo aligned_alloc.lo \
assert.lo atexit.lo atof.lo atoff.lo atoi.lo atol.lo calloc.lo \
@ -165,10 +166,10 @@ am__objects_9 = __adjust.lo __atexit.lo __call_atexit.lo __exp10.lo \
mbtowc.lo mbtowc_r.lo mlock.lo mprec.lo mstats.lo \
on_exit_args.lo quick_exit.lo rand.lo rand_r.lo random.lo \
realloc.lo reallocarray.lo reallocf.lo sb_charsets.lo \
strtod.lo strtodg.lo strtoimax.lo strtol.lo strtorx.lo \
strtoul.lo strtoumax.lo utoa.lo wcstod.lo wcstoimax.lo \
wcstol.lo wcstoul.lo wcstoumax.lo wcstombs.lo wcstombs_r.lo \
wctomb.lo wctomb_r.lo $(am__objects_8)
strtod.lo strtoimax.lo strtol.lo strtoul.lo strtoumax.lo \
utoa.lo wcstod.lo wcstoimax.lo wcstol.lo wcstoul.lo \
wcstoumax.lo wcstombs.lo wcstombs_r.lo wctomb.lo wctomb_r.lo \
$(am__objects_8)
am__objects_10 = arc4random.lo arc4random_uniform.lo cxa_atexit.lo \
cxa_finalize.lo drand48.lo ecvtbuf.lo efgcvt.lo erand48.lo \
jrand48.lo lcong48.lo lrand48.lo mrand48.lo msize.lo mtrim.lo \

Loading…
Cancel
Save