diff options
-rw-r--r-- | newlib/ChangeLog | 9 | ||||
-rw-r--r-- | newlib/libc/machine/arm/Makefile.am | 18 | ||||
-rw-r--r-- | newlib/libc/machine/arm/Makefile.in | 40 | ||||
-rwxr-xr-x | newlib/libc/machine/arm/configure | 96 | ||||
-rw-r--r-- | newlib/libc/machine/arm/configure.in | 50 | ||||
-rw-r--r-- | newlib/libc/machine/arm/strlen.c | 2 |
6 files changed, 25 insertions, 190 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 74ff481..fcc9154 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,5 +1,14 @@ 2015-11-13 Marcus Shawcroft <marcus.shawcroft@arm.com> + * libc/machine/arm/Makefile.am: Drop STRLEN_SRC and STRLEN_OBJ. + Adding strlen.c. + * libc/machine/arm/configure.in (HAVE_THUMB1, OPT_SIZE): Remove. + * libc/machine/arm/strlen.c: Include ../../string/strlen.c. + * libc/machine/arm/configure: Regenerate. + * libc/machine/arm/Makefile.in: Regenerate. + +2015-11-13 Marcus Shawcroft <marcus.shawcroft@arm.com> + * libc/machine/arm/strlen.c: Refactor nested #if. 2015-11-12 Anton Kolesov <Anton.Kolesov@synopsys.com> diff --git a/newlib/libc/machine/arm/Makefile.am b/newlib/libc/machine/arm/Makefile.am index 3903b53..d920e6e 100644 --- a/newlib/libc/machine/arm/Makefile.am +++ b/newlib/libc/machine/arm/Makefile.am @@ -8,21 +8,7 @@ AM_CCASFLAGS = $(INCLUDES) noinst_LIBRARIES = lib.a -if HAVE_THUMB1 -if OPT_SIZE -STRLEN_SRC=strlen.c -STRLEN_OBJ=$(lpfx)strlen.o -else -STRLEN_SRC= -STRLEN_OBJ= -endif -else -STRLEN_SRC=strlen.c -STRLEN_OBJ=$(lpfx)strlen.o -endif - lib_a_SOURCES = setjmp.S access.c strcmp.S strcpy.c \ - $(STRLEN_SRC) \ strlen-armv7.S aeabi_memcpy.c aeabi_memcpy-armv7a.S \ aeabi_memmove.c aeabi_memmove-soft.S \ aeabi_memset.c aeabi_memset-soft.S aeabi_memclr.c @@ -30,12 +16,10 @@ lib_a_SOURCES += memchr-stub.c lib_a_SOURCES += memchr.S lib_a_SOURCES += memcpy-stub.c lib_a_SOURCES += memcpy.S +lib_a_SOURCES += strlen.c lib_a_CCASFLAGS=$(AM_CCASFLAGS) lib_a_CFLAGS = $(AM_CFLAGS) -lib_a_LIBADD = $(STRLEN_OBJ) - -lib_a_DEPENDENCIES = $(STRLEN_OBJ) ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host diff --git a/newlib/libc/machine/arm/Makefile.in b/newlib/libc/machine/arm/Makefile.in index 7fd375a..87a3591 100644 --- a/newlib/libc/machine/arm/Makefile.in +++ b/newlib/libc/machine/arm/Makefile.in @@ -68,13 +68,9 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru lib_a_AR = $(AR) $(ARFLAGS) -@HAVE_THUMB1_FALSE@am__DEPENDENCIES_1 = $(lpfx)strlen.o -@HAVE_THUMB1_TRUE@@OPT_SIZE_TRUE@am__DEPENDENCIES_1 = $(lpfx)strlen.o -@HAVE_THUMB1_FALSE@am__objects_1 = lib_a-strlen.$(OBJEXT) -@HAVE_THUMB1_TRUE@@OPT_SIZE_TRUE@am__objects_1 = \ -@HAVE_THUMB1_TRUE@@OPT_SIZE_TRUE@ lib_a-strlen.$(OBJEXT) +lib_a_LIBADD = am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) lib_a-access.$(OBJEXT) \ - lib_a-strcmp.$(OBJEXT) lib_a-strcpy.$(OBJEXT) $(am__objects_1) \ + lib_a-strcmp.$(OBJEXT) lib_a-strcpy.$(OBJEXT) \ lib_a-strlen-armv7.$(OBJEXT) lib_a-aeabi_memcpy.$(OBJEXT) \ lib_a-aeabi_memcpy-armv7a.$(OBJEXT) \ lib_a-aeabi_memmove.$(OBJEXT) \ @@ -82,7 +78,7 @@ am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) lib_a-access.$(OBJEXT) \ lib_a-aeabi_memset.$(OBJEXT) lib_a-aeabi_memset-soft.$(OBJEXT) \ lib_a-aeabi_memclr.$(OBJEXT) lib_a-memchr-stub.$(OBJEXT) \ lib_a-memchr.$(OBJEXT) lib_a-memcpy-stub.$(OBJEXT) \ - lib_a-memcpy.$(OBJEXT) + lib_a-memcpy.$(OBJEXT) lib_a-strlen.$(OBJEXT) lib_a_OBJECTS = $(am_lib_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = @@ -209,21 +205,13 @@ AUTOMAKE_OPTIONS = cygnus INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) AM_CCASFLAGS = $(INCLUDES) noinst_LIBRARIES = lib.a -@HAVE_THUMB1_FALSE@STRLEN_SRC = strlen.c -@HAVE_THUMB1_TRUE@@OPT_SIZE_FALSE@STRLEN_SRC = -@HAVE_THUMB1_TRUE@@OPT_SIZE_TRUE@STRLEN_SRC = strlen.c -@HAVE_THUMB1_FALSE@STRLEN_OBJ = $(lpfx)strlen.o -@HAVE_THUMB1_TRUE@@OPT_SIZE_FALSE@STRLEN_OBJ = -@HAVE_THUMB1_TRUE@@OPT_SIZE_TRUE@STRLEN_OBJ = $(lpfx)strlen.o -lib_a_SOURCES = setjmp.S access.c strcmp.S strcpy.c $(STRLEN_SRC) \ - strlen-armv7.S aeabi_memcpy.c aeabi_memcpy-armv7a.S \ - aeabi_memmove.c aeabi_memmove-soft.S aeabi_memset.c \ - aeabi_memset-soft.S aeabi_memclr.c memchr-stub.c memchr.S \ - memcpy-stub.c memcpy.S +lib_a_SOURCES = setjmp.S access.c strcmp.S strcpy.c strlen-armv7.S \ + aeabi_memcpy.c aeabi_memcpy-armv7a.S aeabi_memmove.c \ + aeabi_memmove-soft.S aeabi_memset.c aeabi_memset-soft.S \ + aeabi_memclr.c memchr-stub.c memchr.S memcpy-stub.c memcpy.S \ + strlen.c lib_a_CCASFLAGS = $(AM_CCASFLAGS) lib_a_CFLAGS = $(AM_CFLAGS) -lib_a_LIBADD = $(STRLEN_OBJ) -lib_a_DEPENDENCIES = $(STRLEN_OBJ) ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host MEMCHR_DEP = acle-compat.h arm_asm.h @@ -361,12 +349,6 @@ lib_a-strcpy.o: strcpy.c lib_a-strcpy.obj: strcpy.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strcpy.obj `if test -f 'strcpy.c'; then $(CYGPATH_W) 'strcpy.c'; else $(CYGPATH_W) '$(srcdir)/strcpy.c'; fi` -lib_a-strlen.o: strlen.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strlen.o `test -f 'strlen.c' || echo '$(srcdir)/'`strlen.c - -lib_a-strlen.obj: strlen.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strlen.obj `if test -f 'strlen.c'; then $(CYGPATH_W) 'strlen.c'; else $(CYGPATH_W) '$(srcdir)/strlen.c'; fi` - lib_a-aeabi_memcpy.o: aeabi_memcpy.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-aeabi_memcpy.o `test -f 'aeabi_memcpy.c' || echo '$(srcdir)/'`aeabi_memcpy.c @@ -403,6 +385,12 @@ lib_a-memcpy-stub.o: memcpy-stub.c lib_a-memcpy-stub.obj: memcpy-stub.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcpy-stub.obj `if test -f 'memcpy-stub.c'; then $(CYGPATH_W) 'memcpy-stub.c'; else $(CYGPATH_W) '$(srcdir)/memcpy-stub.c'; fi` +lib_a-strlen.o: strlen.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strlen.o `test -f 'strlen.c' || echo '$(srcdir)/'`strlen.c + +lib_a-strlen.obj: strlen.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strlen.obj `if test -f 'strlen.c'; then $(CYGPATH_W) 'strlen.c'; else $(CYGPATH_W) '$(srcdir)/strlen.c'; fi` + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ diff --git a/newlib/libc/machine/arm/configure b/newlib/libc/machine/arm/configure index ce982c6..a4f1122 100755 --- a/newlib/libc/machine/arm/configure +++ b/newlib/libc/machine/arm/configure @@ -565,10 +565,6 @@ ac_unique_file="Makefile.am" ac_subst_vars='LTLIBOBJS LIBOBJS CFLAGS -OPT_SIZE_FALSE -OPT_SIZE_TRUE -HAVE_THUMB1_FALSE -HAVE_THUMB1_TRUE sys_dir machine_dir libm_machine_dir @@ -3415,90 +3411,6 @@ OBJEXT=${oext} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using thumb1" >&5 -$as_echo_n "checking whether we are using thumb1... " >&6; } -if ${acnewlib_cv_thumb1_processor+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.c <<EOF - -#if defined (__thumb__) && !defined (__thumb2__) - #define _THUMB1 - #else - #error "not thumb1" -#endif -int main () { - return 0; -} -EOF -if { ac_try='${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c - 1>&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then - acnewlib_cv_thumb1_processor=yes; -else - acnewlib_cv_thumb1_processor=no; -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acnewlib_cv_thumb1_processor" >&5 -$as_echo "$acnewlib_cv_thumb1_processor" >&6; } - - if test x"$acnewlib_cv_thumb1_processor" = x"yes"; then - HAVE_THUMB1_TRUE= - HAVE_THUMB1_FALSE='#' -else - HAVE_THUMB1_TRUE='#' - HAVE_THUMB1_FALSE= -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the size is preferred" >&5 -$as_echo_n "checking whether the size is preferred... " >&6; } -if ${acnewlib_cv_opt_size+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.c <<EOF - -#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) - #define OPT_SIZE - #else - #error "not need for size optimization." -#endif -int main () { - return 0; -} -EOF -if { ac_try='${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c - 1>&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then - acnewlib_cv_opt_size=yes; -else - acnewlib_cv_opt_size=no; -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acnewlib_cv_opt_size" >&5 -$as_echo "$acnewlib_cv_opt_size" >&6; } - - if test x"$acnewlib_cv_opt_size" = x"yes"; then - OPT_SIZE_TRUE= - OPT_SIZE_FALSE='#' -else - OPT_SIZE_TRUE='#' - OPT_SIZE_FALSE= -fi - - ac_config_files="$ac_config_files Makefile" @@ -3689,14 +3601,6 @@ 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_THUMB1_TRUE}" && test -z "${HAVE_THUMB1_FALSE}"; then - as_fn_error $? "conditional \"HAVE_THUMB1\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${OPT_SIZE_TRUE}" && test -z "${OPT_SIZE_FALSE}"; then - as_fn_error $? "conditional \"OPT_SIZE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 diff --git a/newlib/libc/machine/arm/configure.in b/newlib/libc/machine/arm/configure.in index ad7bfe0..833b197 100644 --- a/newlib/libc/machine/arm/configure.in +++ b/newlib/libc/machine/arm/configure.in @@ -10,56 +10,6 @@ AC_CONFIG_AUX_DIR(../../../..) NEWLIB_CONFIGURE(../../..) -dnl Check for Thumb1 supported. -AC_CACHE_CHECK(whether we are using thumb1, - acnewlib_cv_thumb1_processor, [dnl -cat > conftest.c <<EOF - -#if defined (__thumb__) && !defined (__thumb2__) - #define _THUMB1 - #else - #error "not thumb1" -#endif -int main () { - return 0; -} -EOF -if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c - 1>&AS_MESSAGE_LOG_FD]) -then - acnewlib_cv_thumb1_processor=yes; -else - acnewlib_cv_thumb1_processor=no; -fi -rm -f conftest*]) - -AM_CONDITIONAL(HAVE_THUMB1, test x"$acnewlib_cv_thumb1_processor" = x"yes") - -dnl Check for whether the size is preferred. -AC_CACHE_CHECK(whether the size is preferred, - acnewlib_cv_opt_size, [dnl -cat > conftest.c <<EOF - -#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) - #define OPT_SIZE - #else - #error "not need for size optimization." -#endif -int main () { - return 0; -} -EOF -if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c - 1>&AS_MESSAGE_LOG_FD]) -then - acnewlib_cv_opt_size=yes; -else - acnewlib_cv_opt_size=no; -fi -rm -f conftest*]) - -AM_CONDITIONAL(OPT_SIZE, test x"$acnewlib_cv_opt_size" = x"yes") - AC_SUBST(CFLAGS) AC_CONFIG_FILES([Makefile]) diff --git a/newlib/libc/machine/arm/strlen.c b/newlib/libc/machine/arm/strlen.c index ac5d47d..9fb47ba 100644 --- a/newlib/libc/machine/arm/strlen.c +++ b/newlib/libc/machine/arm/strlen.c @@ -65,7 +65,7 @@ strlen (const char* str) #else /* defined __OPTIMIZE_SIZE__ || defined PREFER_SIZE_OVER_SPEED */ #if defined __thumb__ && ! defined __thumb2__ - /* Implemented in ../../string/strlen.c. */ +#include "../../string/strlen.c" #elif defined _ISA_ARM_7 || defined __ARM_ARCH_6T2__ /* Implemented in strlen-armv7.S. */ |