From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id 2C9563857C51; Tue, 25 Jan 2022 01:00:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C9563857C51 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: powerpc: move libc machine list to Makefile X-Act-Checkin: newlib-cygwin X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: 2e9aa5f56cc26a411014a7f788423c670cfb5646 X-Git-Newrev: 5dc4e2089afdc0f21792e32bb4ba408e001106d5 Message-Id: <20220125010037.2C9563857C51@sourceware.org> Date: Tue, 25 Jan 2022 01:00:37 +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: Tue, 25 Jan 2022 01:00:37 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D5dc4e2089af= dc0f21792e32bb4ba408e001106d5 commit 5dc4e2089afdc0f21792e32bb4ba408e001106d5 Author: Mike Frysinger Date: Sun Jan 23 00:19:08 2022 -0500 newlib: powerpc: move libc machine list to Makefile =20 This makes the makefile logic a bit cleaner so we don't have two files maintaining lists of sources & objects. Since the logic is tied to cpu capabilities, past those boolean settings down from the configure logic to the makefile logic. =20 This will also make it easier to throw away the configure script in a follow up commit and just keep the makefile. Diff: --- newlib/libc/machine/powerpc/Makefile.am | 35 ++++++++++++++++++++++++++-- newlib/libc/machine/powerpc/Makefile.in | 34 +++++++++++++++++++++++++--- newlib/libc/machine/powerpc/configure | 39 +++++++++++++++++++++++++---= ---- newlib/libc/machine/powerpc/configure.ac | 14 +++++------- 4 files changed, 101 insertions(+), 21 deletions(-) diff --git a/newlib/libc/machine/powerpc/Makefile.am b/newlib/libc/machine/= powerpc/Makefile.am index e8a0f8fa0..cb046334e 100644 --- a/newlib/libc/machine/powerpc/Makefile.am +++ b/newlib/libc/machine/powerpc/Makefile.am @@ -10,8 +10,39 @@ AM_CFLAGS =3D -I $(srcdir)/../../stdio -I $(srcdir)/../.= ./stdlib =20 lib_a_SOURCES =3D setjmp.S lib_a_CFLAGS=3D$(AM_CFLAGS) -lib_a_LIBADD =3D @extra_objs@ -lib_a_DEPENDENCIES =3D @extra_objs@ +lib_a_LIBADD =3D +if HAVE_POWERPC_ALTIVEC +lib_a_LIBADD +=3D \ + lib_a-vfprintf.o \ + lib_a-vfscanf.o \ + lib_a-vec_malloc.o \ + lib_a-vec_calloc.o \ + lib_a-vec_free.o \ + lib_a-vec_realloc.o \ + lib_a-vec_mallocr.o \ + lib_a-vec_callocr.o \ + lib_a-vec_reallocr.o +endif +if HAVE_POWERPC_SPE +lib_a_LIBADD +=3D \ + lib_a-atosfix16.o \ + lib_a-atosfix32.o \ + lib_a-atosfix64.o \ + lib_a-atoufix16.o \ + lib_a-atoufix32.o \ + lib_a-atoufix64.o \ + lib_a-simdldtoa.o \ + lib_a-strtosfix16.o \ + lib_a-strtosfix32.o \ + lib_a-strtosfix64.o \ + lib_a-strtoufix16.o \ + lib_a-strtoufix32.o \ + lib_a-strtoufix64.o \ + lib_a-ufix64toa.o \ + lib_a-vfprintf.o \ + lib_a-vfscanf.o +endif +lib_a_DEPENDENCIES =3D $(lib_a_LIBADD) EXTRA_lib_a_SOURCES =3D \ vfprintf.c vfscanf.c \ vec_malloc.c vec_calloc.c vec_free.c vec_realloc.c vec_mallocr.c \ diff --git a/newlib/libc/machine/powerpc/Makefile.in b/newlib/libc/machine/= powerpc/Makefile.in index a4de0cd18..b2a18bb70 100644 --- a/newlib/libc/machine/powerpc/Makefile.in +++ b/newlib/libc/machine/powerpc/Makefile.in @@ -88,6 +88,35 @@ PRE_UNINSTALL =3D : POST_UNINSTALL =3D : build_triplet =3D @build@ host_triplet =3D @host@ +@HAVE_POWERPC_ALTIVEC_TRUE@am__append_1 =3D \ +@HAVE_POWERPC_ALTIVEC_TRUE@ lib_a-vfprintf.o \ +@HAVE_POWERPC_ALTIVEC_TRUE@ lib_a-vfscanf.o \ +@HAVE_POWERPC_ALTIVEC_TRUE@ lib_a-vec_malloc.o \ +@HAVE_POWERPC_ALTIVEC_TRUE@ lib_a-vec_calloc.o \ +@HAVE_POWERPC_ALTIVEC_TRUE@ lib_a-vec_free.o \ +@HAVE_POWERPC_ALTIVEC_TRUE@ lib_a-vec_realloc.o \ +@HAVE_POWERPC_ALTIVEC_TRUE@ lib_a-vec_mallocr.o \ +@HAVE_POWERPC_ALTIVEC_TRUE@ lib_a-vec_callocr.o \ +@HAVE_POWERPC_ALTIVEC_TRUE@ lib_a-vec_reallocr.o + +@HAVE_POWERPC_SPE_TRUE@am__append_2 =3D \ +@HAVE_POWERPC_SPE_TRUE@ lib_a-atosfix16.o \ +@HAVE_POWERPC_SPE_TRUE@ lib_a-atosfix32.o \ +@HAVE_POWERPC_SPE_TRUE@ lib_a-atosfix64.o \ +@HAVE_POWERPC_SPE_TRUE@ lib_a-atoufix16.o \ +@HAVE_POWERPC_SPE_TRUE@ lib_a-atoufix32.o \ +@HAVE_POWERPC_SPE_TRUE@ lib_a-atoufix64.o \ +@HAVE_POWERPC_SPE_TRUE@ lib_a-simdldtoa.o \ +@HAVE_POWERPC_SPE_TRUE@ lib_a-strtosfix16.o \ +@HAVE_POWERPC_SPE_TRUE@ lib_a-strtosfix32.o \ +@HAVE_POWERPC_SPE_TRUE@ lib_a-strtosfix64.o \ +@HAVE_POWERPC_SPE_TRUE@ lib_a-strtoufix16.o \ +@HAVE_POWERPC_SPE_TRUE@ lib_a-strtoufix32.o \ +@HAVE_POWERPC_SPE_TRUE@ lib_a-strtoufix64.o \ +@HAVE_POWERPC_SPE_TRUE@ lib_a-ufix64toa.o \ +@HAVE_POWERPC_SPE_TRUE@ lib_a-vfprintf.o \ +@HAVE_POWERPC_SPE_TRUE@ lib_a-vfscanf.o + subdir =3D . ACLOCAL_M4 =3D $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps =3D $(top_srcdir)/../../../../config/depstand.m4 \ @@ -245,7 +274,6 @@ datarootdir =3D @datarootdir@ docdir =3D @docdir@ dvidir =3D @dvidir@ exec_prefix =3D @exec_prefix@ -extra_objs =3D @extra_objs@ host =3D @host@ host_alias =3D @host_alias@ host_cpu =3D @host_cpu@ @@ -287,8 +315,8 @@ noinst_LIBRARIES =3D lib.a AM_CFLAGS =3D -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib lib_a_SOURCES =3D setjmp.S lib_a_CFLAGS =3D $(AM_CFLAGS) -lib_a_LIBADD =3D @extra_objs@ -lib_a_DEPENDENCIES =3D @extra_objs@ +lib_a_LIBADD =3D $(am__append_1) $(am__append_2) +lib_a_DEPENDENCIES =3D $(lib_a_LIBADD) EXTRA_lib_a_SOURCES =3D \ vfprintf.c vfscanf.c \ vec_malloc.c vec_calloc.c vec_free.c vec_realloc.c vec_mallocr.c \ diff --git a/newlib/libc/machine/powerpc/configure b/newlib/libc/machine/po= werpc/configure index cbb87a892..6c88ac582 100755 --- a/newlib/libc/machine/powerpc/configure +++ b/newlib/libc/machine/powerpc/configure @@ -584,7 +584,10 @@ PACKAGE_URL=3D'' ac_unique_file=3D"setjmp.S" ac_subst_vars=3D'LTLIBOBJS LIBOBJS -extra_objs +HAVE_POWERPC_SPE_FALSE +HAVE_POWERPC_SPE_TRUE +HAVE_POWERPC_ALTIVEC_FALSE +HAVE_POWERPC_ALTIVEC_TRUE sys_dir shared_machine_dir machine_dir @@ -3607,15 +3610,27 @@ OBJEXT=3D${oext} =20 =20 =20 -extra_objs=3D +HAVE_POWERPC_ALTIVEC=3Dno +HAVE_POWERPC_SPE=3Dno case $host in - powerpc*-*altivec*) - extra_objs=3D"lib_a-vfprintf.o lib_a-vfscanf.o lib_a-vec_malloc.o lib_a-v= ec_calloc.o lib_a-vec_free.o lib_a-vec_realloc.o lib_a-vec_mallocr.o lib_a-= vec_callocr.o lib_a-vec_reallocr.o" - ;; - powerpc*-*spe*) - extra_objs=3D"lib_a-atosfix16.o lib_a-atosfix32.o lib_a-atosfix64.o lib_a= -atoufix16.o lib_a-atoufix32.o lib_a-atoufix64.o lib_a-simdldtoa.o lib_a-st= rtosfix16.o lib_a-strtosfix32.o lib_a-strtosfix64.o lib_a-strtoufix16.o lib= _a-strtoufix32.o lib_a-strtoufix64.o lib_a-ufix64toa.o lib_a-vfprintf.o lib= _a-vfscanf.o" - ;; + powerpc*-*altivec*) HAVE_POWERPC_ALTIVEC=3Dyes ;; + powerpc*-*spe*) HAVE_POWERPC_SPE=3Dyes ;; esac + if test "$HAVE_POWERPC_ALTIVEC" =3D yes; then + HAVE_POWERPC_ALTIVEC_TRUE=3D + HAVE_POWERPC_ALTIVEC_FALSE=3D'#' +else + HAVE_POWERPC_ALTIVEC_TRUE=3D'#' + HAVE_POWERPC_ALTIVEC_FALSE=3D +fi + + if test "$HAVE_POWERPC_SPE" =3D yes; then + HAVE_POWERPC_SPE_TRUE=3D + HAVE_POWERPC_SPE_FALSE=3D'#' +else + HAVE_POWERPC_SPE_TRUE=3D'#' + HAVE_POWERPC_SPE_FALSE=3D +fi =20 =20 ac_config_files=3D"$ac_config_files Makefile" @@ -3818,6 +3833,14 @@ if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_L= IBTOOL_FALSE}"; then as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_POWERPC_ALTIVEC_TRUE}" && test -z "${HAVE_POWERPC_ALTIV= EC_FALSE}"; then + as_fn_error $? "conditional \"HAVE_POWERPC_ALTIVEC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_POWERPC_SPE_TRUE}" && test -z "${HAVE_POWERPC_SPE_FALSE= }"; then + as_fn_error $? "conditional \"HAVE_POWERPC_SPE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi =20 : "${CONFIG_STATUS=3D./config.status}" ac_write_fail=3D0 diff --git a/newlib/libc/machine/powerpc/configure.ac b/newlib/libc/machine= /powerpc/configure.ac index e86ac6efb..fca0dd197 100644 --- a/newlib/libc/machine/powerpc/configure.ac +++ b/newlib/libc/machine/powerpc/configure.ac @@ -9,16 +9,14 @@ AC_CONFIG_AUX_DIR(../../../..) =20 NEWLIB_CONFIGURE(../../..) =20 -extra_objs=3D +HAVE_POWERPC_ALTIVEC=3Dno +HAVE_POWERPC_SPE=3Dno case $host in - powerpc*-*altivec*) - extra_objs=3D"lib_a-vfprintf.o lib_a-vfscanf.o lib_a-vec_malloc.o lib_a-v= ec_calloc.o lib_a-vec_free.o lib_a-vec_realloc.o lib_a-vec_mallocr.o lib_a-= vec_callocr.o lib_a-vec_reallocr.o" - ;; - powerpc*-*spe*) - extra_objs=3D"lib_a-atosfix16.o lib_a-atosfix32.o lib_a-atosfix64.o lib_a= -atoufix16.o lib_a-atoufix32.o lib_a-atoufix64.o lib_a-simdldtoa.o lib_a-st= rtosfix16.o lib_a-strtosfix32.o lib_a-strtosfix64.o lib_a-strtoufix16.o lib= _a-strtoufix32.o lib_a-strtoufix64.o lib_a-ufix64toa.o lib_a-vfprintf.o lib= _a-vfscanf.o" - ;; + powerpc*-*altivec*) HAVE_POWERPC_ALTIVEC=3Dyes ;; + powerpc*-*spe*) HAVE_POWERPC_SPE=3Dyes ;; esac -AC_SUBST(extra_objs) +AM_CONDITIONAL(HAVE_POWERPC_ALTIVEC, [test "$HAVE_POWERPC_ALTIVEC" =3D yes= ]) +AM_CONDITIONAL(HAVE_POWERPC_SPE, [test "$HAVE_POWERPC_SPE" =3D yes]) =20 AC_CONFIG_FILES([Makefile]) AC_OUTPUT