4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-31 11:30:56 +08:00

newlib: powerpc: move libc machine list to Makefile

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.

This will also make it easier to throw away the configure script
in a follow up commit and just keep the makefile.
This commit is contained in:
Mike Frysinger 2022-01-23 00:19:08 -05:00
parent 2e9aa5f56c
commit 5dc4e2089a
4 changed files with 101 additions and 21 deletions

View File

@ -10,8 +10,39 @@ AM_CFLAGS = -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib
lib_a_SOURCES = setjmp.S
lib_a_CFLAGS=$(AM_CFLAGS)
lib_a_LIBADD = @extra_objs@
lib_a_DEPENDENCIES = @extra_objs@
lib_a_LIBADD =
if HAVE_POWERPC_ALTIVEC
lib_a_LIBADD += \
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 += \
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 = $(lib_a_LIBADD)
EXTRA_lib_a_SOURCES = \
vfprintf.c vfscanf.c \
vec_malloc.c vec_calloc.c vec_free.c vec_realloc.c vec_mallocr.c \

View File

@ -88,6 +88,35 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@HAVE_POWERPC_ALTIVEC_TRUE@am__append_1 = \
@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 = \
@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 = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../../../config/depstand.m4 \
@ -245,7 +274,6 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
extra_objs = @extra_objs@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@ -287,8 +315,8 @@ noinst_LIBRARIES = lib.a
AM_CFLAGS = -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib
lib_a_SOURCES = setjmp.S
lib_a_CFLAGS = $(AM_CFLAGS)
lib_a_LIBADD = @extra_objs@
lib_a_DEPENDENCIES = @extra_objs@
lib_a_LIBADD = $(am__append_1) $(am__append_2)
lib_a_DEPENDENCIES = $(lib_a_LIBADD)
EXTRA_lib_a_SOURCES = \
vfprintf.c vfscanf.c \
vec_malloc.c vec_calloc.c vec_free.c vec_realloc.c vec_mallocr.c \

View File

@ -584,7 +584,10 @@ PACKAGE_URL=''
ac_unique_file="setjmp.S"
ac_subst_vars='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=${oext}
extra_objs=
HAVE_POWERPC_ALTIVEC=no
HAVE_POWERPC_SPE=no
case $host in
powerpc*-*altivec*)
extra_objs="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"
;;
powerpc*-*spe*)
extra_objs="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"
;;
powerpc*-*altivec*) HAVE_POWERPC_ALTIVEC=yes ;;
powerpc*-*spe*) HAVE_POWERPC_SPE=yes ;;
esac
if test "$HAVE_POWERPC_ALTIVEC" = yes; then
HAVE_POWERPC_ALTIVEC_TRUE=
HAVE_POWERPC_ALTIVEC_FALSE='#'
else
HAVE_POWERPC_ALTIVEC_TRUE='#'
HAVE_POWERPC_ALTIVEC_FALSE=
fi
if test "$HAVE_POWERPC_SPE" = yes; then
HAVE_POWERPC_SPE_TRUE=
HAVE_POWERPC_SPE_FALSE='#'
else
HAVE_POWERPC_SPE_TRUE='#'
HAVE_POWERPC_SPE_FALSE=
fi
ac_config_files="$ac_config_files Makefile"
@ -3818,6 +3833,14 @@ if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_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_ALTIVEC_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
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0

View File

@ -9,16 +9,14 @@ AC_CONFIG_AUX_DIR(../../../..)
NEWLIB_CONFIGURE(../../..)
extra_objs=
HAVE_POWERPC_ALTIVEC=no
HAVE_POWERPC_SPE=no
case $host in
powerpc*-*altivec*)
extra_objs="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"
;;
powerpc*-*spe*)
extra_objs="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"
;;
powerpc*-*altivec*) HAVE_POWERPC_ALTIVEC=yes ;;
powerpc*-*spe*) HAVE_POWERPC_SPE=yes ;;
esac
AC_SUBST(extra_objs)
AM_CONDITIONAL(HAVE_POWERPC_ALTIVEC, [test "$HAVE_POWERPC_ALTIVEC" = yes])
AM_CONDITIONAL(HAVE_POWERPC_SPE, [test "$HAVE_POWERPC_SPE" = yes])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT