Fix gcc-ism in python build (John Levon)

This commit is contained in:
Daniel P. Berrange 2008-12-18 12:20:00 +00:00
parent 829b6420d8
commit 264ed02079
3 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,9 @@
Thu Dec 18 12:18:58 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
Fix gcc-ism in python build (John Levon)
* acinclude.m4: Add -Wno-redundant-decls check for compiler
* python/Makefile.am: Remove hardcoded -Wno-redundant-decls
Thu Dec 18 12:11:58 GMT 2008 Daniel P. Berrange <berrange@redhat.com> Thu Dec 18 12:11:58 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
* src/remote_internal.c: Don't free event after queueing it * src/remote_internal.c: Don't free event after queueing it

View File

@ -87,6 +87,12 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
WARN_CFLAGS="$compiler_flags $complCFLAGS" WARN_CFLAGS="$compiler_flags $complCFLAGS"
AC_SUBST(WARN_CFLAGS) AC_SUBST(WARN_CFLAGS)
dnl Needed to keep compile quiet on python 2.4
COMPILER_FLAGS=
gl_COMPILER_FLAGS(-Wno-redundant-decls)
WARN_PYTHON_CFLAGS=$COMPILER_FLAGS
AC_SUBST(WARN_PYTHON_CFLAGS)
]) ])

View File

@ -34,8 +34,9 @@ all-local: libvirt.py
python_LTLIBRARIES = libvirtmod.la python_LTLIBRARIES = libvirtmod.la
libvirtmod_la_SOURCES = libvir.c types.c libvirt-py.c libvirt-py.h libvirtmod_la_SOURCES = libvir.c types.c libvirt-py.c libvirt-py.h
# Python header files contain a redundant decl, hence: # Python <= 2.4 header files contain a redundant decl, hence we
libvirtmod_la_CFLAGS = -Wno-redundant-decls # need extra flags here
libvirtmod_la_CFLAGS = @WARN_PYTHON_CFLAGS@
libvirtmod_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/.libs \ libvirtmod_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/.libs \
@CYGWIN_EXTRA_LDFLAGS@ @CYGWIN_EXTRA_LDFLAGS@