From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id 5D5E33858D37; Wed, 9 Feb 2022 00:09:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D5E33858D37 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Frysinger To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] newlib: simplify nds32 automake checks X-Act-Checkin: newlib-cygwin X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: 8fff0aac0ac4c21569cff1204c5085ff501cebe6 X-Git-Newrev: 953ba1e6d1cc146113b42a56b8c3ec412d9d4873 Message-Id: <20220209000916.5D5E33858D37@sourceware.org> Date: Wed, 9 Feb 2022 00:09:16 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Feb 2022 00:09:16 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D953ba1e6d1c= c146113b42a56b8c3ec412d9d4873 commit 953ba1e6d1cc146113b42a56b8c3ec412d9d4873 Author: Mike Frysinger Date: Mon Feb 7 01:15:00 2022 -0500 newlib: simplify nds32 automake checks =20 This code is a bit more convoluted than it needs to be. GPR_SOURCES is never set to anything, and the automake checks use negative logic to add the SP & DP source files to dedicated variables that are only expanded once. Get rid of the unused variable, use normal boolean logic, and collapse the source settings into a single variable. Diff: --- newlib/libm/machine/nds32/Makefile.am | 17 +++++++---------- newlib/libm/machine/nds32/Makefile.in | 18 ++++++++---------- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/newlib/libm/machine/nds32/Makefile.am b/newlib/libm/machine/nd= s32/Makefile.am index 6e63d1aa8..8ce9350c4 100644 --- a/newlib/libm/machine/nds32/Makefile.am +++ b/newlib/libm/machine/nds32/Makefile.am @@ -3,21 +3,18 @@ AM_CPPFLAGS =3D -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \ $(CROSS_CFLAGS) $(TARGET_CFLAGS) =20 -if HAS_NDS32_FPU_SP_FALSE -GPR_SOURCES =3D -else -FPU_SP_SOURCES =3D wf_sqrt.S -endif +src =3D =20 -if HAS_NDS32_FPU_DP_FALSE -else -FPU_DP_SOURCES =3D w_sqrt.S +if HAS_NDS32_FPU_SP +src +=3D wf_sqrt.S endif =20 -LIB_SOURCES =3D $(GPR_SOURCES) $(FPU_SP_SOURCES) $(FPU_DP_SOURCES) +if HAS_NDS32_FPU_DP +src +=3D w_sqrt.S +endif =20 noinst_LIBRARIES =3D lib.a -lib_a_SOURCES =3D $(LIB_SOURCES) +lib_a_SOURCES =3D $(src) lib_a_CFLAGS =3D $(AM_CFLAGS) noinst_DATA =3D =20 diff --git a/newlib/libm/machine/nds32/Makefile.in b/newlib/libm/machine/nd= s32/Makefile.in index f26a071c5..d2febe5e7 100644 --- a/newlib/libm/machine/nds32/Makefile.in +++ b/newlib/libm/machine/nds32/Makefile.in @@ -89,6 +89,8 @@ PRE_UNINSTALL =3D : POST_UNINSTALL =3D : build_triplet =3D @build@ host_triplet =3D @host@ +@HAS_NDS32_FPU_SP_TRUE@am__append_1 =3D wf_sqrt.S +@HAS_NDS32_FPU_DP_TRUE@am__append_2 =3D w_sqrt.S subdir =3D machine/nds32 ACLOCAL_M4 =3D $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps =3D $(top_srcdir)/../../config/depstand.m4 \ @@ -116,11 +118,10 @@ am__v_AR_0 =3D @echo " AR " $@; am__v_AR_1 =3D=20 lib_a_AR =3D $(AR) $(ARFLAGS) lib_a_LIBADD =3D -am__objects_1 =3D -@HAS_NDS32_FPU_SP_TRUE@am__objects_2 =3D wf_sqrt.$(OBJEXT) -@HAS_NDS32_FPU_DP_TRUE@am__objects_3 =3D w_sqrt.$(OBJEXT) -am__objects_4 =3D $(am__objects_1) $(am__objects_2) $(am__objects_3) -am_lib_a_OBJECTS =3D $(am__objects_4) +@HAS_NDS32_FPU_SP_TRUE@am__objects_1 =3D wf_sqrt.$(OBJEXT) +@HAS_NDS32_FPU_DP_TRUE@am__objects_2 =3D w_sqrt.$(OBJEXT) +am__objects_3 =3D $(am__objects_1) $(am__objects_2) +am_lib_a_OBJECTS =3D $(am__objects_3) lib_a_OBJECTS =3D $(am_lib_a_OBJECTS) AM_V_P =3D $(am__v_P_@AM_V@) am__v_P_ =3D $(am__v_P_@AM_DEFAULT_V@) @@ -328,12 +329,9 @@ top_srcdir =3D @top_srcdir@ AM_CPPFLAGS =3D -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \ $(CROSS_CFLAGS) $(TARGET_CFLAGS) =20 -@HAS_NDS32_FPU_SP_FALSE@GPR_SOURCES =3D=20 -@HAS_NDS32_FPU_SP_TRUE@FPU_SP_SOURCES =3D wf_sqrt.S -@HAS_NDS32_FPU_DP_TRUE@FPU_DP_SOURCES =3D w_sqrt.S -LIB_SOURCES =3D $(GPR_SOURCES) $(FPU_SP_SOURCES) $(FPU_DP_SOURCES) +src =3D $(am__append_1) $(am__append_2) noinst_LIBRARIES =3D lib.a -lib_a_SOURCES =3D $(LIB_SOURCES) +lib_a_SOURCES =3D $(src) lib_a_CFLAGS =3D $(AM_CFLAGS) noinst_DATA =3D=20 all: all-am