Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/3] insane.bbclass: Check for adjtime in check_32_bit_symbols
@ 2024-01-12 15:03 Ola x Nilsson
  2024-01-12 15:03 ` [PATCH 2/3] insane.bbclass: Make check_32bit_symbols check for file functions too Ola x Nilsson
  2024-01-12 15:03 ` [PATCH 3/3] insane.bbclass: Python code cleanup in check_32bit_symbols Ola x Nilsson
  0 siblings, 2 replies; 4+ messages in thread
From: Ola x Nilsson @ 2024-01-12 15:03 UTC (permalink / raw)
  To: openembedded-core

adjtime was overlooked in the original commit.

Signed-off-by: Ola x Nilsson <olani@axis.com>
---
 meta/classes-global/insane.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass
index 6f3cd3026d..69741a6a79 100644
--- a/meta/classes-global/insane.bbclass
+++ b/meta/classes-global/insane.bbclass
@@ -534,6 +534,7 @@ def check_32bit_symbols(path, packagename, d, elf, messages):
         # /usr/include/signal.h
         "sigtimedwait",
         # /usr/include/sys/time.h
+        "adjtime",
         "futimes", "futimesat", "getitimer", "gettimeofday", "lutimes",
         "setitimer", "settimeofday", "utimes",
         # /usr/include/sys/timex.h
-- 
2.39.2



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

* [PATCH 2/3] insane.bbclass: Make check_32bit_symbols check for file functions too
  2024-01-12 15:03 [PATCH 1/3] insane.bbclass: Check for adjtime in check_32_bit_symbols Ola x Nilsson
@ 2024-01-12 15:03 ` Ola x Nilsson
  2024-01-12 15:03 ` [PATCH 3/3] insane.bbclass: Python code cleanup in check_32bit_symbols Ola x Nilsson
  1 sibling, 0 replies; 4+ messages in thread
From: Ola x Nilsson @ 2024-01-12 15:03 UTC (permalink / raw)
  To: openembedded-core

Since _TIME_BITS=64 forces the use of _FILE_OFFSET_BITS=64, also check
for functions redirected only based on _FILE_OFFSET_BITS and
__USE_FILE_OFFSET64.

Signed-off-by: Ola x Nilsson <olani@axis.com>
---
 meta/classes-global/insane.bbclass | 31 ++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass
index 69741a6a79..1ff6a319c4 100644
--- a/meta/classes-global/insane.bbclass
+++ b/meta/classes-global/insane.bbclass
@@ -598,6 +598,37 @@ def check_32bit_symbols(path, packagename, d, elf, messages):
         "fts_set",
         # /usr/include/netdb.h
         "gai_suspend",
