Martin Kletzander
2013-Sep-04  11:42 UTC
[Libguestfs] [PATCH 0/2] Clean up compilation from git a little bit
SSIA Martin Kletzander (2): Don't redefine _FORTIFY_SOURCE Get rid of gnulib error bootstrap | 2 +- configure.ac | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) -- 1.8.3.2
Martin Kletzander
2013-Sep-04  11:42 UTC
[Libguestfs] [PATCH 1/2] Don't redefine _FORTIFY_SOURCE
The macro _FORTIFY_SOURCE might be already defined by environment in
which case it shouldn't be overriden (might be if it has lower value).
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
---
 configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 4940df3..47dc2b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -196,7 +196,8 @@ if test "$gl_gcc_warnings" = yes; then
     AC_DEFINE([GNULIB_PORTCHECK], [1], [Enable some gnulib portability
checks.])
     AH_VERBATIM([FORTIFY_SOURCE],[
 /* Enable compile-time and run-time bounds-checking, and some warnings. */
-#if __OPTIMIZE__
+#if __OPTIMIZE__ && (! defined (_FORTIFY_SOURCE) || _FORTIFY_SOURCE
< 2)
+# undef _FORTIFY_SOURCE
 # define _FORTIFY_SOURCE 2
 #endif])
 fi
-- 
1.8.3.2
Even though this doesn't stop the compile phase, I find it a bit
distracting that this is what I get with bootstrap:
../.gnulib/gnulib-tool: *** cannot find ./configure.ac - make sure you
run gnulib-tool from within your package's directory
../.gnulib/gnulib-tool: *** Stop.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
---
Notes:
    The parameter '--dir' should suffice, even though I must admit
I'm not
    sure it doesn't mess something else up.  It seems cleaner than making
    a symlink to configure.ac in daemon/.
 bootstrap | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bootstrap b/bootstrap
index 227a5fd..b4afcdb 100755
--- a/bootstrap
+++ b/bootstrap
@@ -34,7 +34,7 @@ libtoolize --copy --install
 gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
 <$gnulib_tool || exit
-(cd daemon && mkdir -p tests lib && ../$gnulib_tool --update)
+(cd daemon && mkdir -p tests lib && ../$gnulib_tool --dir=..
--update)
 modules='
 accept4
-- 
1.8.3.2
Richard W.M. Jones
2013-Sep-05  09:19 UTC
Re: [Libguestfs] [PATCH 0/2] Clean up compilation from git a little bit
On Wed, Sep 04, 2013 at 01:42:38PM +0200, Martin Kletzander wrote:> SSIA > > Martin Kletzander (2): > Don't redefine _FORTIFY_SOURCE > Get rid of gnulib errorThanks - I will push them both shortly. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
Maybe Matching Threads
- [PATCH] build: build mlaugeas with -Wno-shift-negative-value
- src/ is now warning-free, too
- syslinux et al misbehave severely when BOOT_IMAGE= is present on append-line already
- [PATCH] configure: Don't define _FORTIFY_SOURCE.
- total warning-removal for daemon/