Skip to contentSkip to conversation

libffi: fix native build being not portable

PATCH Superseded Maxime Roussin-Bélanger 2 participants 2 messages Jun 21, 2022

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 libffi: fix native build being not portable

From: Maxime Roussin-Bélanger <[email protected]>

Without --with-gcc-arch=generic libffi looks up the cpuid to automatically determine which mtune/march to use. This makes the native sstate-cache unuseable since it's possible to have a newer cpu building the recipe and the library being pulled from another older cpu which doesn't have the instruction.

---
 meta/recipes-support/libffi/libffi_3.4.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/libffi/libffi_3.4.2.bb +1 -1
index 733fcc5e6c..71d9518baf 100644
@@ -19,6 +19,7 @@ UPSTREAM_CHECK_URI = "https://github.com/libffi/libffi/releases/"
 UPSTREAM_CHECK_REGEX = "libffi-(?P<pver>\d+(\.\d+)+)\.tar"
 
 EXTRA_OECONF += "--disable-builddir --disable-exec-static-tramp"
+EXTRA_OECONF:class-native += "--with-gcc-arch=generic"
 EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'"
 inherit autotools texinfo multilib_header
 
@@ -33,4 +34,3 @@ FILES:${PN}-dev += "${libdir}/libffi-${PV}"
 MIPS_INSTRUCTION_SET = "mips"
 
 BBCLASSEXTEND = "native nativesdk"
-
Signature · 1 line
2.36.0
#1 lore raw

Hi Maxime,

Maxime Roussin-Bélanger <[email protected]> escreveu no dia terça, 21/06/2022 à(s) 15:05:

Quoted 10 lines

From: Maxime Roussin-Bélanger <[email protected]>

Without --with-gcc-arch=generic libffi looks up the cpuid to automatically determine
which mtune/march to use. This makes the native sstate-cache unuseable since it's
possible to have a newer cpu building the recipe and the library being pulled from
another older cpu which doesn't have the instruction.

Please add your sign off

Jose

Quoted 38 lines
---
 meta/recipes-support/libffi/libffi_3.4.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/libffi/libffi_3.4.2.bb +0 -0
index 733fcc5e6c..71d9518baf 100644
@@ -19,6 +19,7 @@ UPSTREAM_CHECK_URI = "

https://github.com/libffi/libffi/releases/"
UPSTREAM_CHECK_REGEX = "libffi-(?P<pver>\d+(\.\d+)+)\.tar"

EXTRA_OECONF += "--disable-builddir --disable-exec-static-tramp"

meta/recipes-support/libffi/libffi_3.4.2.bb +1 -2
+EXTRA_OECONF:class-native += "--with-gcc-arch=generic"
 EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'"
 inherit autotools texinfo multilib_header
@@ -33,4 +34,3 @@ FILES:${PN}-dev += "${libdir}/libffi-${PV}"
 MIPS_INSTRUCTION_SET = "mips"
 
 BBCLASSEXTEND = "native nativesdk"
-
--

2.36.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#167154):
https://lists.openembedded.org/g/openembedded-core/message/167154
Mute This Topic: https://lists.openembedded.org/mt/91900128/5052612
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
Best regards,

José Quaresma