All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V5] libffi: fix multilib header conflict
@ 2020-08-18  9:59 Changqing Li
  2020-08-18  9:59 ` [PATCH V6] gpgme: " Changqing Li
       [not found] ` <162C54B24C526659.7353@lists.openembedded.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Changqing Li @ 2020-08-18  9:59 UTC (permalink / raw)
  To: openembedded-core

From: Changqing Li <changqing.li@windriver.com>

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
+

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 meta/recipes-support/libffi/libffi_3.3.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/libffi/libffi_3.3.bb b/meta/recipes-support/libffi/libffi_3.3.bb
index e5beb985c6..9dfdb9e39b 100644
--- a/meta/recipes-support/libffi/libffi_3.3.bb
+++ b/meta/recipes-support/libffi/libffi_3.3.bb
@@ -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}"
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH V6] gpgme: fix multilib header conflict
  2020-08-18  9:59 [PATCH V5] libffi: fix multilib header conflict Changqing Li
@ 2020-08-18  9:59 ` Changqing Li
       [not found] ` <162C54B24C526659.7353@lists.openembedded.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Changqing Li @ 2020-08-18  9:59 UTC (permalink / raw)
  To: openembedded-core

From: Changqing Li <changqing.li@windriver.com>

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

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 meta/recipes-support/gpgme/gpgme_1.13.1.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-support/gpgme/gpgme_1.13.1.bb b/meta/recipes-support/gpgme/gpgme_1.13.1.bb
index 9fc1ae24a4..b51534351d 100644
--- a/meta/recipes-support/gpgme/gpgme_1.13.1.bb
+++ b/meta/recipes-support/gpgme/gpgme_1.13.1.bb
@@ -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
+}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [OE-core] [PATCH V6] gpgme: fix multilib header conflict
       [not found] ` <162C54B24C526659.7353@lists.openembedded.org>
@ 2020-08-19  4:03   ` Changqing Li
  0 siblings, 0 replies; 3+ messages in thread
From: Changqing Li @ 2020-08-19  4:03 UTC (permalink / raw)
  To: openembedded-core, Richard Purdie

[-- Attachment #1: Type: text/plain, Size: 3800 bytes --]

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

On 8/18/20 5:59 PM, Changqing Li wrote:
> From: Changqing Li <changqing.li@windriver.com>
>
> 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
>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
>   meta/recipes-support/gpgme/gpgme_1.13.1.bb | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-support/gpgme/gpgme_1.13.1.bb b/meta/recipes-support/gpgme/gpgme_1.13.1.bb
> index 9fc1ae24a4..b51534351d 100644
> --- a/meta/recipes-support/gpgme/gpgme_1.13.1.bb
> +++ b/meta/recipes-support/gpgme/gpgme_1.13.1.bb
> @@ -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
> +}
>
> 

[-- Attachment #2: Type: text/html, Size: 4762 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-19  4:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-18  9:59 [PATCH V5] libffi: fix multilib header conflict Changqing Li
2020-08-18  9:59 ` [PATCH V6] gpgme: " Changqing Li
     [not found] ` <162C54B24C526659.7353@lists.openembedded.org>
2020-08-19  4:03   ` [OE-core] " Changqing Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.