tools/pkg-config: pass arguments at the end
authorArthur Skowronek <arthur.skowronek@tuta.io>
Mon, 15 Oct 2018 12:55:57 +0000 (14:55 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 20 Oct 2018 14:24:29 +0000 (16:24 +0200)
Go for openwrt passes pkg-config arguments in the format of

        pkg-config --cflags -- pkg-name

which in turn will be passed down to the real pkg-config as something
like

        pkg-config.real --cflags -- pkg-name --define...

and causes the real pkg-config implementation to missinterpret the given
argument list.

This also helps to fix https://github.com/golang/go/issues/27940

Signed-off-by: Arthur Skowronek <arthur.skowronek@tuta.io>
tools/pkg-config/files/pkg-config

index e58b13216dc6cbd635c56a25048ca5918290bee9..bf95380e7fe81a946684a70d42744bf005b7c7ff 100755 (executable)
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-pkg-config.real $@ --define-variable=prefix=${STAGING_PREFIX} --define-variable=exec_prefix=${STAGING_PREFIX}
+pkg-config.real --define-variable=prefix=${STAGING_PREFIX} --define-variable=exec_prefix=${STAGING_PREFIX} $@