[Libguestfs] [PATCH] ruby: fix order of CFLAGS

Richard W.M. Jones rjones at redhat.com
Thu Aug 10 18:58:03 UTC 2017


On Thu, Aug 10, 2017 at 03:08:33PM +0200, Pino Toscano wrote:
> Shuffle the order of the various CFLAGS used when building the Ruby
> extension: first the flags from manywarnings (gnulib), then libguestfs
> own CFLAGS, and then -DGUESTFS_PRIVATE=1 (so it is not overridden).
> 
> This matches also what happens in automake parts, and makes it possible
> to override any flags from manywarnings also in the Ruby extension.
> ---
>  ruby/ext/guestfs/extconf.rb.in | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/ruby/ext/guestfs/extconf.rb.in b/ruby/ext/guestfs/extconf.rb.in
> index c4551fa6c..6b806101e 100644
> --- a/ruby/ext/guestfs/extconf.rb.in
> +++ b/ruby/ext/guestfs/extconf.rb.in
> @@ -33,8 +33,9 @@ have_func("rb_define_alloc_func")
>  have_type("rb_alloc_func_t")
>  
>  $CFLAGS =
> -  "#{$CFLAGS} @CFLAGS@ -DGUESTFS_PRIVATE=1 " <<
> -  "@WARN_CFLAGS@ @WERROR_CFLAGS@"
> +  "#{$CFLAGS} " <<
> +  "@WARN_CFLAGS@ @WERROR_CFLAGS@ " <<
> +  "@CFLAGS@ -DGUESTFS_PRIVATE=1"
>  
>  create_header
>  create_makefile(extension_name, "@abs_srcdir@")

ACK.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
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/




More information about the Libguestfs mailing list