Turn off RWX segment warnings on sparc systems.

This commit is contained in:
Mark Adler 2022-10-10 02:40:53 -07:00
parent 40c5a9bc06
commit 29fd715fd0
2 changed files with 10 additions and 3 deletions

View File

@ -22,7 +22,7 @@ CFLAGS=-O
SFLAGS=-O
LDFLAGS=
TEST_LDFLAGS=-L. libz.a
TEST_LDFLAGS=$(LDFLAGS) -L. libz.a
LDSHARED=$(CC)
CPP=$(CC) -E
@ -288,10 +288,10 @@ minigzip$(EXE): minigzip.o $(STATICLIB)
$(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
examplesh$(EXE): example.o $(SHAREDLIBV)
$(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) -L. $(SHAREDLIBV)
minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
$(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) -L. $(SHAREDLIBV)
example64$(EXE): example64.o $(STATICLIB)
$(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)

7
configure vendored
View File

@ -33,7 +33,10 @@ fi
# set command prefix for cross-compilation
if [ -n "${CHOST}" ]; then
uname=${CHOST}
mname=${CHOST}
CROSS_PREFIX="${CHOST}-"
else
mname=`(uname -a || echo unknown) 2>/dev/null`
fi
# destination name for static library
@ -220,6 +223,10 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then
fi
case "$uname" in
Linux* | linux* | *-linux* | GNU | GNU/* | solaris*)
case "$mname" in
*sparc*)
LDFLAGS="${LDFLAGS} -Wl,--no-warn-rwx-segments" ;;
esac
LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} ;;
*BSD | *bsd* | DragonFly)
LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"}