[PATCH] scripts/dtc: Call pkg-config POSIXly correct

Thomas Bracht Laumann Jespersen posted 1 patch 4 years, 4 months ago
scripts/dtc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] scripts/dtc: Call pkg-config POSIXly correct
Posted by Thomas Bracht Laumann Jespersen 4 years, 4 months ago
Running with POSIXLY_CORRECT=1 in the environment the scripts/dtc build
fails, because pkg-config doesn't output anything when the flags come
after the arguments.

Fixes: f8d8b46cd20e ("scripts/dtc: use pkg-config to include <yaml.h> in non-standard path")
Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
---
I'm aware that the full kernel doesn't build with POSIXLY_CORRECT set, but I
asked around and was told just to submit a patch.

This is based on the v5.17-rc2 tag, not sure if that's the right tree to work
from, I'll happily cherry-pick to another tree if desired.

 scripts/dtc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile
index 95aaf7431bff..1cba78e1dce6 100644
--- a/scripts/dtc/Makefile
+++ b/scripts/dtc/Makefile
@@ -29,7 +29,7 @@ dtc-objs	+= yamltree.o
 # To include <yaml.h> installed in a non-default path
 HOSTCFLAGS_yamltree.o := $(shell pkg-config --cflags yaml-0.1)
 # To link libyaml installed in a non-default path
-HOSTLDLIBS_dtc	:= $(shell pkg-config yaml-0.1 --libs)
+HOSTLDLIBS_dtc	:= $(shell pkg-config --libs yaml-0.1)
 endif
 
 # Generated files need one more search path to include headers in source tree
-- 
2.34.1

Re: [PATCH] scripts/dtc: Call pkg-config POSIXly correct
Posted by Rob Herring 4 years, 4 months ago
On Mon, Jan 31, 2022 at 5:20 AM Thomas Bracht Laumann Jespersen
<t@laumann.xyz> wrote:
>
> Running with POSIXLY_CORRECT=1 in the environment the scripts/dtc build
> fails, because pkg-config doesn't output anything when the flags come
> after the arguments.
>
> Fixes: f8d8b46cd20e ("scripts/dtc: use pkg-config to include <yaml.h> in non-standard path")

It's actually 067c650c456e ("dtc: Use pkg-config to locate libyaml")
that you are fixing.

I can fix when applying.

Rob
Re: [PATCH] scripts/dtc: Call pkg-config POSIXly correct
Posted by Thomas Bracht Laumann Jespersen 4 years, 4 months ago
> It's actually 067c650c456e ("dtc: Use pkg-config to locate libyaml")
> that you are fixing.
> 
> I can fix when applying.

You are correct, my bad! Thanks.

-- Thomas