The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/go-lxc/pull/131

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Fetching linker flags should be left to distribution maintainers or developers as they may have compiled liblxc with different flags. Switching pkg-config will help as it's pc files are trivially editable and are present on most distributions.
From dc3bff2b6c215b54fcbf116d41b5c4ba00ff6c8c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mihai-Drosi=20C=C3=A2ju?= <mc...@cisco.com>
Date: Tue, 25 Jun 2019 16:06:23 +0300
Subject: [PATCH] Switch to fetching linker flags from pkg-config

---
 linking_dynamic.go | 2 +-
 linking_static.go  | 3 ++-
 lxc-binding.go     | 1 -
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/linking_dynamic.go b/linking_dynamic.go
index 1197b81..fdd8bbc 100644
--- a/linking_dynamic.go
+++ b/linking_dynamic.go
@@ -6,5 +6,5 @@
 
 package lxc
 
-// #cgo LDFLAGS: -llxc -lutil
+// #cgo pkg-config: lxc
 import "C"
diff --git a/linking_static.go b/linking_static.go
index 89f06b4..8e9c626 100644
--- a/linking_static.go
+++ b/linking_static.go
@@ -6,5 +6,6 @@
 
 package lxc
 
-// #cgo LDFLAGS: -static -llxc -lseccomp -lutil -lcap
+// #cgo pkg-config: --static lxc
+// #cgo LDFLAGS: -static
 import "C"
diff --git a/lxc-binding.go b/lxc-binding.go
index 61462a1..c079fc2 100644
--- a/lxc-binding.go
+++ b/lxc-binding.go
@@ -6,7 +6,6 @@
 
 package lxc
 
-// #cgo pkg-config: lxc
 // #include <lxc/lxccontainer.h>
 // #include <lxc/version.h>
 // #include "lxc-binding.h"
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to