]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix build using configure
authorMika Lindqvist <postmaster@raasu.org>
Mon, 17 Nov 2025 17:15:03 +0000 (19:15 +0200)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Thu, 20 Nov 2025 12:55:47 +0000 (13:55 +0100)
* "\i" is not valid escape code in BSD sed
* Some x86 shared sources were missing -fPIC due to using wrong variable in build rule

Fixes #2015.

arch/x86/Makefile.in
configure

index 53f5325928fdd1b6425a8560e2c472448d62bea3..4972dd72c2154e5fcbe6f320f507bc114cd1e25a 100644 (file)
@@ -79,13 +79,13 @@ chorba_sse2.o:
        $(CC) $(CFLAGS) $(SSE2FLAG) $(NOLTOFLAG) $(INCLUDES) -c -o $@ $(SRCDIR)/chorba_sse2.c
 
 chorba_sse2.lo:
-       $(CC) $(CFLAGS) $(SSE2FLAG) $(NOLTOFLAG) -DPIC $(INCLUDES) -c -o $@ $(SRCDIR)/chorba_sse2.c
+       $(CC) $(SFLAGS) $(SSE2FLAG) $(NOLTOFLAG) -DPIC $(INCLUDES) -c -o $@ $(SRCDIR)/chorba_sse2.c
 
 chorba_sse41.o:
        $(CC) $(CFLAGS) $(SSE41FLAG) $(NOLTOFLAG) $(INCLUDES) -c -o $@ $(SRCDIR)/chorba_sse41.c
 
 chorba_sse41.lo:
-       $(CC) $(CFLAGS) $(SSE41FLAG) $(NOLTOFLAG) -DPIC $(INCLUDES) -c -o $@ $(SRCDIR)/chorba_sse41.c
+       $(CC) $(SFLAGS) $(SSE41FLAG) $(NOLTOFLAG) -DPIC $(INCLUDES) -c -o $@ $(SRCDIR)/chorba_sse41.c
 
 compare256_avx2.o:
        $(CC) $(CFLAGS) $(AVX2FLAG) $(NOLTOFLAG) $(INCLUDES) -c -o $@ $(SRCDIR)/compare256_avx2.c
index d9f3278fdc0479a232af3fd3ca96fcfb1d67e358..c9b12561eec96841d8741336f2b31963da98020a 100755 (executable)
--- a/configure
+++ b/configure
@@ -2418,7 +2418,7 @@ for file in $SRCDIR/*.c $SRCDIR/test/*.c $SRCDIR/test/fuzz/*.c $SRCDIR/$ARCHDIR/
     fi
 
     short_name=$(echo $file | sed -e "s#$SRCDIR/##g")
-    incs=$(grep -h include $file | sed -n 's/# *\include *"\(.*\.h\)".*/\1/p' | sort | uniq)
+    incs=$(grep -h include $file | sed -n 's/# *include *"\(.*\.h\)".*/\1/p' | sort | uniq)
     includes=$(for i in $incs; do
                    # Check that the include file exists in the current dir,
                    # otherwise it may be one of the system include header.
@@ -2499,7 +2499,7 @@ for file in $SRCDIR/$ARCHDIR/*.c; do
         continue
     fi
 
-    incs=$(grep -h include $file | sed -n 's/# *\include *"\(.*\.h\)".*/\1/p' | sort | uniq)
+    incs=$(grep -h include $file | sed -n 's/# *include *"\(.*\.h\)".*/\1/p' | sort | uniq)
     includes=$(for i in $incs; do
                    # Check that the include file exists in the current dir,
                    # otherwise it may be one of the system include header.