+
+        # Since _TIME_BITS=64 forces the use of _FILE_OFFSET_BITS=64,
+        # also check for functions redirected only based on _FILE_OFFSET_BITS
+        # and __USE_FILE_OFFSET64
+        # /usr/include/bits/fcntl-linux.h
+        "fallocate",
+        # /usr/include/bits/resource.h
+        "prlimit",
+        # /usr/include/sys/statfs.h
+        "statfs", "fstatfs", "statvfs", "fstatvfs",
+        # /usr/include/sys/sendfile.h
+        "sendfile",
+        # /usr/include/sys/resource.h
+        "getrlimit", "setrlimit",
+        # /usr/include/sys/uio.h
+        "preadv", "pwritev", "preadv2", "pwritev2",
+        # /usr/include/sys/mman.h
+        "mmap",
+        # /usr/include/stdlib.h
+        "mkstemp", "mkstemps", "mkostemp", "mkostemps",
+        # /usr/include/stdio.h
+        "fopen", "tmpfile", "freopen", "fseeko", "ftello", "fgetpos",
+        "fsetpos",
+        # /usr/include/dirent.h
+        "readdir",
+        "readdir_r", "scandir", "scandirat", "alphasort", "getdirentries",
+        "versionsort",
+        # /usr/include/unistd.h
+        "lseek", "pread", "pwrite", "truncate", "ftruncate", "lockf",
+        # /usr/include/fcntl.h
+        "open", "openat", "creat", "posix_fadvise", "posix_fallocate",
     }
 
     ptrn = re.compile(
-- 
2.39.2



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

* [PATCH 3/3] insane.bbclass: Python code cleanup in check_32bit_symbols
  2024-01-12 15:03 [PATCH 1/3] insane.bbclass: Check for adjtime in check_32_bit_symbols Ola x Nilsson
  2024-01-12 15:03 ` [PATCH 2/3] insane.bbclass: Make check_32bit_symbols check for file functions too Ola x Nilsson
@ 2024-01-12 15:03 ` Ola x Nilsson
  2024-01-12 15:14   ` [OE-core] " Ola x Nilsson
  1 sibling, 1 reply; 4+ messages in thread
From: Ola x Nilsson @ 2024-01-12 15:03 UTC (permalink / raw)
  To: openembedded-core

---
 meta/classes-global/insane.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass
index 1ff6a319c4..26457764ce 100644
--- a/meta/classes-global/insane.bbclass
+++ b/meta/classes-global/insane.bbclass
@@ -514,9 +514,9 @@ def check_32bit_symbols(path, packagename, d, elf, messages):
     """
     Check that ELF files do not use any 32 bit time APIs from glibc.
     """
-    thirtytwo_bit_time_archs = set(('arm','armeb','mipsarcho32','powerpc','x86'))
+    thirtytwo_bit_time_archs = {'arm','armeb','mipsarcho32','powerpc','x86'}
     overrides = set(d.getVar('OVERRIDES').split(':'))
-    if not(thirtytwo_bit_time_archs & overrides):
+    if not (thirtytwo_bit_time_archs & overrides):
         return
 
     import re
@@ -1606,7 +1606,7 @@ do_unpack[postfuncs] += "do_qa_unpack"
 
 python () {
     import re
-    
+
     tests = d.getVar('ALL_QA').split()
     if "desktop" in tests:
         d.appendVar("PACKAGE_DEPENDS", " desktop-file-utils-native")
-- 
2.39.2



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

* Re: [OE-core] [PATCH 3/3] insane.bbclass: Python code cleanup in check_32bit_symbols
  2024-01-12 15:03 ` [PATCH 3/3] insane.bbclass: Python code cleanup in check_32bit_symbols Ola x Nilsson
@ 2024-01-12 15:14   ` Ola x Nilsson
  0 siblings, 0 replies; 4+ messages in thread
From: Ola x Nilsson @ 2024-01-12 15:14 UTC (permalink / raw)
  To: Ola x Nilsson; +Cc: openembedded-core


Forgot the signed-off footer, v2 sent

/Ola

On Fri, Jan 12 2024, Ola x Nilsson wrote:

> ---
>  meta/classes-global/insane.bbclass | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass
> index 1ff6a319c4..26457764ce 100644
> --- a/meta/classes-global/insane.bbclass
> +++ b/meta/classes-global/insane.bbclass
> @@ -514,9 +514,9 @@ def check_32bit_symbols(path, packagename, d, elf, messages):
>      """
>      Check that ELF files do not use any 32 bit time APIs from glibc.
>      """
> -    thirtytwo_bit_time_archs = set(('arm','armeb','mipsarcho32','powerpc','x86'))
> +    thirtytwo_bit_time_archs = {'arm','armeb','mipsarcho32','powerpc','x86'}
>      overrides = set(d.getVar('OVERRIDES').split(':'))
> -    if not(thirtytwo_bit_time_archs & overrides):
> +    if not (thirtytwo_bit_time_archs & overrides):
>          return
>  
>      import re
> @@ -1606,7 +1606,7 @@ do_unpack[postfuncs] += "do_qa_unpack"
>  
>  python () {
>      import re
> -    
> +
>      tests = d.getVar('ALL_QA').split()
>      if "desktop" in tests:
>          d.appendVar("PACKAGE_DEPENDS", " desktop-file-utils-native")


-- 
Ola x Nilsson


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

end of thread, other threads:[~2024-01-12 15:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-12 15:03 [PATCH 1/3] insane.bbclass: Check for adjtime in check_32_bit_symbols Ola x Nilsson
2024-01-12 15:03 ` [PATCH 2/3] insane.bbclass: Make check_32bit_symbols check for file functions too Ola x Nilsson
2024-01-12 15:03 ` [PATCH 3/3] insane.bbclass: Python code cleanup in check_32bit_symbols Ola x Nilsson
2024-01-12 15:14   ` [OE-core] " Ola x Nilsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox