diff options
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-posix-ipc/0001-build_support-fix-cross-compilation-error-when-CC-is.patch')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-posix-ipc/0001-build_support-fix-cross-compilation-error-when-CC-is.patch | 53 | 
1 files changed, 0 insertions, 53 deletions
diff --git a/meta-python/recipes-devtools/python/python3-posix-ipc/0001-build_support-fix-cross-compilation-error-when-CC-is.patch b/meta-python/recipes-devtools/python/python3-posix-ipc/0001-build_support-fix-cross-compilation-error-when-CC-is.patch deleted file mode 100644 index c78d4ad726..0000000000 --- a/meta-python/recipes-devtools/python/python3-posix-ipc/0001-build_support-fix-cross-compilation-error-when-CC-is.patch +++ /dev/null  | |||
| @@ -1,53 +0,0 @@ | |||
| 1 | From 01134093c9150248f9ea8890a41e922159593a7f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Haixiao Yan <haixiao.yan.cn@windriver.com> | ||
| 3 | Date: Fri, 8 Aug 2025 19:30:16 +0800 | ||
| 4 | Subject: [PATCH] build_support: fix cross-compilation error when CC is a | ||
| 5 | multi-part command | ||
| 6 | |||
| 7 | Fix the following error when cross-compiling with an environment-defined CC | ||
| 8 | that includes flags: | ||
| 9 | |||
| 10 | FileNotFoundError: [Errno 2] No such file or directory: 'x86_64-wrs-linux-gcc | ||
| 11 | -m64 -march=nehalem -mtune=generic -mfpmath=sse -msse4.2 | ||
| 12 | -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security | ||
| 13 | -Werror=format-security | ||
| 14 | --sysroot=/build-1.3.0/tmp/work/corei7-64-wrs-linux/python3-posix-ipc/1.3.0/recipe-sysroot' | ||
| 15 | |||
| 16 | This happened because the CC environment variable was treated as a single | ||
| 17 | string instead of being split into arguments. The fix uses shlex.split() to | ||
| 18 | correctly parse CC into a list of compiler and flags, and then unpacks it when | ||
| 19 | forming the subprocess command. | ||
| 20 | |||
| 21 | Upstream-Status: Backport [https://github.com/osvenskan/posix_ipc/commit/0113409] | ||
| 22 | |||
| 23 | Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com> | ||
| 24 | --- | ||
| 25 | build_support/discover_system_info.py | 5 ++++- | ||
| 26 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
| 27 | |||
| 28 | diff --git a/build_support/discover_system_info.py b/build_support/discover_system_info.py | ||
| 29 | index d1b171e4f602..1c3741f5577c 100644 | ||
| 30 | --- a/build_support/discover_system_info.py | ||
| 31 | +++ b/build_support/discover_system_info.py | ||
| 32 | @@ -1,6 +1,7 @@ | ||
| 33 | import subprocess | ||
| 34 | import platform | ||
| 35 | import os | ||
| 36 | +import shlex | ||
| 37 | |||
| 38 | # Set these to None for compile/link debugging or subprocess.PIPE to silence | ||
| 39 | # compiler warnings and errors. | ||
| 40 | @@ -49,7 +50,9 @@ def does_build_succeed(filename, linker_options=""): | ||
| 41 | # - Some versions of Linux place the sem_xxx() functions in libpthread. | ||
| 42 | # Rather than testing whether or not it's needed, I just specify it | ||
| 43 | # everywhere since it's harmless to specify it when it's not needed. | ||
| 44 | - cmd = [os.getenv("CC", "cc"), | ||
| 45 | + cc = os.getenv("CC", "cc") | ||
| 46 | + cmd = [ | ||
| 47 | + *shlex.split(cc), | ||
| 48 | '-Wall', | ||
| 49 | '-o', | ||
| 50 | f'./build_support/src/{filename[:-2]}', | ||
| 51 | -- | ||
| 52 | 2.34.1 | ||
| 53 | |||
