cmd/go: "#cgo pkg-config:" comments do not work with gccgo
Bug #1475533 reported by
Matthias Klose
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc |
Unknown
|
Unknown
|
|||
gcc-5 (Ubuntu) |
Fix Released
|
High
|
Michael Hudson-Doyle |
Bug Description
see https:/
recipe for work around: https:/
Changed in gcc-5 (Ubuntu): | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in gcc-5 (Ubuntu): | |
assignee: | nobody → Michael Hudson-Doyle (mwhudson) |
To post a comment you must log in.
as long as this is not yet implemented, you can work around this by:
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
ifneq (,$(filter $(DEB_HOST_ARCH), powerpc s390x))
pkg_configs = dbus-1 libnih libnih-dbus glib-2.0 gobject-2.0 ... and more
export CGO_CFLAGS := \
$(shell $(foreach pkg, $(pkg_configs), pkg-config --cflags $(pkg); ))
export CGO_CXXFLAGS := $(CGO_CFLAGS)
export CGO_LDFLAGS := \
$(shell $(foreach pkg, $(pkg_configs), pkg-config --libs $(pkg); ))
$(warning setting CGO_CFLAGS = $(CGO_CFLAGS))
$(warning setting CGO_CXXFLAGS = $(CGO_CXXFLAGS))
$(warning setting CGO_LDFLAGS = $(CGO_LDFLAGS))
endif