Patchwork libffi: Copy headers to more common include path.

login
register
mail settings
Submitter Fahad Arslan
Date Dec. 12, 2013, 5:47 p.m.
Message ID <1386870464-41010-1-git-send-email-fahad_arslan@mentor.com>
Download mbox | patch
Permalink /patch/63291/
State New
Headers show

Comments

Fahad Arslan - Dec. 12, 2013, 5:47 p.m.
Signed-off-by: Fahad Arslan <fahad_arslan@mentor.com>
---
 meta/recipes-gnome/libffi/libffi_3.0.13.bb |    5 +++++
 1 file changed, 5 insertions(+)
Richard Purdie - Dec. 12, 2013, 5:57 p.m.
On Thu, 2013-12-12 at 22:47 +0500, Fahad Arslan wrote:
> Signed-off-by: Fahad Arslan <fahad_arslan@mentor.com>
> ---
>  meta/recipes-gnome/libffi/libffi_3.0.13.bb |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/meta/recipes-gnome/libffi/libffi_3.0.13.bb b/meta/recipes-gnome/libffi/libffi_3.0.13.bb
> index db0841e..07dd7d1 100644
> --- a/meta/recipes-gnome/libffi/libffi_3.0.13.bb
> +++ b/meta/recipes-gnome/libffi/libffi_3.0.13.bb
> @@ -22,3 +22,8 @@ inherit autotools
>  FILES_${PN}-dev += "${libdir}/libffi-${PV}"
>  
>  BBCLASSEXTEND = "native nativesdk"
> +
> +do_install_append() {
> +    install -d ${D}${includedir}
> +    cp -r ${D}${libdir}/libffi-${PV}/include/* ${D}${includedir}/ || true
> +}

Why? Shouldn't whatever is using them look for them in the correct
location?

Cheers,

Richard
Mark Hatle - Dec. 12, 2013, 6:04 p.m.
On 12/12/13, 11:57 AM, Richard Purdie wrote:
> On Thu, 2013-12-12 at 22:47 +0500, Fahad Arslan wrote:
>> Signed-off-by: Fahad Arslan <fahad_arslan@mentor.com>
>> ---
>>   meta/recipes-gnome/libffi/libffi_3.0.13.bb |    5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/meta/recipes-gnome/libffi/libffi_3.0.13.bb b/meta/recipes-gnome/libffi/libffi_3.0.13.bb
>> index db0841e..07dd7d1 100644
>> --- a/meta/recipes-gnome/libffi/libffi_3.0.13.bb
>> +++ b/meta/recipes-gnome/libffi/libffi_3.0.13.bb
>> @@ -22,3 +22,8 @@ inherit autotools
>>   FILES_${PN}-dev += "${libdir}/libffi-${PV}"
>>
>>   BBCLASSEXTEND = "native nativesdk"
>> +
>> +do_install_append() {
>> +    install -d ${D}${includedir}
>> +    cp -r ${D}${libdir}/libffi-${PV}/include/* ${D}${includedir}/ || true
>> +}
>
> Why? Shouldn't whatever is using them look for them in the correct
> location?

Correct, I think this is wrong as well.  Most of the time when versions are 
included into the include path, the system may allow for multiple versions to be 
installed and used at the same time.

--Mark

> Cheers,
>
> Richard
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
Fahad Arslan - Dec. 13, 2013, 11:49 a.m.
My understanding was that headers should be placed under ${includedir} instead of 
${libdir}. Isn't it the practice or am I missing something?

Thanks,
Fahad
Ross Burton - Dec. 13, 2013, 12:09 p.m.
On 13 December 2013 11:49, Arslan, Fahad <Fahad_Arslan@mentor.com> wrote:
> My understanding was that headers should be placed under ${includedir} instead of
> ${libdir}. Isn't it the practice or am I missing something?

If the headers are machine-specific then it's conventional to put a
user-visible include $includedir (arch-independent) which then
includes files from $libdir (arch-dependent).

Considering libffi needs to know details of the calling convention on
the machine, this is presumably what's happening.  GLib does the same.

Ross

Patch

diff --git a/meta/recipes-gnome/libffi/libffi_3.0.13.bb b/meta/recipes-gnome/libffi/libffi_3.0.13.bb
index db0841e..07dd7d1 100644
--- a/meta/recipes-gnome/libffi/libffi_3.0.13.bb
+++ b/meta/recipes-gnome/libffi/libffi_3.0.13.bb
@@ -22,3 +22,8 @@  inherit autotools
 FILES_${PN}-dev += "${libdir}/libffi-${PV}"
 
 BBCLASSEXTEND = "native nativesdk"
+
+do_install_append() {
+    install -d ${D}${includedir}
+    cp -r ${D}${libdir}/libffi-${PV}/include/* ${D}${includedir}/ || true
+}