Subject: Re: [bug#36477] [PATCH 27/31] gnu: pkg-config: Fix cross-compilation.

From: Mathieu Othacehe <[email-masked]>
Date: Thu, 25 Jul 2019 17:27:50 +0200

> Are these indicative of a problem in our cross stack, or a bug in the
> pkg-config build system/code?
>
> LGTM anyway.

No those bits seems to be needed because of a problem in pkg-config
itself. See this nixpkg pkg-config package snippet:

--8<---------------cut here---------------start------------->8---
  configureFlags = [ "--with-internal-glib" ]
    ++ optional (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ]
       # Can't run these tests while cross-compiling
    ++ optional (stdenv.hostPlatform != stdenv.buildPlatform)
       [ "glib_cv_stack_grows=no"
         "glib_cv_uscore=no"
         "ac_cv_func_posix_getpwuid_r=yes"
         "ac_cv_func_posix_getgrgid_r=yes"
       ];
--8<---------------cut here---------------end--------------->8---

Mathieu