From 23a1abf8e5d8e8b5c9d07cabccb39362890a43a1 Mon Sep 17 00:00:00 2001 From: Nathan Moinvaziri Date: Tue, 30 Jun 2020 21:13:43 -0700 Subject: [PATCH] Apply neonflag only to files using neon instructions with configure. --- arch/arm/Makefile.in | 13 +++++++------ configure | 7 +++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/Makefile.in b/arch/arm/Makefile.in index 05e14d67..1db301a1 100644 --- a/arch/arm/Makefile.in +++ b/arch/arm/Makefile.in @@ -6,6 +6,7 @@ CC= CFLAGS= SFLAGS= INCLUDES= +NEONFLAG= SUFFIX= SRCDIR=. @@ -21,10 +22,10 @@ all: \ insert_string_acle.o insert_string_acle.lo adler32_neon.o: - $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/adler32_neon.c + $(CC) $(CFLAGS) $(NEONFLAG) $(INCLUDES) -c -o $@ $(SRCDIR)/adler32_neon.c adler32_neon.lo: - $(CC) $(SFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/adler32_neon.c + $(CC) $(SFLAGS) $(NEONFLAG) $(INCLUDES) -c -o $@ $(SRCDIR)/adler32_neon.c armfeature.o: $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/armfeature.c @@ -33,10 +34,10 @@ armfeature.lo: $(CC) $(SFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/armfeature.c chunkset_neon.o: - $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/chunkset_neon.c + $(CC) $(CFLAGS) $(NEONFLAG) $(INCLUDES) -c -o $@ $(SRCDIR)/chunkset_neon.c chunkset_neon.lo: - $(CC) $(SFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/chunkset_neon.c + $(CC) $(SFLAGS) $(NEONFLAG) $(INCLUDES) -c -o $@ $(SRCDIR)/chunkset_neon.c crc32_acle.o: $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/crc32_acle.c @@ -45,10 +46,10 @@ crc32_acle.lo: $(CC) $(SFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/crc32_acle.c slide_neon.o: - $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/slide_neon.c + $(CC) $(CFLAGS) $(NEONFLAG) $(INCLUDES) -c -o $@ $(SRCDIR)/slide_neon.c slide_neon.lo: - $(CC) $(SFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/slide_neon.c + $(CC) $(SFLAGS) $(NEONFLAG) $(INCLUDES) -c -o $@ $(SRCDIR)/slide_neon.c insert_string_acle.o: $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/insert_string_acle.c diff --git a/configure b/configure index edbc51fc..53fc6844 100755 --- a/configure +++ b/configure @@ -1293,8 +1293,7 @@ case "${ARCH}" in if test $buildneon -eq 1; then if test $MFPU_NEON_AVAILABLE -eq 1;then - CFLAGS="${CFLAGS} -mfpu=neon" - SFLAGS="${SFLAGS} -mfpu=neon" + NEONFLAG="-mfpu=neon" fi CFLAGS="${CFLAGS} -DARM_NEON_ADLER32 -DARM_NEON_CHUNKSET -DARM_NEON_SLIDEHASH" @@ -1317,8 +1316,7 @@ case "${ARCH}" in if test $buildneon -eq 1; then if test $MFPU_NEON_AVAILABLE -eq 1;then - CFLAGS="${CFLAGS} -mfpu=neon" - SFLAGS="${SFLAGS} -mfpu=neon" + NEONFLAG="-mfpu=neon" fi CFLAGS="${CFLAGS} -DARM_NEON_ADLER32 -DARM_NEON_CHUNKSET -DARM_NEON_SLIDEHASH" @@ -1600,6 +1598,7 @@ if [ "$SRCDIR" != "$BUILDDIR" ]; then ARCHINCLUDES="-I$BUILDDIR ${ARCHINCLUDES}" sed < $SRCDIR/$ARCHDIR/Makefile.in " /^CC *=/s#=.*#=$CC# /^CFLAGS *=/s#=.*#=$CFLAGS# +/^NEONFLAG *=/s#=.*#=$NEONFLAG# /^SFLAGS *=/s#=.*#=$SFLAGS# /^LDFLAGS *=/s#=.*#=$LDFLAGS# /^INCLUDES *=/s#=.*#=$ARCHINCLUDES# -- 2.47.3