libzstd: Don't warn about stack frame size in userspace

With the current way CFLAGS are modified in libzstd, CFLAGS passed on
the make command line will cause the CFLAGS in the Makefile for zstd.c
to be discarded, but not AM_CFLAGS.  This causes a smaller frame size
limit to be used, and the build fails.

We don't need to worry about stack frame sizes in userspace.  Drop the
extra flags.

Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org>
Closes #10773
This commit is contained in:
Ryan Moeller 2020-08-23 14:13:34 -04:00 committed by GitHub
parent a741b386d3
commit 7b15b8d18c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 11 deletions

View File

@ -2,8 +2,9 @@ include $(top_srcdir)/config/Rules.am
VPATH = $(top_srcdir)/module/zstd VPATH = $(top_srcdir)/module/zstd
# Includes kernel code, generate warnings for large stack frames # -fno-tree-vectorize is set for gcc in zstd/common/compiler.h
AM_CFLAGS += $(FRAME_LARGER_THAN) # Set it for other compilers, too.
AM_CFLAGS += -fno-tree-vectorize
noinst_LTLIBRARIES = libzstd.la noinst_LTLIBRARIES = libzstd.la
@ -12,12 +13,3 @@ KERNEL_C = \
zfs_zstd.c zfs_zstd.c
nodist_libzstd_la_SOURCES = $(KERNEL_C) nodist_libzstd_la_SOURCES = $(KERNEL_C)
# -fno-tree-vectorize is set for gcc in zstd/common/compiler.h
# Set it for other compilers, too.
lib/zstd.$(OBJEXT): CFLAGS += -fno-tree-vectorize
lib/zstd.l$(OBJEXT): CFLAGS += -fno-tree-vectorize
# Quiet warnings about frame size due to unused code in unmodified zstd lib
lib/zstd.$(OBJEXT): CFLAGS += -Wframe-larger-than=20480
lib/zstd.l$(OBJEXT): CFLAGS += -Wframe-larger-than=20480