LINUX: Disable kernel fortuna large frame errors 84/13684/4
authorAndrew Deason <adeason@sinenomine.net>
Thu, 11 Jul 2019 04:40:55 +0000 (23:40 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Sat, 3 Aug 2019 05:29:17 +0000 (01:29 -0400)
The rand-fortuna.c we get from Heimdal's hcrypto currently sometimes
causes a warning on LINUX when building in the kernel, because
fortuna_reseed() has a (potentially) large stack size:

.../src/libafs/MODLOAD-.../rand-fortuna-kernel.c:549:1: error: the frame size of 1032 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

Currently this does not cause the build to fail, even with
--enable-checking, since -Werror is not given in the CFLAGS when
building our kernel module. But if -Werror is passed in CFLAGS (in a
future commit), this would cause the build to fail.

Since this is an external source file, we cannot change it directly.
At least for now, just prevent this warning from breaking the build by
passing -Wno-error=frame-larger-than= into the CFLAGS for that file.

Change-Id: Ieefdf2dbc318fdcd559435e5f329eef5cf9bb9ba
Reviewed-on: https://gerrit.openafs.org/13684
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/libafs/MakefileProto.LINUX.in

index ba2fabb..7c057d1 100644 (file)
@@ -82,7 +82,7 @@ CFLAGS_evp.o = -I$(TOP_SRCDIR)/external/heimdal/hcrypto \
               -DHAVE_CONFIG_H
 CFLAGS_evp-algs.o = -I$(TOP_SRCDIR)/external/heimdal/hcrypto
 CFLAGS_evp-kernel.o = -I$(TOP_SRCDIR)/external/heimdal/hcrypto
-CFLAGS_rand-fortuna-kernel.o = -I$(TOP_SRCDIR)/external/heimdal/hcrypto
+CFLAGS_rand-fortuna-kernel.o = -I$(TOP_SRCDIR)/external/heimdal/hcrypto -Wno-error=frame-larger-than=
 CFLAGS_rand-timer-kernel.o = -I$(TOP_SRCDIR)/external/heimdal/hcrypto
 CFLAGS_rand-kernel.o = -I$(TOP_SRCDIR)/external/heimdal/hcrypto
 CFLAGS_aes.o = -I$(TOP_SRCDIR)/external/heimdal/hcrypto