Re: [PATCH] dtc: also check <yaml.h> for libyaml

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 9, 2020 at 10:01 AM Jiping Ma <Jiping.Ma2@xxxxxxxxxxxxx> wrote:
>
>
>
> On 06/09/2020 03:09 AM, Rob Herring wrote:
> > On Mon, Jun 8, 2020 at 2:42 AM Jiping Ma <jiping.ma2@xxxxxxxxxxxxx> wrote:
> >> yamltree.c includes <yaml.h>, If /usr/include/yaml.h does not exist,
> >> it fails to build.
> > Does this patch fix your issue?:
> >
> > https://lore.kernel.org/linux-devicetree/20200505100319.741454-1-masahiroy@xxxxxxxxxx/
> No, it did not fix the issue.
>
> $ pkg-config --cflags yaml-0.1
>
> $ pkg-config yaml-0.1 --libs
> -L/buildarea/jma1/wr-19-0518/19.45/sysroots/aarch64-wrs-linux/usr/lib64
> -lyaml




If I install libyaml to a non-standard location
(/home/masahiro/foo), my pkg-config shows as follows:



masahiro@oscar:~$ pkg-config --cflags   yaml-0.1
-I/home/masahiro/foo/include
masahiro@oscar:~$ pkg-config --libs   yaml-0.1
-L/home/masahiro/foo/lib -lyaml







> >
> >
> >> Signed-off-by: Jiping Ma <jiping.ma2@xxxxxxxxxxxxx>
> >> ---
> >>   scripts/dtc/Makefile | 4 ++++
> >>   1 file changed, 4 insertions(+)
> >>
> >> diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile
> >> index b5a5b1c..b49dfea 100644
> >> --- a/scripts/dtc/Makefile
> >> +++ b/scripts/dtc/Makefile
> >> @@ -18,9 +18,13 @@ $(error dtc needs libyaml for DT schema validation support. \
> >>   endif
> >>   HOST_EXTRACFLAGS += -DNO_YAML
> >>   else
> >> +ifeq ($(wildcard /usr/include/yaml.h),)
> >> +HOST_EXTRACFLAGS += -DNO_YAML
> >> +else
> >>   dtc-objs       += yamltree.o
> >>   HOSTLDLIBS_dtc := $(shell pkg-config yaml-0.1 --libs)
> >>   endif
> >> +endif
> >>
> >>   # Generated files need one more search path to include headers in source tree
> >>   HOSTCFLAGS_dtc-lexer.lex.o := -I $(srctree)/$(src)
> >> --
> >> 1.9.1
> >>
>


-- 
Best Regards
Masahiro Yamada



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux