Skip to content

Commit

Permalink
Allow building with CFLAGS="-O0"
Browse files Browse the repository at this point in the history
If compiled with -O0, gcc doesn't do any stack frame coalescing
and -Wframe-larger-than=1024 is triggered in debug mode.

Starting with gcc 4.8, new opt level -Og is introduced for debugging, which
does not trigger this warning.

Issue openzfs#4799

Signed-off-by: Gvozden Neskovic <[email protected]>
  • Loading branch information
ironMann committed Jun 29, 2016
1 parent 669cf0a commit a04593c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions module/zfs/vdev_raidz_math_scalar.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,20 @@ static const struct {

#include "vdev_raidz_math_impl.h"

/*
* If compiled with -O0, gcc doesn't do any stack frame coalescing
* and -Wframe-larger-than=1024 is triggered in debug mode.
* Starting with gcc 4.8, new opt level -Og is introduced for debugging, which
* does not trigger this warning.
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wframe-larger-than="

DEFINE_GEN_METHODS(scalar);
DEFINE_REC_METHODS(scalar);

#pragma GCC diagnostic pop

static boolean_t
raidz_will_scalar_work(void)
{
Expand Down

0 comments on commit a04593c

Please sign in to comment.