From 256f1171acb7b03afd33203d83fac4cc1536df1a Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 10 Oct 2018 18:01:22 +0200 Subject: [PATCH] newlib: Build internal strtold code only if HAVE_LONG_DOUBLE defined Commit fbace81684f8cbb80a2048c01dc545af247f5cb7 ("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 --- newlib/libc/stdlib/Makefile.am | 6 +++--- newlib/libc/stdlib/Makefile.in | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/newlib/libc/stdlib/Makefile.am b/newlib/libc/stdlib/Makefile.am index f9bab0b64..357e37beb 100644 --- a/newlib/libc/stdlib/Makefile.am +++ b/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 diff --git a/newlib/libc/stdlib/Makefile.in b/newlib/libc/stdlib/Makefile.in index 49e4c5f85..1da271af3 100644 --- a/newlib/libc/stdlib/Makefile.in +++ b/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 \