Comment 1 for bug 1475533

Revision history for this message
Matthias Klose (doko) wrote :

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