|
From: Rhys K. <rhy...@gm...> - 2019-02-03 03:56:46
|
A short series of autotools-related cleanup patches. I'd appreciate if I could get a review from at least one of the other valgrind developers before I actually commit these patches to master. It started out as some small things noticed whilst looking at a larger feature and here we are six patches later. The series itself should be fairly straightforward. Has been tested on macOS 10.11, 10.12 and 10.13 and Ubuntu 16.04. The series itself can also be found on my GitHub repo at: https://github.com/Echelon9/valgrind/tree/series/autotools-series An interested reviewer could add the repo, check out a local branch with the patches and re-build valgrind as follows: # Add repo and checkout a local branch with the patches git remote add rhyskidd-gh https://github.com/Echelon9/valgrind.git git checkout -b series/autotools-series rhyskidd-gh/series/autotools-series # Clean build environment, re-run autotools and build make distclean ./autogen.sh && ./configure && make === I also wonder whether valgrind should be explicit about a minimum supported version of autoconf (via AC_PREREQ() macro)? This would allow some of the existing backwards compatible hacks to be dropped. The only current location that a minimum version is mentioned is at http://valgrind.org/downloads/repository.html, where autoconf >=2.68 is stated as a dependency upon automake >= 1.10. A minimum automake version dependency is currently specified in the code. Thoughts? Cc: Julian Seward <js...@ac...> Cc: Philippe Waroquiers <phi...@sk...> Cc: Ivo Raisr <iv...@iv...> Cc: Petar Jovanovic <mip...@gm...> Cc: Mark Wielaard <ma...@kl...> Rhys Kidd (6): config: remove unrequired AC_HEADER_STDC config: Set automake options consistenly in one location Makefile.am: Consistent indent and align config: Conditionalize -finline-functions on compiler support macOS: Don't duplicate -fno-stack-protector Add missing documentation file from EXTRA_DIST Makefile.all.am | 7 ++++--- Makefile.am | 9 ++++++--- configure.ac | 24 ++++++++++++++++++++++-- 3 files changed, 32 insertions(+), 8 deletions(-) -- 2.19.1 |
|
From: Rhys K. <rhy...@gm...> - 2019-02-03 03:56:46
|
This approach is utilized consistently throughout the file, and would make alphabetical reordering easier. Adopt it here as well. Signed-off-by: Rhys Kidd <rhy...@gm...> --- Makefile.am | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index a63cd9bde..0458c931d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,8 @@ AUTOMAKE_OPTIONS = 1.10 include $(top_srcdir)/Makefile.all.am -TOOLS = memcheck \ +TOOLS = \ + memcheck \ cachegrind \ callgrind \ helgrind \ @@ -13,7 +14,8 @@ TOOLS = memcheck \ lackey \ none -EXP_TOOLS = exp-sgcheck \ +EXP_TOOLS = \ + exp-sgcheck \ exp-bbv # Put docs last because building the HTML is slow and we want to get -- 2.19.1 |
|
From: Rhys K. <rhy...@gm...> - 2019-02-03 03:56:48
|
Avoid use of two manners of setting automake configuration options, and consolidate them into AM_INIT_AUTOMAKE macro. Signed-off-by: Rhys Kidd <rhy...@gm...> --- Makefile.am | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 631c845ab..a63cd9bde 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ -AUTOMAKE_OPTIONS = foreign 1.10 dist-bzip2 +AUTOMAKE_OPTIONS = 1.10 include $(top_srcdir)/Makefile.all.am diff --git a/configure.ac b/configure.ac index b69935e9b..d0b68b46b 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ AC_INIT([Valgrind],[3.15.0.GIT],[val...@li...]) AC_CONFIG_SRCDIR(coregrind/m_main.c) AC_CONFIG_HEADERS([config.h]) -AM_INIT_AUTOMAKE([foreign subdir-objects]) +AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects]) AM_MAINTAINER_MODE -- 2.19.1 |
|
From: Rhys K. <rhy...@gm...> - 2019-02-03 03:56:48
|
Since f38d96d -fno-stack-protector has been added to $(AM_CFLAGS_BASE) on all
platforms, if the compiler supports it. Accordingly, there's no need to still add
this a second time specifically for macOS.
Fixes: f38d96d ("Add -Wformat -Wformat-security to the list of compile flags.")
Signed-off-by: Rhys Kidd <rhy...@gm...>
---
Makefile.all.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.all.am b/Makefile.all.am
index 2ad54034f..daa7e413f 100644
--- a/Makefile.all.am
+++ b/Makefile.all.am
@@ -222,14 +222,14 @@ AM_CCASFLAGS_ARM64_LINUX = @FLAG_M64@ -g
AM_FLAG_M3264_X86_DARWIN = -arch i386
AM_CFLAGS_X86_DARWIN = $(WERROR) -arch i386 $(AM_CFLAGS_BASE) \
-mmacosx-version-min=10.6 \
- -fno-stack-protector -fno-pic -fno-PIC
+ -fno-pic -fno-PIC
AM_CFLAGS_PSO_X86_DARWIN = $(AM_CFLAGS_X86_DARWIN) $(AM_CFLAGS_PSO_BASE)
AM_CCASFLAGS_X86_DARWIN = -arch i386 -g
AM_FLAG_M3264_AMD64_DARWIN = -arch x86_64
AM_CFLAGS_AMD64_DARWIN = $(WERROR) -arch x86_64 $(AM_CFLAGS_BASE) \
- -mmacosx-version-min=10.6 -fno-stack-protector
+ -mmacosx-version-min=10.6
AM_CFLAGS_PSO_AMD64_DARWIN = $(AM_CFLAGS_AMD64_DARWIN) $(AM_CFLAGS_PSO_BASE)
AM_CCASFLAGS_AMD64_DARWIN = -arch x86_64 -g
--
2.19.1
|
|
From: Rhys K. <rhy...@gm...> - 2019-02-03 03:56:48
|
Autoconf says:
"This macro is obsolescent, as current systems have conforming
header files. New programs need not use this macro".
Was previously required to ensure the system has C header files conforming
to ANSI C89 (ISO C90). Specifically, this macro checks for stdlib.h,
stdarg.h, string.h, and float.h.
This autoconf option was used to provide conditional fallback support
via defined STDC_HEADERS.
valgrind does not utilize conditional fallback support so, so this macro
is both obsolete and unused, so let's drop it.
Signed-off-by: Rhys Kidd <rhy...@gm...>
---
configure.ac | 1 -
1 file changed, 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index b885bd91b..b69935e9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4011,7 +4011,6 @@ fi # test "$VGCONF_OS" = "solaris"
# Checks for C header files.
#----------------------------------------------------------------------------
-AC_HEADER_STDC
AC_CHECK_HEADERS([ \
asm/unistd.h \
endian.h \
--
2.19.1
|
|
From: Rhys K. <rhy...@gm...> - 2019-02-03 03:56:49
|
Ensure this documentation file is included in tarball.
Fixes: 9f3d49a ("Create 3.10.0 section in NEWS, add (first draft of) README_DEVELOPERS_processes")
Signed-off-by: Rhys Kidd <rhy...@gm...>
---
Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile.am b/Makefile.am
index 0458c931d..242b38a14 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -104,6 +104,7 @@ perf: check
EXTRA_DIST = \
COPYING.DOCS \
README_DEVELOPERS \
+ README_DEVELOPERS_processes \
README_PACKAGERS \
README_MISSING_SYSCALL_OR_IOCTL \
README.s390 \
--
2.19.1
|
|
From: Rhys K. <rhy...@gm...> - 2019-02-03 03:56:49
|
Certain clang compiler versions do not support -finline-functions, so only apply
this compiler option conditionally if supported.
Warnings with Apple LLVM version 8.0.0 (clang-800.0.42.1), based on upstream clang 3.9.0:
clang: warning: optimization flag '-finline-functions' is not supported
clang: warning: argument unused during compilation: '-finline-functions'
Fixes: 7dd9a7f ("Add -finline-functions to standard build flags, so gcc will
consider all functions as candidates for inlining.")
Signed-off-by: Rhys Kidd <rhy...@gm...>
---
Makefile.all.am | 3 ++-
configure.ac | 21 +++++++++++++++++++++
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/Makefile.all.am b/Makefile.all.am
index 8ea95a611..2ad54034f 100644
--- a/Makefile.all.am
+++ b/Makefile.all.am
@@ -97,7 +97,7 @@ clean-noinst_DSYMS:
# -fno-builtin is important for defeating LLVM's idiom recognition
# that somehow causes VG_(memset) to get into infinite recursion.
AM_CFLAGS_BASE = \
- -O2 -finline-functions -g \
+ -O2 -g \
-Wall \
-Wmissing-prototypes \
-Wshadow \
@@ -116,6 +116,7 @@ AM_CFLAGS_BASE = \
@FLAG_W_LOGICAL_OP@ \
@FLAG_W_ENUM_CONVERSION@ \
@FLAG_W_OLD_STYLE_DECLARATION@ \
+ @FLAG_FINLINE_FUNCTIONS@ \
@FLAG_FNO_STACK_PROTECTOR@ \
@FLAG_FSANITIZE@ \
-fno-strict-aliasing \
diff --git a/configure.ac b/configure.ac
index d0b68b46b..8779cf029 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2200,6 +2200,27 @@ CFLAGS=$safe_CFLAGS
AC_SUBST(FLAG_FNO_STACK_PROTECTOR)
+# does this compiler support -finline-functions ?
+AC_MSG_CHECKING([if gcc accepts -finline-functions])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="-finline-functions -Werror"
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+ return 0;
+]])], [
+inline_functions=yes
+FLAG_FINLINE_FUNCTIONS="-finline-functions"
+AC_MSG_RESULT([yes])
+], [
+inline_functions=no
+FLAG_FINLINE_FUNCTIONS=""
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+
+AC_SUBST(FLAG_FINLINE_FUNCTIONS)
+
# Does GCC support disabling Identical Code Folding?
# We want to disabled Identical Code Folding for the
# tools preload shared objects to get better backraces.
--
2.19.1
|
|
From: Philippe W. <phi...@sk...> - 2019-02-04 20:59:30
|
Hello Rhys, I am far to even remotely master autotool/autoconf/... but I quickly read your patches, and I found nothing strange, FWIW. So, from my point of view, that all looks ok. I however suggest to wait till the ppc64 breakage is fixed before pushing (also, that will give some more time for other developers to comment your patches). Thanks Philippe On Sat, 2019-02-02 at 22:56 -0500, Rhys Kidd wrote: > Autoconf says: > "This macro is obsolescent, as current systems have conforming > header files. New programs need not use this macro". > > Was previously required to ensure the system has C header files conforming > to ANSI C89 (ISO C90). Specifically, this macro checks for stdlib.h, > stdarg.h, string.h, and float.h. > > This autoconf option was used to provide conditional fallback support > via defined STDC_HEADERS. > > valgrind does not utilize conditional fallback support so, so this macro > is both obsolete and unused, so let's drop it. > > Signed-off-by: Rhys Kidd <rhy...@gm...> > --- > configure.ac | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/configure.ac b/configure.ac > index b885bd91b..b69935e9b 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -4011,7 +4011,6 @@ fi # test "$VGCONF_OS" = "solaris" > # Checks for C header files. > #---------------------------------------------------------------------------- > > -AC_HEADER_STDC > AC_CHECK_HEADERS([ \ > asm/unistd.h \ > endian.h \ |
|
From: Rhys K. <rhy...@gm...> - 2019-02-04 21:12:19
|
On Mon, Feb 4, 2019 at 3:59 PM Philippe Waroquiers < phi...@sk...> wrote: > Hello Rhys, > > I am far to even remotely master autotool/autoconf/... > but I quickly read your patches, and I found nothing strange, FWIW. > Thanks Philippe. > So, from my point of view, that all looks ok. > I however suggest to wait till the ppc64 breakage is fixed > before pushing (also, that will give some more > time for other developers to comment your patches). No problem. That sounds reasonable to wait a little longer. > > Thanks > Philippe > > > On Sat, 2019-02-02 at 22:56 -0500, Rhys Kidd wrote: > > Autoconf says: > > "This macro is obsolescent, as current systems have conforming > > header files. New programs need not use this macro". > > > > Was previously required to ensure the system has C header files > conforming > > to ANSI C89 (ISO C90). Specifically, this macro checks for stdlib.h, > > stdarg.h, string.h, and float.h. > > > > This autoconf option was used to provide conditional fallback support > > via defined STDC_HEADERS. > > > > valgrind does not utilize conditional fallback support so, so this macro > > is both obsolete and unused, so let's drop it. > > > > Signed-off-by: Rhys Kidd <rhy...@gm...> > > --- > > configure.ac | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/configure.ac b/configure.ac > > index b885bd91b..b69935e9b 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -4011,7 +4011,6 @@ fi # test "$VGCONF_OS" = "solaris" > > # Checks for C header files. > > > #---------------------------------------------------------------------------- > > > > -AC_HEADER_STDC > > AC_CHECK_HEADERS([ \ > > asm/unistd.h \ > > endian.h \ > |
|
From: Carl L. <ce...@us...> - 2019-02-05 16:55:58
|
Rhys:
On Mon, 2019-02-04 at 16:11 -0500, Rhys Kidd wrote:
>
>
> > So, from my point of view, that all looks ok.
> > I however suggest to wait till the ppc64 breakage is fixed
> > before pushing (also, that will give some more
> > time for other developers to comment your patches).
>
> No problem. That sounds reasonable to wait a little longer.
>
I have committed the fix for the PPC64 breakage,
commit de7fc1a0593ca94835bba5f9732997b355055c4b
Author: Carl Love < ca...@us... >
Date: Tue Feb 5 10:15:09 2019 -0600
Just wanted to make sure you knew the PPC 64 issue has been resolved.
Have fun!!
Carl Love
|
|
From: Rhys K. <rhy...@gm...> - 2019-02-28 03:58:43
|
I've also created a bug report to hold the six patches that comprise this series: https://bugs.kde.org/show_bug.cgi?id=404888 Any review would be welcomed, before I push these to master branch. On Wed, 6 Feb 2019 at 03:56, Carl Love <ce...@us...> wrote: > Rhys: > > On Mon, 2019-02-04 at 16:11 -0500, Rhys Kidd wrote: > > > > > > > So, from my point of view, that all looks ok. > > > I however suggest to wait till the ppc64 breakage is fixed > > > before pushing (also, that will give some more > > > time for other developers to comment your patches). > > > > No problem. That sounds reasonable to wait a little longer. > > > > I have committed the fix for the PPC64 breakage, > > commit de7fc1a0593ca94835bba5f9732997b355055c4b > Author: Carl Love < ca...@us... > > Date: Tue Feb 5 10:15:09 2019 -0600 > > Just wanted to make sure you knew the PPC 64 issue has been resolved. > Have fun!! > > Carl Love > > |