libffi: fix multilib header conflict
PATCH v5 1/1 libffi: fix multilib header conflict
From: Changqing Li <[email protected]>
fix error:
file /usr/include/ffitarget.h conflicts between attempted installs of lib32-libffi-dev-3.3-r0.armv7vet2hf_vfp and libffi-dev-3.3-r0.cortexa57
part of diff
#ifndef LIBFFI_ASM
-typedef unsigned long ffi_arg;
-typedef signed long ffi_sarg;
-
-typedef enum ffi_abi {
- FFI_FIRST_ABI = 0, - FFI_SYSV, - FFI_VFP, - FFI_LAST_ABI,
-#if defined(__ARM_PCS_VFP) || defined(_M_ARM)
- FFI_DEFAULT_ABI = FFI_VFP,
+#ifdef __ILP32__
+#define FFI_SIZEOF_ARG 8
+#define FFI_SIZEOF_JAVA_RAW 4
+typedef unsigned long long ffi_arg;
+typedef signed long long ffi_sarg;
+#elif defined(_M_ARM64)
+#define FFI_SIZEOF_ARG 8
+typedef unsigned long long ffi_arg;
+typedef signed long long ffi_sarg;
#else
- FFI_DEFAULT_ABI = FFI_SYSV,
-#endif
-} ffi_abi;
+typedef unsigned long ffi_arg;
+typedef signed long ffi_sarg;
#endif
-#define FFI_EXTRA_CIF_FIELDS \
- int vfp_used; \ - unsigned short vfp_reg_free, vfp_nargs; \ - signed char vfp_args[16] \
-
-#define FFI_TARGET_SPECIFIC_VARIADIC
-#ifndef _M_ARM
-#define FFI_TARGET_HAS_COMPLEX_TYPE
+typedef enum ffi_abi
+ {
+ FFI_FIRST_ABI = 0, + FFI_SYSV, + FFI_LAST_ABI, + FFI_DEFAULT_ABI = FFI_SYSV
+ } ffi_abi;
#endif
/* ---- Definitions for closures ----------------------------------------- */
#define FFI_CLOSURES 1
-#define FFI_GO_CLOSURES 1
#define FFI_NATIVE_RAW_API 0
#if defined (FFI_EXEC_TRAMPOLINE_TABLE) && FFI_EXEC_TRAMPOLINE_TABLE
#ifdef __MACH__
-#define FFI_TRAMPOLINE_SIZE 12
-#define FFI_TRAMPOLINE_CLOSURE_OFFSET 8
+#define FFI_TRAMPOLINE_SIZE 16
+#define FFI_TRAMPOLINE_CLOSURE_OFFSET 16
#else
#error "No trampoline table implementation"
#endif
#else
-#ifdef _MSC_VER
-#define FFI_TRAMPOLINE_SIZE 16
-#define FFI_TRAMPOLINE_CLOSURE_FUNCTION 12 -#else
-#define FFI_TRAMPOLINE_SIZE 12
-#endif
+#define FFI_TRAMPOLINE_SIZE 24
#define FFI_TRAMPOLINE_CLOSURE_OFFSET FFI_TRAMPOLINE_SIZE #endif
+#ifdef _M_ARM64
+#define FFI_EXTRA_CIF_FIELDS unsigned is_variadic +#endif
+
--- meta/recipes-support/libffi/libffi_3.3.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/libffi/libffi_3.3.bb +1 -1
@@ -28,7 +28,7 @@ EXTRA_OEMAKE_class-target = "LIBTOOLFLAGS='--tag=CC'" inherit autotools texinfo multilib_header do_install_append() { - oe_multilib_header ffi.h + oe_multilib_header ffi.h ffitarget.h } FILES_${PN}-dev += "${libdir}/libffi-${PV}"
Signature · 1 line
2.17.1
PATCH v6 1/1 gpgme: fix multilib header conflict
From: Changqing Li <[email protected]>
fix error:
file /usr/include/gpgme.h conflicts between attempted installs of gpgme-dev-1.13.1-r0.core2_64 and lib32-gpgme-dev-1.13.1-r0.core2_32
part of diff:
-#if 64
+#if 0
#ifndef _FILE_OFFSET_BITS
-#error GPGME was compiled with _FILE_OFFSET_BITS = 64, please see the section "Largefile support (LFS)" in the GPGME manual. +#error GPGME was compiled with _FILE_OFFSET_BITS = 0, please see the section "Largefile support (LFS)" in the GPGME manual.
#else
-#if (_FILE_OFFSET_BITS) != (64)
-#error GPGME was compiled with a different value for _FILE_OFFSET_BITS, namely 64, please see the section "Largefile support (LFS)" in the GPGME manual. +#if (_FILE_OFFSET_BITS) != (0)
+#error GPGME was compiled with a different value for _FILE_OFFSET_BITS, namely 0, please see the section "Largefile support (LFS)" in the GPGME manual.
#endif
#endif
#endif
LFS support is enabled by default, and this header is generated during build according to current configure
--- meta/recipes-support/gpgme/gpgme_1.13.1.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-support/gpgme/gpgme_1.13.1.bb +5 -1
@@ -59,7 +59,7 @@ EXTRA_OECONF += '--enable-languages="${LANGUAGES}" \ --disable-lang-python-test \ ' -inherit autotools texinfo binconfig-disabled pkgconfig distutils-common-base ${PYTHON_INHERIT} +inherit autotools texinfo binconfig-disabled pkgconfig distutils-common-base ${PYTHON_INHERIT} multilib_header export PKG_CONFIG='pkg-config'
@@ -83,3 +83,7 @@ do_configure_prepend () { rm -f ${S}/m4/libassuan.m4 rm -f ${S}/m4/python.m4 } + +do_install_append() { + oe_multilib_header gpgme.h +}
Signature · 1 line
2.17.1
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [OE-core] [PATCH V6] gpgme: fix multilib header conflict
Hi, Richard
Maybe I didn't make things clear, gpgme is build with LFS enabled by default for both lib32-gpgme and gpgme.
for 64bit, _FILE_OFFSET_BITS is set to 0, and for 32bit, _FILE_OFFSET_BITS is set to 64. And this is same as the diff part said.
And here is part of section "Largefile support (LFS)" in the GPGME manual:
On POSIX platforms GPGME is compiled using largefile support by default. This means that your application must do the same, at least as far as it is relevant for using the gpgme.h header file. All types in this header files refer to their largefile counterparts, if they are different from any default types on the system.
On POSIX platforms you can enable largefile support, if it is different from the default on the system the application is compiled on, by using the Autoconf macro AC_SYS_LARGEFILE. If you do this, then you don’t need to worry about anything else: It will just work. In this case you might also want to use AC_FUNC_FSEEKO to take advantage of some new interfaces, and AC_TYPE_OFF_T (just in case).
If you do not use Autoconf, you can define the preprocessor symbol _FILE_OFFSET_BITS to 64 before including any header files, for example by specifying the option -D_FILE_OFFSET_BITS=64 on the compiler command line. You will also want to define the preprocessor symbol LARGEFILE_SOURCE to 1 in this case, to take advantage of some new interfaces.
And this header gpgme.h can used to check if application using gpgme have same configuration (like _FILE_OFFSET_BITS) as gpgme. so I think this patch is also needed.
//Changqing
Quoted 51 lines · Changqing Li
From: Changqing Li <[email protected]>
fix error:
file/usr/include/gpgme.hconflicts between attempted installs of gpgme-dev-1.13.1-r0.core2_64 and lib32-gpgme-dev-1.13.1-r0.core2_32part of diff:
(quoted diff) +4
-4-#if 64 +#if 0 #ifndef _FILE_OFFSET_BITS -#error GPGME was compiled with _FILE_OFFSET_BITS = 64, please see the section "Largefile support (LFS)" in the GPGME manual. +#error GPGME was compiled with _FILE_OFFSET_BITS = 0, please see the section "Largefile support (LFS)" in the GPGME manual. #else -#if (_FILE_OFFSET_BITS) != (64) -#error GPGME was compiled with a different value for _FILE_OFFSET_BITS, namely 64, please see the section "Largefile support (LFS)" in the GPGME manual. +#if (_FILE_OFFSET_BITS) != (0) +#error GPGME was compiled with a different value for _FILE_OFFSET_BITS, namely 0, please see the section "Largefile support (LFS)" in the GPGME manual. #endif #endif #endifLFS support is enabled by default, and this header is generated during build according to current configure
Signed-off-by Changqing Li <[email protected]>--- meta/recipes-support/gpgme/gpgme_1.13.1.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)meta/recipes-support/gpgme/gpgme_1.13.1.bb +5
-1@@ -59,7 +59,7 @@ EXTRA_OECONF += '--enable-languages="${LANGUAGES}" \ --disable-lang-python-test \ ' -inherit autotools texinfo binconfig-disabled pkgconfig distutils-common-base ${PYTHON_INHERIT} +inherit autotools texinfo binconfig-disabled pkgconfig distutils-common-base ${PYTHON_INHERIT} multilib_header export PKG_CONFIG='pkg-config'@@ -83,3 +83,7 @@ do_configure_prepend () { rm -f ${S}/m4/libassuan.m4 rm -f ${S}/m4/python.m4 } + +do_install_append() { + oe_multilib_header gpgme.h +}