diff --git a/Makefile.am b/Makefile.am index 5dca516..9fb2dc2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,18 +29,7 @@ # Used to record the compiler version in the executables COMPILER = $(shell $(CC) --version 2>&1 | head -n1) -if WITH_NEON -# Pull in the NEON specific files -neon_sources = \ - src/linaro-a9/memcpy-hybrid.S -neon_bionic_sources = \ - reference/bionic/memcpy.S -neon_cppflags = -mfpu=neon -neon_dirs = neon -else -alternate_sources = \ - src/linaro-a9/memcpy.S -endif +libcortex_strings_la_LDFLAGS = -version-info 1:0:0 # The main library lib_LTLIBRARIES = \ @@ -56,6 +45,21 @@ check_PROGRAMS = \ tests/test-strcpy \ tests/test-strlen +if AARCH32 + +if WITH_NEON +# Pull in the NEON specific files +neon_sources = \ + src/linaro-a9/memcpy-hybrid.S +neon_bionic_sources = \ + reference/bionic/memcpy.S +neon_cppflags = -mfpu=neon +neon_dirs = neon +else +alternate_sources = \ + src/linaro-a9/memcpy.S +endif + # Benchmarks and example programs noinst_PROGRAMS = \ dhry \ @@ -95,24 +99,6 @@ libcortex_strings_la_SOURCES = \ src/linaro-a9/strlen.S \ src/linaro-a9/memset.S -libcortex_strings_la_LDFLAGS = -version-info 1:0:0 - -# Options for the tests -tests_cflags = -I$(srcdir)/tests $(AM_CFLAGS) -tests_ldadd = libcortex-strings.la -tests_test_memcpy_LDADD = $(tests_ldadd) -tests_test_memcpy_CFLAGS = $(tests_cflags) -tests_test_memset_LDADD = $(tests_ldadd) -tests_test_memset_CFLAGS = $(tests_cflags) -tests_test_strcmp_LDADD = $(tests_ldadd) -tests_test_strcmp_CFLAGS = $(tests_cflags) -tests_test_strcpy_LDADD = $(tests_ldadd) -tests_test_strcpy_CFLAGS = $(tests_cflags) -tests_test_strlen_LDADD = $(tests_ldadd) -tests_test_strlen_CFLAGS = $(tests_cflags) - -TESTS = $(check_PROGRAMS) - # Libraries containing the difference reference versions libbionic_a_SOURCES = \ $(neon_bionic_sources) \ @@ -255,4 +241,22 @@ EXTRA_DIST = \ scripts/trim.sh \ autogen.sh +endif + +# Options for the tests +tests_cflags = -I$(srcdir)/tests $(AM_CFLAGS) +tests_ldadd = libcortex-strings.la +tests_test_memcpy_LDADD = $(tests_ldadd) +tests_test_memcpy_CFLAGS = $(tests_cflags) +tests_test_memset_LDADD = $(tests_ldadd) +tests_test_memset_CFLAGS = $(tests_cflags) +tests_test_strcmp_LDADD = $(tests_ldadd) +tests_test_strcmp_CFLAGS = $(tests_cflags) +tests_test_strcpy_LDADD = $(tests_ldadd) +tests_test_strcpy_CFLAGS = $(tests_cflags) +tests_test_strlen_LDADD = $(tests_ldadd) +tests_test_strlen_CFLAGS = $(tests_cflags) + +TESTS = $(check_PROGRAMS) + AM_DISTCHECK_CONFIGURE_FLAGS = --host=arm-linux-gnueabi diff --git a/configure.ac b/configure.ac index 762a227..fbaafc1 100644 --- a/configure.ac +++ b/configure.ac @@ -54,4 +54,15 @@ AC_ARG_WITH([neon], AC_SUBST(with_neon) AM_CONDITIONAL(WITH_NEON, test x$with_neon = xyes) +case $host in +arm*-*-*) + arch=aarch32 + ;; +*) + AC_MSG_ERROR([unknown architecture $host]) + ;; +esac + +AM_CONDITIONAL([AARCH32], [test x$arch = xaarch32]) + AC_OUTPUT