On Mon, Oct 07, 2019 at 11:47:21AM +0200, Tomáš Golembiovský wrote:
cgo does not allow arbitrary CFLAGS to be used. Instead it contains
a
list of flags (safelist) that are allowed to be passed to the compiler.
Sadly -U option (introduced in commit d8d8c856a1) is not among them.
See:
https://github.com/golang/go/issues/23672
Signed-off-by: Tomáš Golembiovský <tgolembi(a)redhat.com>
---
run.in | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/run.in b/run.in
index 7e4963cdf..2c43cf87a 100755
--- a/run.in
+++ b/run.in
@@ -187,6 +187,13 @@ else
CGO_CFLAGS="$CGO_CFLAGS -I$s/lib"
fi
export CGO_CFLAGS
+if [ -z "$CGO_CFLAGS_ALLOW" ]; then
+ CGO_CFLAGS_ALLOW='-UGUESTFS_NO_DEPRECATED'
+ export CGO_CFLAGS_ALLOW
+else
+ echo "Warning: CGO_CFLAGS_ALLOW already defined! Be sure to include"
+ echo "the -U option."
+fi
if [ -z "$CGO_LDFLAGS" ]; then
CGO_LDFLAGS="-L$b/lib/.libs"
else
This looks fine, ACK. I can push it shortly.
Thanks,
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v