mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
build: define CGO_CFLAGS_ALLOW with -U option we need
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@redhat.com>
This commit is contained in:
committed by
Richard W.M. Jones
parent
a3320aaa50
commit
644a6e4637
7
run.in
7
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
|
||||
|
||||
Reference in New Issue
Block a user