<p dir="ltr"><br>
On Aug 26, 2015 9:11 AM, &quot;Patrick Ohly&quot; &lt;<a href="mailto:patrick.ohly@intel.com">patrick.ohly@intel.com</a>&gt; wrote:<br>
&gt;<br>
&gt; The unconditional removal of -DWITHOUT_XATTR accidentally introduced a<br>
&gt; compile-time dependency on &quot;acl&quot;, because &quot;sys/acl.h&quot; gets<br>
&gt; included. This caused random compile failures.<br>
&gt;<br>
&gt; To fix this, we introduce a proper PACKAGECONFIG for the &quot;xattr&quot;<br>
&gt; support, with the distro&#39;s &quot;xattr&quot; feature determining the<br>
&gt; default. Setting the define must be done with custom code because<br>
&gt; PACKAGECONFIG can only influence configure parameters.<br>
&gt;<br>
&gt; The &quot;acl&quot; distro feature is not checked because although enabling<br>
&gt; &quot;xattr&quot; support now triggers a build of acl, nothing from it will not<br>
&gt; get included in the resulting target image. This seems more suitable<br>
&gt; than not enabling xattr support in mtd-utils when acl support in the<br>
&gt; distro is disabled.<br>
&gt;<br>
&gt; Signed-off-by: Patrick Ohly &lt;<a href="mailto:patrick.ohly@intel.com">patrick.ohly@intel.com</a>&gt;<br>
&gt; ---<br>
&gt; Â meta/recipes-devtools/mtd/<a href="http://mtd-utils_git.bb">mtd-utils_git.bb</a> | 8 +++++++-<br>
&gt; Â 1 file changed, 7 insertions(+), 1 deletion(-)<br>
&gt;<br>
&gt; diff --git a/meta/recipes-devtools/mtd/<a href="http://mtd-utils_git.bb">mtd-utils_git.bb</a> b/meta/recipes-devtools/mtd/<a href="http://mtd-utils_git.bb">mtd-utils_git.bb</a><br>
&gt; index 8d4892a..17dca77 100644<br>
&gt; --- a/meta/recipes-devtools/mtd/<a href="http://mtd-utils_git.bb">mtd-utils_git.bb</a><br>
&gt; +++ b/meta/recipes-devtools/mtd/<a href="http://mtd-utils_git.bb">mtd-utils_git.bb</a><br>
&gt; @@ -19,7 +19,13 @@ SRC_URI = &quot;git://<a href="http://git.infradead.org/mtd-utils.git">git.infradead.org/mtd-utils.git</a> \<br>
&gt;<br>
&gt; Â S = &quot;${WORKDIR}/git/&quot;<br>
&gt;<br>
&gt; -EXTRA_OEMAKE = &quot;&#39;CC=${CC}&#39; &#39;RANLIB=${RANLIB}&#39; &#39;AR=${AR}&#39; &#39;CFLAGS=${CFLAGS} -I${S}/include&#39; &#39;BUILDDIR=${S}&#39;&quot;<br>
&gt; +# xattr support creates an additional compile-time dependency on acl because<br>
&gt; +# the sys/acl.h header is needed. libacl is not needed and thus enabling xattr<br>
&gt; +# regardless whether acl is enabled or disabled in the distro should be okay.<br>
&gt; +PACKAGECONFIG ?= &quot;${@bb.utils.contains(&#39;DISTRO_FEATURES&#39;, &#39;xattr&#39;, &#39;xattr&#39;, &#39;&#39;, d)}&quot;<br>
&gt; +PACKAGECONFIG[xattr] = &quot;,,acl,&quot;<br>
&gt; +<br>
&gt; +EXTRA_OEMAKE = &quot;&#39;CC=${CC}&#39; &#39;RANLIB=${RANLIB}&#39; &#39;AR=${AR}&#39; &#39;CFLAGS=${CFLAGS} ${@bb.utils.contains(&#39;PACKAGECONFIG&#39;, &#39;xattr&#39;, &#39;&#39;, &#39;-DWITHOUT_XATTR&#39;, d)} -I${S}/include&#39; &#39;BUILDDIR=${S}&#39;&quot;<br>
&gt;<br>
Do I see a spurious &quot; in the middle<br>
&gt; Â do_install () {<br>
&gt; Â  Â  Â  Â  oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}<br>
&gt; --<br>
&gt; 2.1.4<br>
&gt;<br>
&gt; --<br>
&gt; _______________________________________________<br>
&gt; Openembedded-core mailing list<br>
&gt; <a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
&gt; <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</p>