public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v2 0/4] Move -Werror-implicit-function-declaration to
@ 2019-08-02 15:04 Petr Vorel
  2019-08-02 15:04 ` [LTP] [PATCH v2 1/4] make: Remove C++ related flags Petr Vorel
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Petr Vorel @ 2019-08-02 15:04 UTC (permalink / raw)
  To: ltp

Hi,

please see description in patches.

Travis build: https://travis-ci.org/pevik/ltp/builds/566982062

Kind regards,
Petr

Petr Vorel (4):
  make: Remove C++ related flags
  utils/ffsb: Add missing fhstat() signature + includes
  build.sh: Respect user defined CFLAGS and LDFLAGS
  make,travis: Remove -Werror-implicit-function-declaration

 .travis.yml                  |  3 ++-
 INSTALL                      |  4 +---
 build.sh                     |  5 +++--
 doc/build-system-guide.txt   | 10 ----------
 include/mk/config.mk.default |  4 ----
 include/mk/config.mk.in      |  4 ----
 include/mk/env_post.mk       |  4 ----
 utils/ffsb-6.0-rc2/fh.h      |  2 ++
 utils/ffsb-6.0-rc2/fileops.c |  1 +
 9 files changed, 9 insertions(+), 28 deletions(-)

-- 
2.22.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [LTP] [PATCH v2 1/4] make: Remove C++ related flags
  2019-08-02 15:04 [LTP] [PATCH v2 0/4] Move -Werror-implicit-function-declaration to Petr Vorel
@ 2019-08-02 15:04 ` Petr Vorel
  2019-08-02 15:04 ` [LTP] [PATCH v2 2/4] utils/ffsb: Add missing fhstat() signature + includes Petr Vorel
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Petr Vorel @ 2019-08-02 15:04 UTC (permalink / raw)
  To: ltp

as we have no C++ code. Removed:
CXXFLAGS, DEBUG_CXXFLAGS, OPT_CXXFLAGS, WCXXFLAGS

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 INSTALL                      |  4 +---
 build.sh                     |  2 +-
 doc/build-system-guide.txt   | 10 ----------
 include/mk/config.mk.default |  4 ----
 include/mk/config.mk.in      |  4 ----
 5 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/INSTALL b/INSTALL
index b2fe630bf..6e3b26e24 100644
--- a/INSTALL
+++ b/INSTALL
@@ -239,7 +239,7 @@ Cross compiling
 ---------------
 
 To cross compile, you must specify the correct variables when running configure.
-e.g. CC, CXX, CXXFLAGS, LDFLAGS, etc...
+e.g. CC, LDFLAGS, etc...
 
 After configure has run, it will generate include/mk/config.mk. You can tweak
 settings in there if need be, but you should not specificy settings on the
@@ -264,8 +264,6 @@ The conventions enforced are standard ones. Here's a quick summary:
 
 CFLAGS   - used when compiling/linking C code, e.g. -D_GNU_SOURCE (no CPPFLAGS!)
 
-CXXFLAGS - used when compiling/linking C++ code (no CPPFLAGS!)
-
 CPPFLAGS - used when preprocessor is run (so C/C++ compiling with $(CPP)
 	   functions, e.g. -I$SYSROOT/usr/include -I$SYSROOT/include -I$SYSROOT
 
diff --git a/build.sh b/build.sh
index ae3b86ff2..634ef51b5 100755
--- a/build.sh
+++ b/build.sh
@@ -21,7 +21,7 @@ CC=gcc
 build_32()
 {
 	echo "===== 32-bit ${1}-tree build into $PREFIX ====="
-	build $1 CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32"
+	build $1 CFLAGS="-m32" LDFLAGS="-m32"
 }
 
 build_native()
diff --git a/doc/build-system-guide.txt b/doc/build-system-guide.txt
index e9717f1ae..c4b36239b 100644
--- a/doc/build-system-guide.txt
+++ b/doc/build-system-guide.txt
@@ -137,20 +137,14 @@ $(AR)			: The library archiver.
 
 $(CC)			: The system C compiler.
 
-$(CXX)			: The system C++ compiler.
-
 $(CPP)			: The system C preprocessor.
 
 $(CFLAGS)		: C compiler flags.
 
 $(CPPFLAGS)		: Preprocessor flags, e.g. -I arguments.
 
-$(CXXFLAGS)		: C++ compiler flags, e.g. -I arguments.
-
 $(DEBUG_CFLAGS)		: Debug flags to pass to $(CC), -g, etc.
 
-$(DEBUG_CXXFLAGS)	: Debug flags to pass to $(CXX).
-
 $(LD)			: The system linker (typically $(CC), but not
 			  necessarily).
 
@@ -179,14 +173,10 @@ $(OPT_CFLAGS)		: Optimization flags to pass into the C compiler, -O2,
 			  logic in the tree-optimization portion of the gcc
 			  compiler, from 3.3.x to 4.4.
 
-$(OPT_CXXFLAGS)		: Optimization flags to pass to the C++ compiler.
-
 $(RANLIB)		: What to run after archiving a library.
 
 $(WCFLAGS)		: Warning flags to pass to $(CC), e.g. -Werror,
 			  -Wall, etc.
-
-$(WCXXFLAGS)		: Same as $(WCFLAGS), but for $(CXX).
 -------------------------------------------------------------------------------
 
 Make System Variables
diff --git a/include/mk/config.mk.default b/include/mk/config.mk.default
index 0934d9453..857067cb3 100644
--- a/include/mk/config.mk.default
+++ b/include/mk/config.mk.default
@@ -59,18 +59,14 @@ LDLIBS			:=
 LDFLAGS			:=
 
 DEBUG_CFLAGS		?= -g
-DEBUG_CXXFLAGS		?= $(DEBUG_CFLAGS)
 
 # Please see README.mk-devel about -fstrict-aliasing.
 OPT_CFLAGS		?= -O2 -fno-strict-aliasing -pipe
-OPT_CXXFLAGS		?= $(OPT_CFLAGS)
 
 WCFLAGS			?= -Wall
-WCXXFLAGS		?= $(WCFLAGS)
 
 LDFLAGS			+= $(WLDFLAGS)
 CFLAGS			+= $(DEBUG_CFLAGS) $(OPT_CFLAGS) $(WCFLAGS)
-CXXFLAGS		+= $(DEBUG_CXXFLAGS) $(OPT_CXXFLAGS) $(WCXXFLAGS)
 
 LINUX_VERSION		:=
 LINUX_DIR		:=
diff --git a/include/mk/config.mk.in b/include/mk/config.mk.in
index d55fe9602..0bc59887a 100644
--- a/include/mk/config.mk.in
+++ b/include/mk/config.mk.in
@@ -63,18 +63,14 @@ LDLIBS			:= @LIBS@
 LDFLAGS			:= @LDFLAGS@
 
 DEBUG_CFLAGS		?= -g
-DEBUG_CXXFLAGS		?= $(DEBUG_CFLAGS)
 
 # Please see README.mk-devel about -fstrict-aliasing.
 OPT_CFLAGS		?= -O2 -fno-strict-aliasing -pipe
-OPT_CXXFLAGS		?= $(OPT_CFLAGS)
 
 WCFLAGS			?= -Wall -W @GCC_WARN_OLDSTYLE@
-WCXXFLAGS		?= $(WCFLAGS)
 
 LDFLAGS			+= $(WLDFLAGS)
 CFLAGS			+= $(DEBUG_CFLAGS) $(OPT_CFLAGS) $(WCFLAGS)
-CXXFLAGS		+= $(DEBUG_CXXFLAGS) $(OPT_CXXFLAGS) $(WCXXFLAGS)
 
 LINUX_VERSION		:= @LINUX_VERSION@
 LINUX_DIR		:= @LINUX_DIR@
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [LTP] [PATCH v2 2/4] utils/ffsb: Add missing fhstat() signature + includes
  2019-08-02 15:04 [LTP] [PATCH v2 0/4] Move -Werror-implicit-function-declaration to Petr Vorel
  2019-08-02 15:04 ` [LTP] [PATCH v2 1/4] make: Remove C++ related flags Petr Vorel
@ 2019-08-02 15:04 ` Petr Vorel
  2019-08-02 15:14   ` Cyril Hrubis
  2019-08-02 15:04 ` [LTP] [PATCH v2 3/4] build.sh: Respect user defined CFLAGS and LDFLAGS Petr Vorel
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Petr Vorel @ 2019-08-02 15:04 UTC (permalink / raw)
  To: ltp

Need for build with -Werror-implicit-function-declaration

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
To be hones I'd rather delete this The Flexible Filesystem Benchmark
(FFSB) (in utils/ffsb-6.0-rc2). Does anyone uses it?
If kept, I'd prefer to have it as a separate project in [1]

I probably have asked before and there is a paper from 2012 suggesting
that someone used it 7 years ago [2][3]. There is also a fork, with just a
few patches, no development now [4].

[1] https://github.com/linux-test-project/ffsb
[2] https://elinux.org/images/f/f7/FFSB_and_IOzone-_File_system_Benchmarking_Tools%2C_Features_and_Internals.pdf
[3] https://www.youtube.com/watch?v=jFhrteWcahI
[4] https://github.com/FFSB-Prime/ffsb

 utils/ffsb-6.0-rc2/fh.h      | 2 ++
 utils/ffsb-6.0-rc2/fileops.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/utils/ffsb-6.0-rc2/fh.h b/utils/ffsb-6.0-rc2/fh.h
index 23a198bb8..29410c7ce 100644
--- a/utils/ffsb-6.0-rc2/fh.h
+++ b/utils/ffsb-6.0-rc2/fh.h
@@ -19,6 +19,7 @@
 #define _FH_H_
 
 #include <inttypes.h>
+#include "ffsb_thread.h"
 
 struct ffsb_thread;
 struct ffsb_fs;
@@ -29,6 +30,7 @@ int fhopencreate(char *, struct ffsb_thread *, struct ffsb_fs *);
 int fhopenappend(char *, struct ffsb_thread *, struct ffsb_fs *);
 
 void fhread(int, void *, uint64_t, struct ffsb_thread *, struct ffsb_fs *);
+void fhstat(char *name, ffsb_thread_t * ft, ffsb_fs_t * fs);
 
 /* can only write up to size_t bytes at a time, so size is a uint32_t */
 void fhwrite(int, void *, uint32_t, struct ffsb_thread *, struct ffsb_fs *);
diff --git a/utils/ffsb-6.0-rc2/fileops.c b/utils/ffsb-6.0-rc2/fileops.c
index 3212c18b2..72e133a13 100644
--- a/utils/ffsb-6.0-rc2/fileops.c
+++ b/utils/ffsb-6.0-rc2/fileops.c
@@ -30,6 +30,7 @@
 #include "ffsb.h"
 #include "fileops.h"
 #include "ffsb_op.h"
+#include "ffsb_thread.h"
 
 static void do_stats(struct timeval *start, struct timeval *end,
 		     ffsb_thread_t * ft, ffsb_fs_t * fs, syscall_t sys)
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [LTP] [PATCH v2 3/4] build.sh: Respect user defined CFLAGS and LDFLAGS
  2019-08-02 15:04 [LTP] [PATCH v2 0/4] Move -Werror-implicit-function-declaration to Petr Vorel
  2019-08-02 15:04 ` [LTP] [PATCH v2 1/4] make: Remove C++ related flags Petr Vorel
  2019-08-02 15:04 ` [LTP] [PATCH v2 2/4] utils/ffsb: Add missing fhstat() signature + includes Petr Vorel
@ 2019-08-02 15:04 ` Petr Vorel
  2019-08-02 15:04 ` [LTP] [PATCH v2 4/4] make, travis: Remove -Werror-implicit-function-declaration Petr Vorel
  2019-08-02 15:08 ` [LTP] [PATCH v2 0/4] Move -Werror-implicit-function-declaration to Petr Vorel
  4 siblings, 0 replies; 9+ messages in thread
From: Petr Vorel @ 2019-08-02 15:04 UTC (permalink / raw)
  To: ltp

Therefore it was needed to export them and not pass as a parameter.

It will be used for travis settings in next commit, but also can be
handy for using build.sh in local development.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 build.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/build.sh b/build.sh
index 634ef51b5..3da2adf55 100755
--- a/build.sh
+++ b/build.sh
@@ -21,7 +21,8 @@ CC=gcc
 build_32()
 {
 	echo "===== 32-bit ${1}-tree build into $PREFIX ====="
-	build $1 CFLAGS="-m32" LDFLAGS="-m32"
+	export CFLAGS="-m32 $CFLAGS" LDFLAGS="-m32 $LDFLAGS"
+	build $1
 }
 
 build_native()
@@ -63,7 +64,7 @@ build_out_tree()
 
 	mkdir -p $build
 	cd $build
-	run_configure $tree/configure $CONFIGURE_OPTS_OUT_TREE CC="$CC" $@
+	run_configure $tree/configure $CONFIGURE_OPTS_OUT_TREE CC="$CC" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" $@
 
 	echo "=== build ==="
 	make $make_opts
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [LTP] [PATCH v2 4/4] make, travis: Remove -Werror-implicit-function-declaration
  2019-08-02 15:04 [LTP] [PATCH v2 0/4] Move -Werror-implicit-function-declaration to Petr Vorel
                   ` (2 preceding siblings ...)
  2019-08-02 15:04 ` [LTP] [PATCH v2 3/4] build.sh: Respect user defined CFLAGS and LDFLAGS Petr Vorel
@ 2019-08-02 15:04 ` Petr Vorel
  2019-08-06 16:48   ` Petr Vorel
  2019-08-02 15:08 ` [LTP] [PATCH v2 0/4] Move -Werror-implicit-function-declaration to Petr Vorel
  4 siblings, 1 reply; 9+ messages in thread
From: Petr Vorel @ 2019-08-02 15:04 UTC (permalink / raw)
  To: ltp

and add it to Travis CI builds.

Previously it was passed only to Android build. Generally Werror flags
should be on for development but disabled for releases and production.
We don't have any configure flag stating development build, so using it
only in Travis CI should be sufficient (although we lost lost this check
for Android as we don't test it in our Travis CI setup).

Suggested-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Travis build: https://travis-ci.org/pevik/ltp/builds/566982062

 .travis.yml            | 3 ++-
 include/mk/env_post.mk | 4 ----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index a29551650..dcb5affb5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -79,5 +79,6 @@ script:
     - INSTALL="${DISTRO%%:*}"
     - INSTALL="${INSTALL%%/*}"
     - if [ ! "$TREE" ]; then TREE="in"; fi
+    - CFLAGS="-Werror-implicit-function-declaration"
     - case $VARIANT in cross-compile*) BUILD="cross";; i386) BUILD="32";; *) BUILD="native";; esac
-    - docker run -it ltp /bin/sh -c "cd travis && ./$INSTALL.sh && if [ \"$VARIANT\" ]; then ./$INSTALL.$VARIANT.sh; fi && ../build.sh -o $TREE -t $BUILD -c $CC"
+    - docker run -it ltp /bin/sh -c "cd travis && ./$INSTALL.sh && if [ \"$VARIANT\" ]; then ./$INSTALL.$VARIANT.sh; fi && CFLAGS='$CFLAGS' ../build.sh -o $TREE -t $BUILD -c $CC"
diff --git a/include/mk/env_post.mk b/include/mk/env_post.mk
index 913bdf5d1..f4169ad66 100644
--- a/include/mk/env_post.mk
+++ b/include/mk/env_post.mk
@@ -42,10 +42,6 @@ CPPFLAGS			+= -D__UCLIBC__ -DUCLINUX
 endif
 
 ifeq ($(ANDROID),1)
-# There are many undeclared functions, it's best not to accidentally overlook
-# them.
-CFLAGS				+= -Werror-implicit-function-declaration
-
 LDFLAGS				+= -L$(top_builddir)/lib/android_libpthread
 LDFLAGS				+= -L$(top_builddir)/lib/android_librt
 endif
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [LTP] [PATCH v2 0/4] Move -Werror-implicit-function-declaration to
  2019-08-02 15:04 [LTP] [PATCH v2 0/4] Move -Werror-implicit-function-declaration to Petr Vorel
                   ` (3 preceding siblings ...)
  2019-08-02 15:04 ` [LTP] [PATCH v2 4/4] make, travis: Remove -Werror-implicit-function-declaration Petr Vorel
@ 2019-08-02 15:08 ` Petr Vorel
  4 siblings, 0 replies; 9+ messages in thread
From: Petr Vorel @ 2019-08-02 15:08 UTC (permalink / raw)
  To: ltp

Hi,

sorry, wrapped subject. It should have been
Move -Werror-implicit-function-declaration to Travis CI (from Makefile)

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [LTP] [PATCH v2 2/4] utils/ffsb: Add missing fhstat() signature + includes
  2019-08-02 15:04 ` [LTP] [PATCH v2 2/4] utils/ffsb: Add missing fhstat() signature + includes Petr Vorel
@ 2019-08-02 15:14   ` Cyril Hrubis
  2019-08-02 15:31     ` Petr Vorel
  0 siblings, 1 reply; 9+ messages in thread
From: Cyril Hrubis @ 2019-08-02 15:14 UTC (permalink / raw)
  To: ltp

Hi!
> To be hones I'd rather delete this The Flexible Filesystem Benchmark
> (FFSB) (in utils/ffsb-6.0-rc2). Does anyone uses it?
> If kept, I'd prefer to have it as a separate project in [1]

It's a dependency because the ext4-new-features tests use it.

But these tests already check for ffsb so we may as well remove it from
LTP and either maintain it in a separate repo or point out our users to
the fork.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [LTP] [PATCH v2 2/4] utils/ffsb: Add missing fhstat() signature + includes
  2019-08-02 15:14   ` Cyril Hrubis
@ 2019-08-02 15:31     ` Petr Vorel
  0 siblings, 0 replies; 9+ messages in thread
From: Petr Vorel @ 2019-08-02 15:31 UTC (permalink / raw)
  To: ltp

Hi Cyril,

> Hi!
> > To be hones I'd rather delete this The Flexible Filesystem Benchmark
> > (FFSB) (in utils/ffsb-6.0-rc2). Does anyone uses it?
> > If kept, I'd prefer to have it as a separate project in [1]

> It's a dependency because the ext4-new-features tests use it.

> But these tests already check for ffsb so we may as well remove it from
> LTP and either maintain it in a separate repo or point out our users to
> the fork.
OK, I overlooked it's really installed. In that case I'd postpone the solution
(hosting at separate project looks cleaner to me, but then we'd need to setup
git subproject) and merge this unchanged.

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [LTP] [PATCH v2 4/4] make, travis: Remove -Werror-implicit-function-declaration
  2019-08-02 15:04 ` [LTP] [PATCH v2 4/4] make, travis: Remove -Werror-implicit-function-declaration Petr Vorel
@ 2019-08-06 16:48   ` Petr Vorel
  0 siblings, 0 replies; 9+ messages in thread
From: Petr Vorel @ 2019-08-06 16:48 UTC (permalink / raw)
  To: ltp

Hi,

> and add it to Travis CI builds.

> Previously it was passed only to Android build. Generally Werror flags
> should be on for development but disabled for releases and production.
> We don't have any configure flag stating development build, so using it
> only in Travis CI should be sufficient (although we lost lost this check
> for Android as we don't test it in our Travis CI setup).

> Suggested-by: Cyril Hrubis <chrubis@suse.cz>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> Travis build: https://travis-ci.org/pevik/ltp/builds/566982062
This one replaced by https://patchwork.ozlabs.org/patch/1142959/

Travis build: https://travis-ci.org/pevik/ltp/builds/568461383

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-08-06 16:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-02 15:04 [LTP] [PATCH v2 0/4] Move -Werror-implicit-function-declaration to Petr Vorel
2019-08-02 15:04 ` [LTP] [PATCH v2 1/4] make: Remove C++ related flags Petr Vorel
2019-08-02 15:04 ` [LTP] [PATCH v2 2/4] utils/ffsb: Add missing fhstat() signature + includes Petr Vorel
2019-08-02 15:14   ` Cyril Hrubis
2019-08-02 15:31     ` Petr Vorel
2019-08-02 15:04 ` [LTP] [PATCH v2 3/4] build.sh: Respect user defined CFLAGS and LDFLAGS Petr Vorel
2019-08-02 15:04 ` [LTP] [PATCH v2 4/4] make, travis: Remove -Werror-implicit-function-declaration Petr Vorel
2019-08-06 16:48   ` Petr Vorel
2019-08-02 15:08 ` [LTP] [PATCH v2 0/4] Move -Werror-implicit-function-declaration to Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox