lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 23 Oct 2013 20:11:47 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	Ext4 Developers List <linux-ext4@...r.kernel.org>
Cc:	Theodore Ts'o <tytso@....edu>,
	"Darrick J. Wong" <darrick.wong@...cle.com>
Subject: [PATCH] Fix optional static code analysis using sparse

Commit 832cb612: "e2fsprogs: add (optional) sparse checking to the
build" breaks systems that are not using GNU make.  In addition, it
breaks if the developer tries to build in a subdirectory (i.e., if he
or she tries running "make" in the misc or e2fsck or lib/ext2fs
directory), since CHECK_CMD is not set.

Fix this by moving the sparse setup to MCONFIG.

Cc: Darrick J. Wong <darrick.wong@...cle.com>
Signed-off-by: "Theodore Ts'o" <tytso@....edu>
---
 MCONFIG.in  | 14 ++++++++++++++
 Makefile.in | 13 -------------
 2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/MCONFIG.in b/MCONFIG.in
index fa2b03e..557b37a 100644
--- a/MCONFIG.in
+++ b/MCONFIG.in
@@ -50,6 +50,20 @@ datadir = @datadir@
 @ifNotGNUmake@ ES = @ES@
 @ifNotGNUmake@ Q = @Q@
 
+@...NUmake@ CHECK=sparse
+@...NUmake@ CHECK_OPTS=-Wsparse-all -Wno-transparent-union -Wno-return-void -Wno-undef -Wno-non-pointer-null
+@...NUmake@ ifeq ("$(C)", "2")
+@...NUmake@   CHECK_CMD=$(CHECK) $(CHECK_OPTS) -Wbitwise -D__CHECK_ENDIAN__
+@...NUmake@ else
+@...NUmake@   ifeq ("$(C)", "1")
+@...NUmake@     CHECK_CMD=$(CHECK) $(CHECK_OPTS)
+@...NUmake@    else
+@...NUmake@     CHECK_CMD=@...e
+@...NUmake@   endif
+@...NUmake@ endif
+
+@...otGNUmake@ CHECK_CMD=@...e
+
 CC = @CC@
 BUILD_CC = @BUILD_CC@
 CFLAGS = @CFLAGS@
diff --git a/Makefile.in b/Makefile.in
index ef79482..f327d19 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -5,19 +5,6 @@ top_builddir = .
 my_dir = .
 INSTALL = @INSTALL@
 
-CHECK=sparse
-CHECK_OPTS=-Wsparse-all -Wno-transparent-union -Wno-return-void -Wno-undef -Wno-non-pointer-null
-ifeq ("$(C)", "2")
-  CHECK_CMD=$(CHECK) $(CHECK_OPTS) -Wbitwise -D__CHECK_ENDIAN__
-else
-  ifeq ("$(C)", "1")
-    CHECK_CMD=$(CHECK) $(CHECK_OPTS)
-   else
-    CHECK_CMD=@...e
-  endif
-endif
-export CHECK_CMD
-
 @MCONFIG@
 
 % : %.sh
-- 
1.7.12.rc0.22.gcdd159b

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