diff options
Diffstat (limited to 'meta')
126 files changed, 1446 insertions, 1246 deletions
diff --git a/meta/classes-recipe/kernel-module-split.bbclass b/meta/classes-recipe/kernel-module-split.bbclass index 9487365eb7..a2d81f18e2 100644 --- a/meta/classes-recipe/kernel-module-split.bbclass +++ b/meta/classes-recipe/kernel-module-split.bbclass | |||
@@ -99,9 +99,12 @@ python split_kernel_module_packages () { | |||
99 | bb.warn("module_autoload_%s was replaced by KERNEL_MODULE_AUTOLOAD for cases where basename == module name, please drop it" % basename) | 99 | bb.warn("module_autoload_%s was replaced by KERNEL_MODULE_AUTOLOAD for cases where basename == module name, please drop it" % basename) |
100 | if autoload and basename not in autoloadlist: | 100 | if autoload and basename not in autoloadlist: |
101 | bb.warn("module_autoload_%s is defined but '%s' isn't included in KERNEL_MODULE_AUTOLOAD, please add it there" % (basename, basename)) | 101 | bb.warn("module_autoload_%s is defined but '%s' isn't included in KERNEL_MODULE_AUTOLOAD, please add it there" % (basename, basename)) |
102 | |||
103 | # The .conf file can either be installed by a recipe or generated from module_autoload_* | ||
104 | conf = '%s/%s.conf' % (d.getVar('modulesloaddir'), basename) | ||
105 | name = '%s%s' % (dvar, conf) | ||
106 | # If module name is in KERNEL_MODULE_AUTOLOAD, then generate the .conf file and write to `name`. | ||
102 | if basename in autoloadlist: | 107 | if basename in autoloadlist: |
103 | conf = '%s/%s.conf' % (d.getVar('modulesloaddir'), basename) | ||
104 | name = '%s%s' % (dvar, conf) | ||
105 | os.makedirs(os.path.dirname(name), exist_ok=True) | 108 | os.makedirs(os.path.dirname(name), exist_ok=True) |
106 | with open(name, 'w') as f: | 109 | with open(name, 'w') as f: |
107 | if autoload: | 110 | if autoload: |
@@ -109,6 +112,9 @@ python split_kernel_module_packages () { | |||
109 | f.write('%s\n' % m) | 112 | f.write('%s\n' % m) |
110 | else: | 113 | else: |
111 | f.write('%s\n' % basename) | 114 | f.write('%s\n' % basename) |
115 | # If the .conf file exits, then add it to FILES:* and CONFFILES:* and add postinstall hook. | ||
116 | # It doesn't matter if it was generated from module_autoload_* or installed by the recipe. | ||
117 | if os.path.exists(name): | ||
112 | conf2append = ' %s' % conf | 118 | conf2append = ' %s' % conf |
113 | d.appendVar('FILES:%s' % pkg, conf2append) | 119 | d.appendVar('FILES:%s' % pkg, conf2append) |
114 | d.appendVar('CONFFILES:%s' % pkg, conf2append) | 120 | d.appendVar('CONFFILES:%s' % pkg, conf2append) |
@@ -121,19 +127,24 @@ python split_kernel_module_packages () { | |||
121 | # Write out any modconf fragment | 127 | # Write out any modconf fragment |
122 | modconflist = (d.getVar("KERNEL_MODULE_PROBECONF") or "").split() | 128 | modconflist = (d.getVar("KERNEL_MODULE_PROBECONF") or "").split() |
123 | modconf = d.getVar('module_conf_%s' % basename) | 129 | modconf = d.getVar('module_conf_%s' % basename) |
130 | |||
131 | # The .conf file can either be installed by a recipe or generated from module_conf_* | ||
132 | conf = '%s/%s.conf' % (d.getVar('modprobedir'), basename) | ||
133 | name = '%s%s' % (dvar, conf) | ||
134 | # If module name is in KERNEL_MODULE_PROBECONF, then generate the .conf file and write to `name`. | ||
124 | if modconf and basename in modconflist: | 135 | if modconf and basename in modconflist: |
125 | conf = '%s/%s.conf' % (d.getVar('modprobedir'), basename) | ||
126 | name = '%s%s' % (dvar, conf) | ||
127 | os.makedirs(os.path.dirname(name), exist_ok=True) | 136 | os.makedirs(os.path.dirname(name), exist_ok=True) |
128 | with open(name, 'w') as f: | 137 | with open(name, 'w') as f: |
129 | f.write("%s\n" % modconf) | 138 | f.write("%s\n" % modconf) |
139 | elif modconf: | ||
140 | bb.error("Please ensure module %s is listed in KERNEL_MODULE_PROBECONF since module_conf_%s is set" % (basename, basename)) | ||
141 | # If the .conf file exits, then add it to FILES:* and CONFFILES:*. | ||
142 | # It doesn't matter if it was generated from module_conf_* or installed by the recipe. | ||
143 | if os.path.exists(name): | ||
130 | conf2append = ' %s' % conf | 144 | conf2append = ' %s' % conf |
131 | d.appendVar('FILES:%s' % pkg, conf2append) | 145 | d.appendVar('FILES:%s' % pkg, conf2append) |
132 | d.appendVar('CONFFILES:%s' % pkg, conf2append) | 146 | d.appendVar('CONFFILES:%s' % pkg, conf2append) |
133 | 147 | ||
134 | elif modconf: | ||
135 | bb.error("Please ensure module %s is listed in KERNEL_MODULE_PROBECONF since module_conf_%s is set" % (basename, basename)) | ||
136 | |||
137 | if "description" in vals: | 148 | if "description" in vals: |
138 | old_desc = d.getVar('DESCRIPTION:' + pkg) or "" | 149 | old_desc = d.getVar('DESCRIPTION:' + pkg) or "" |
139 | d.setVar('DESCRIPTION:' + pkg, old_desc + "; " + vals["description"]) | 150 | d.setVar('DESCRIPTION:' + pkg, old_desc + "; " + vals["description"]) |
diff --git a/meta/classes-recipe/setuptools3.bbclass b/meta/classes-recipe/setuptools3.bbclass index f19899d42e..0adce5e2ec 100644 --- a/meta/classes-recipe/setuptools3.bbclass +++ b/meta/classes-recipe/setuptools3.bbclass | |||
@@ -32,7 +32,6 @@ setuptools3_do_configure() { | |||
32 | 32 | ||
33 | setuptools3_do_compile() { | 33 | setuptools3_do_compile() { |
34 | cd ${SETUPTOOLS_SETUP_PATH} | 34 | cd ${SETUPTOOLS_SETUP_PATH} |
35 | NO_FETCH_BUILD=1 \ | ||
36 | STAGING_INCDIR=${STAGING_INCDIR} \ | 35 | STAGING_INCDIR=${STAGING_INCDIR} \ |
37 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | 36 | STAGING_LIBDIR=${STAGING_LIBDIR} \ |
38 | ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \ | 37 | ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \ |
diff --git a/meta/classes-recipe/setuptools3_legacy.bbclass b/meta/classes-recipe/setuptools3_legacy.bbclass index 030c3d9e0e..166808a695 100644 --- a/meta/classes-recipe/setuptools3_legacy.bbclass +++ b/meta/classes-recipe/setuptools3_legacy.bbclass | |||
@@ -35,7 +35,6 @@ setuptools3_legacy_do_configure() { | |||
35 | 35 | ||
36 | setuptools3_legacy_do_compile() { | 36 | setuptools3_legacy_do_compile() { |
37 | cd ${SETUPTOOLS_SETUP_PATH} | 37 | cd ${SETUPTOOLS_SETUP_PATH} |
38 | NO_FETCH_BUILD=1 \ | ||
39 | STAGING_INCDIR=${STAGING_INCDIR} \ | 38 | STAGING_INCDIR=${STAGING_INCDIR} \ |
40 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | 39 | STAGING_LIBDIR=${STAGING_LIBDIR} \ |
41 | ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \ | 40 | ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \ |
diff --git a/meta/classes-recipe/uboot-sign.bbclass b/meta/classes-recipe/uboot-sign.bbclass index e0771b5429..796c040e8b 100644 --- a/meta/classes-recipe/uboot-sign.bbclass +++ b/meta/classes-recipe/uboot-sign.bbclass | |||
@@ -101,6 +101,10 @@ UBOOT_FIT_TEE_IMAGE ?= "tee-raw.bin" | |||
101 | # User specific settings | 101 | # User specific settings |
102 | UBOOT_FIT_USER_SETTINGS ?= "" | 102 | UBOOT_FIT_USER_SETTINGS ?= "" |
103 | 103 | ||
104 | # Sets the firmware property to select the image to boot first. | ||
105 | # If not set, the first entry in "loadables" is used instead. | ||
106 | UBOOT_FIT_CONF_FIRMWARE ?= "" | ||
107 | |||
104 | # Unit name containing a list of users additional binaries to be loaded. | 108 | # Unit name containing a list of users additional binaries to be loaded. |
105 | # It is a comma-separated list of strings. | 109 | # It is a comma-separated list of strings. |
106 | UBOOT_FIT_CONF_USER_LOADABLES ?= '' | 110 | UBOOT_FIT_CONF_USER_LOADABLES ?= '' |
@@ -361,6 +365,7 @@ EOF | |||
361 | # we want to sign it so that the SPL can verify it | 365 | # we want to sign it so that the SPL can verify it |
362 | uboot_fitimage_assemble() { | 366 | uboot_fitimage_assemble() { |
363 | conf_loadables="\"uboot\"" | 367 | conf_loadables="\"uboot\"" |
368 | conf_firmware="" | ||
364 | rm -f ${UBOOT_ITS} ${UBOOT_FITIMAGE_BINARY} | 369 | rm -f ${UBOOT_ITS} ${UBOOT_FITIMAGE_BINARY} |
365 | 370 | ||
366 | # First we create the ITS script | 371 | # First we create the ITS script |
@@ -425,13 +430,17 @@ EOF | |||
425 | fi | 430 | fi |
426 | 431 | ||
427 | if [ -n "${UBOOT_FIT_USER_SETTINGS}" ] ; then | 432 | if [ -n "${UBOOT_FIT_USER_SETTINGS}" ] ; then |
428 | echo -e "${UBOOT_FIT_USER_SETTINGS}" >> ${UBOOT_ITS} | 433 | printf "%b" "${UBOOT_FIT_USER_SETTINGS}" >> ${UBOOT_ITS} |
429 | fi | 434 | fi |
430 | 435 | ||
431 | if [ -n "${UBOOT_FIT_CONF_USER_LOADABLES}" ] ; then | 436 | if [ -n "${UBOOT_FIT_CONF_USER_LOADABLES}" ] ; then |
432 | conf_loadables="${conf_loadables}${UBOOT_FIT_CONF_USER_LOADABLES}" | 437 | conf_loadables="${conf_loadables}${UBOOT_FIT_CONF_USER_LOADABLES}" |
433 | fi | 438 | fi |
434 | 439 | ||
440 | if [ -n "${UBOOT_FIT_CONF_FIRMWARE}" ] ; then | ||
441 | conf_firmware="firmware = \"${UBOOT_FIT_CONF_FIRMWARE}\";" | ||
442 | fi | ||
443 | |||
435 | cat << EOF >> ${UBOOT_ITS} | 444 | cat << EOF >> ${UBOOT_ITS} |
436 | }; | 445 | }; |
437 | 446 | ||
@@ -439,6 +448,7 @@ EOF | |||
439 | default = "conf"; | 448 | default = "conf"; |
440 | conf { | 449 | conf { |
441 | description = "Boot with signed U-Boot FIT"; | 450 | description = "Boot with signed U-Boot FIT"; |
451 | ${conf_firmware} | ||
442 | loadables = ${conf_loadables}; | 452 | loadables = ${conf_loadables}; |
443 | fdt = "fdt"; | 453 | fdt = "fdt"; |
444 | }; | 454 | }; |
diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc index ee91af8796..4f09416354 100644 --- a/meta/conf/distro/include/default-providers.inc +++ b/meta/conf/distro/include/default-providers.inc | |||
@@ -7,8 +7,9 @@ PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xorg" | |||
7 | PREFERRED_PROVIDER_virtual/libsdl2 ?= "libsdl2" | 7 | PREFERRED_PROVIDER_virtual/libsdl2 ?= "libsdl2" |
8 | PREFERRED_PROVIDER_virtual/libsdl2-native ?= "libsdl2-native" | 8 | PREFERRED_PROVIDER_virtual/libsdl2-native ?= "libsdl2-native" |
9 | PREFERRED_PROVIDER_virtual/egl ?= "mesa" | 9 | PREFERRED_PROVIDER_virtual/egl ?= "mesa" |
10 | PREFERRED_PROVIDER_virtual/libegl-icd ?= "mesa" | ||
10 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" | 11 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" |
11 | PREFERRED_PROVIDER_virtual/libglx ?= "mesa" | 12 | PREFERRED_PROVIDER_virtual/libglx-icd ?= "mesa" |
12 | PREFERRED_PROVIDER_virtual/libgl-native ?= "mesa-native" | 13 | PREFERRED_PROVIDER_virtual/libgl-native ?= "mesa-native" |
13 | PREFERRED_PROVIDER_virtual/nativesdk-libgl ?= "nativesdk-mesa" | 14 | PREFERRED_PROVIDER_virtual/nativesdk-libgl ?= "nativesdk-mesa" |
14 | PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" | 15 | PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" |
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 6c19e306cf..8627f72ce7 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc | |||
@@ -477,7 +477,7 @@ RECIPE_MAINTAINER:pn-linux-yocto = "Bruce Ashfield <bruce.ashfield@gmail.com>" | |||
477 | RECIPE_MAINTAINER:pn-linux-yocto-dev = "Bruce Ashfield <bruce.ashfield@gmail.com>" | 477 | RECIPE_MAINTAINER:pn-linux-yocto-dev = "Bruce Ashfield <bruce.ashfield@gmail.com>" |
478 | RECIPE_MAINTAINER:pn-linux-yocto-rt = "Bruce Ashfield <bruce.ashfield@gmail.com>" | 478 | RECIPE_MAINTAINER:pn-linux-yocto-rt = "Bruce Ashfield <bruce.ashfield@gmail.com>" |
479 | RECIPE_MAINTAINER:pn-linux-yocto-tiny = "Bruce Ashfield <bruce.ashfield@gmail.com>" | 479 | RECIPE_MAINTAINER:pn-linux-yocto-tiny = "Bruce Ashfield <bruce.ashfield@gmail.com>" |
480 | RECIPE_MAINTAINER:pn-llvm-project-source-20.1.4 = "Khem Raj <raj.khem@gmail.com>" | 480 | RECIPE_MAINTAINER:pn-llvm-project-source-20.1.5 = "Khem Raj <raj.khem@gmail.com>" |
481 | RECIPE_MAINTAINER:pn-logrotate = "Yi Zhao <yi.zhao@windriver.com>" | 481 | RECIPE_MAINTAINER:pn-logrotate = "Yi Zhao <yi.zhao@windriver.com>" |
482 | RECIPE_MAINTAINER:pn-log4cplus = "Unassigned <unassigned@yoctoproject.org>" | 482 | RECIPE_MAINTAINER:pn-log4cplus = "Unassigned <unassigned@yoctoproject.org>" |
483 | RECIPE_MAINTAINER:pn-lrzsz = "Anuj Mittal <anuj.mittal@intel.com>" | 483 | RECIPE_MAINTAINER:pn-lrzsz = "Anuj Mittal <anuj.mittal@intel.com>" |
diff --git a/meta/conf/toolchain/clang.inc b/meta/conf/toolchain/clang.inc index 0e5f0769f8..2bd4a07a86 100644 --- a/meta/conf/toolchain/clang.inc +++ b/meta/conf/toolchain/clang.inc | |||
@@ -23,3 +23,10 @@ PREFERRED_PROVIDER_virtual/cross-c++:class-nativesdk = "gcc-crosssdk-${SDK_SYS}" | |||
23 | PREFERRED_PROVIDER_virtual/nativesdk-cross-cc = "gcc-crosssdk-${SDK_SYS}" | 23 | PREFERRED_PROVIDER_virtual/nativesdk-cross-cc = "gcc-crosssdk-${SDK_SYS}" |
24 | PREFERRED_PROVIDER_virtual/nativesdk-cross-c++ = "gcc-crosssdk-${SDK_SYS}" | 24 | PREFERRED_PROVIDER_virtual/nativesdk-cross-c++ = "gcc-crosssdk-${SDK_SYS}" |
25 | PREFERRED_PROVIDER_virtual/nativesdk-compilerlibs = "nativesdk-gcc-runtime" | 25 | PREFERRED_PROVIDER_virtual/nativesdk-compilerlibs = "nativesdk-gcc-runtime" |
26 | |||
27 | BASE_DEFAULT_DEPS:append:class-target = " compiler-rt" | ||
28 | |||
29 | TUNE_CCARGS += "${@bb.utils.contains("DISTRO_FEATURES", "usrmerge", " --dyld-prefix=/usr", "", d)}" | ||
30 | |||
31 | LDFLAGS:append:class-nativesdk:x86-64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-x86-64.so.2" | ||
32 | LDFLAGS:append:class-nativesdk:aarch64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-aarch64.so.1" | ||
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index 6b56adaf03..14befac8fa 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py | |||
@@ -362,11 +362,12 @@ class Rootfs(object, metaclass=ABCMeta): | |||
362 | 362 | ||
363 | versioned_modules_dir = os.path.join(self.image_rootfs, modules_dir, kernel_ver) | 363 | versioned_modules_dir = os.path.join(self.image_rootfs, modules_dir, kernel_ver) |
364 | 364 | ||
365 | bb.utils.mkdirhier(versioned_modules_dir) | 365 | if os.path.exists(versioned_modules_dir): |
366 | 366 | bb.note("Running depmodwrapper for %s ..." % versioned_modules_dir) | |
367 | bb.note("Running depmodwrapper for %s ..." % versioned_modules_dir) | 367 | if self._exec_shell_cmd(['depmodwrapper', '-a', '-b', self.image_rootfs, kernel_ver, kernel_package_name]): |
368 | if self._exec_shell_cmd(['depmodwrapper', '-a', '-b', self.image_rootfs, kernel_ver, kernel_package_name]): | 368 | bb.fatal("Kernel modules dependency generation failed") |
369 | bb.fatal("Kernel modules dependency generation failed") | 369 | else: |
370 | bb.note("Not running depmodwrapper for %s since directory does not exist" % versioned_modules_dir) | ||
370 | 371 | ||
371 | """ | 372 | """ |
372 | Create devfs: | 373 | Create devfs: |
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py index 1e094892e9..f06027cb03 100644 --- a/meta/lib/oeqa/selftest/cases/reproducible.py +++ b/meta/lib/oeqa/selftest/cases/reproducible.py | |||
@@ -97,8 +97,10 @@ def compare_file(reference, test, diffutils_sysroot): | |||
97 | result.status = SAME | 97 | result.status = SAME |
98 | return result | 98 | return result |
99 | 99 | ||
100 | def run_diffoscope(a_dir, b_dir, html_dir, max_report_size=0, **kwargs): | 100 | def run_diffoscope(a_dir, b_dir, html_dir, max_report_size=0, max_diff_block_lines=1024, max_diff_block_lines_saved=0, **kwargs): |
101 | return runCmd(['diffoscope', '--no-default-limits', '--max-report-size', str(max_report_size), | 101 | return runCmd(['diffoscope', '--no-default-limits', '--max-report-size', str(max_report_size), |
102 | '--max-diff-block-lines-saved', str(max_diff_block_lines_saved), | ||
103 | '--max-diff-block-lines', str(max_diff_block_lines), | ||
102 | '--exclude-directory-metadata', 'yes', '--html-dir', html_dir, a_dir, b_dir], | 104 | '--exclude-directory-metadata', 'yes', '--html-dir', html_dir, a_dir, b_dir], |
103 | **kwargs) | 105 | **kwargs) |
104 | 106 | ||
@@ -132,6 +134,11 @@ class ReproducibleTests(OESelftestTestCase): | |||
132 | # Maximum report size, in bytes | 134 | # Maximum report size, in bytes |
133 | max_report_size = 250 * 1024 * 1024 | 135 | max_report_size = 250 * 1024 * 1024 |
134 | 136 | ||
137 | # Maximum diff blocks size, in lines | ||
138 | max_diff_block_lines = 1024 | ||
139 | # Maximum diff blocks size (saved in memory), in lines | ||
140 | max_diff_block_lines_saved = max_diff_block_lines | ||
141 | |||
135 | # targets are the things we want to test the reproducibility of | 142 | # targets are the things we want to test the reproducibility of |
136 | # Have to add the virtual targets manually for now as builds may or may not include them as they're exclude from world | 143 | # Have to add the virtual targets manually for now as builds may or may not include them as they're exclude from world |
137 | targets = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline', 'core-image-weston', 'world', 'virtual/librpc', 'virtual/libsdl2', 'virtual/crypt'] | 144 | targets = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline', 'core-image-weston', 'world', 'virtual/librpc', 'virtual/libsdl2', 'virtual/crypt'] |
@@ -391,6 +398,8 @@ class ReproducibleTests(OESelftestTestCase): | |||
391 | self.copy_file(os.path.join(jquery_sysroot, 'usr/share/javascript/jquery/jquery.min.js'), os.path.join(package_html_dir, 'jquery.js')) | 398 | self.copy_file(os.path.join(jquery_sysroot, 'usr/share/javascript/jquery/jquery.min.js'), os.path.join(package_html_dir, 'jquery.js')) |
392 | 399 | ||
393 | run_diffoscope('reproducibleA', 'reproducibleB-extended', package_html_dir, max_report_size=self.max_report_size, | 400 | run_diffoscope('reproducibleA', 'reproducibleB-extended', package_html_dir, max_report_size=self.max_report_size, |
401 | max_diff_block_lines_saved=self.max_diff_block_lines_saved, | ||
402 | max_diff_block_lines=self.max_diff_block_lines, | ||
394 | native_sysroot=diffoscope_sysroot, ignore_status=True, cwd=package_dir) | 403 | native_sysroot=diffoscope_sysroot, ignore_status=True, cwd=package_dir) |
395 | 404 | ||
396 | if fails: | 405 | if fails: |
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/0002-Do-not-treat-warnings-as-errors.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/0001-Do-not-treat-warnings-as-errors.patch index 84966c484e..0c10e66a12 100644 --- a/meta/recipes-bsp/gnu-efi/gnu-efi/0002-Do-not-treat-warnings-as-errors.patch +++ b/meta/recipes-bsp/gnu-efi/gnu-efi/0001-Do-not-treat-warnings-as-errors.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 89218bb3c5eb7b97987769cb4f7bf8323d35ca7e Mon Sep 17 00:00:00 2001 | 1 | From 80e17bcdf45dcf40b8f356cf68389612407b9f7b Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Thu, 16 May 2024 21:38:32 +0800 | 3 | Date: Thu, 16 May 2024 21:38:32 +0800 |
4 | Subject: [PATCH] Do not treat warnings as errors | 4 | Subject: [PATCH] Do not treat warnings as errors |
@@ -15,11 +15,15 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | 15 | 1 file changed, 1 insertion(+), 1 deletion(-) |
16 | 16 | ||
17 | diff --git a/Make.defaults b/Make.defaults | 17 | diff --git a/Make.defaults b/Make.defaults |
18 | index 1347aca..1834d1c 100755 | 18 | index 6d3cf51..23b9383 100755 |
19 | --- a/Make.defaults | 19 | --- a/Make.defaults |
20 | +++ b/Make.defaults | 20 | +++ b/Make.defaults |
21 | @@ -262,3 +262,3 @@ CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \ | 21 | @@ -267,7 +267,7 @@ CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \ |
22 | -fno-strict-aliasing \ | ||
23 | -ffreestanding -fno-stack-protector | ||
22 | else | 24 | else |
23 | -CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Wno-pointer-sign -Werror \ | 25 | -CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \ |
24 | +CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Wno-pointer-sign \ | 26 | +CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra \ |
25 | -fno-strict-aliasing \ | 27 | -fno-strict-aliasing \ |
28 | -ffreestanding -fno-stack-protector \ | ||
29 | $(if $(findstring 0,$(USING_CLANG)),-fno-merge-all-constants,) | ||
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_4.0.0.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_4.0.1.bb index 29d9e695a9..c93e06b96c 100644 --- a/meta/recipes-bsp/gnu-efi/gnu-efi_4.0.0.bb +++ b/meta/recipes-bsp/gnu-efi/gnu-efi_4.0.1.bb | |||
@@ -16,12 +16,16 @@ COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*|riscv64.*)-linux" | |||
16 | COMPATIBLE_HOST:armv4 = 'null' | 16 | COMPATIBLE_HOST:armv4 = 'null' |
17 | 17 | ||
18 | SRC_URI = "git://github.com/ncroxon/gnu-efi;protocol=https;branch=master \ | 18 | SRC_URI = "git://github.com/ncroxon/gnu-efi;protocol=https;branch=master \ |
19 | file://0002-Do-not-treat-warnings-as-errors.patch \ | 19 | file://0001-Do-not-treat-warnings-as-errors.patch \ |
20 | " | 20 | " |
21 | SRCREV = "5ea320f0f01c8de8f9dd4e4e38a245608f0287dd" | 21 | SRCREV = "00cdfa66e923ab2f6683bb52cab0d0d1a9083b16" |
22 | 22 | ||
23 | S = "${WORKDIR}/git" | 23 | S = "${WORKDIR}/git" |
24 | 24 | ||
25 | # llvm-objcopy fails | ||
26 | # arm-poky-linux-gnueabi-llvm-objcopy: error: 't8.so': section '.dynstr' cannot be removed because it is referenced by the section '.dynamic' | ||
27 | OBJCOPY:toolchain-clang = "${HOST_PREFIX}objcopy" | ||
28 | |||
25 | inherit github-releases | 29 | inherit github-releases |
26 | 30 | ||
27 | do_configure:linux-gnux32:prepend() { | 31 | do_configure:linux-gnux32:prepend() { |
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc index 1fe39a59d2..ffa04e415d 100644 --- a/meta/recipes-bsp/grub/grub2.inc +++ b/meta/recipes-bsp/grub/grub2.inc | |||
@@ -106,3 +106,7 @@ do_configure:prepend() { | |||
106 | FROM_BOOTSTRAP=1 ${S}/autogen.sh | 106 | FROM_BOOTSTRAP=1 ${S}/autogen.sh |
107 | cd ${B} | 107 | cd ${B} |
108 | } | 108 | } |
109 | |||
110 | # | aarch64-poky-linux-clang: error: invalid argument '-mcmodel=large' only allowed with '-fno-pic' | ||
111 | # see - https://bugs.gentoo.org/942843 | ||
112 | TOOLCHAIN:aarch64 = "gcc" | ||
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver index cb6c1b4d08..99ec280b35 100644 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver | |||
@@ -89,34 +89,14 @@ start_nfsd(){ | |||
89 | start-stop-daemon --start --exec "$NFS_NFSD" -- "$@" | 89 | start-stop-daemon --start --exec "$NFS_NFSD" -- "$@" |
90 | echo done | 90 | echo done |
91 | } | 91 | } |
92 | delay_nfsd(){ | ||
93 | for delay in 0 1 2 3 4 5 6 7 8 9 | ||
94 | do | ||
95 | if pidof nfsd >/dev/null | ||
96 | then | ||
97 | echo -n . | ||
98 | sleep 1 | ||
99 | else | ||
100 | return 0 | ||
101 | fi | ||
102 | done | ||
103 | return 1 | ||
104 | } | ||
105 | stop_nfsd(){ | 92 | stop_nfsd(){ |
106 | # WARNING: this kills any process with the executable | ||
107 | # name 'nfsd'. | ||
108 | echo -n 'stopping nfsd: ' | 93 | echo -n 'stopping nfsd: ' |
109 | start-stop-daemon --stop --quiet --signal 1 --name nfsd | 94 | $NFS_NFSD 0 |
110 | if delay_nfsd || { | 95 | if pidof nfsd |
111 | echo failed | ||
112 | echo ' using signal 9: ' | ||
113 | start-stop-daemon --stop --quiet --signal 9 --name nfsd | ||
114 | delay_nfsd | ||
115 | } | ||
116 | then | 96 | then |
117 | echo done | ||
118 | else | ||
119 | echo failed | 97 | echo failed |
98 | else | ||
99 | echo done | ||
120 | fi | 100 | fi |
121 | } | 101 | } |
122 | 102 | ||
diff --git a/meta/recipes-connectivity/openssl/openssl_3.5.0.bb b/meta/recipes-connectivity/openssl/openssl_3.5.0.bb index fddc4dbc81..0f5c28dafa 100644 --- a/meta/recipes-connectivity/openssl/openssl_3.5.0.bb +++ b/meta/recipes-connectivity/openssl/openssl_3.5.0.bb | |||
@@ -53,6 +53,9 @@ EXTRA_OECONF:append:class-nativesdk = " --with-rand-seed=os,devrandom" | |||
53 | EXTRA_OEMAKE:append:task-compile:class-native = ' OPENSSLDIR="/not/builtin" ENGINESDIR="/not/builtin" MODULESDIR="/not/builtin"' | 53 | EXTRA_OEMAKE:append:task-compile:class-native = ' OPENSSLDIR="/not/builtin" ENGINESDIR="/not/builtin" MODULESDIR="/not/builtin"' |
54 | EXTRA_OEMAKE:append:task-compile:class-nativesdk = ' OPENSSLDIR="/not/builtin" ENGINESDIR="/not/builtin" MODULESDIR="/not/builtin"' | 54 | EXTRA_OEMAKE:append:task-compile:class-nativesdk = ' OPENSSLDIR="/not/builtin" ENGINESDIR="/not/builtin" MODULESDIR="/not/builtin"' |
55 | 55 | ||
56 | #| threads_pthread.c:(.text+0x372): undefined reference to `__atomic_is_lock_free' | ||
57 | EXTRA_OECONF:append:toolchain-clang:x86 = " -latomic" | ||
58 | |||
56 | # This allows disabling deprecated or undesirable crypto algorithms. | 59 | # This allows disabling deprecated or undesirable crypto algorithms. |
57 | # The default is to trust upstream choices. | 60 | # The default is to trust upstream choices. |
58 | DEPRECATED_CRYPTO_FLAGS ?= "" | 61 | DEPRECATED_CRYPTO_FLAGS ?= "" |
diff --git a/meta/recipes-core/base-files/base-files/0001-add-nss-resolve-to-nsswitch.patch b/meta/recipes-core/base-files/base-files/0001-add-nss-resolve-to-nsswitch.patch deleted file mode 100644 index a6e39e0956..0000000000 --- a/meta/recipes-core/base-files/base-files/0001-add-nss-resolve-to-nsswitch.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 830abe652428d9d31780c3ace121635ad7b64274 Mon Sep 17 00:00:00 2001 | ||
2 | From: Eero Aaltonen <eero.aaltonen@vaisala.com> | ||
3 | Date: Wed Sep 27 15:50:48 2023 +0300 | ||
4 | Subject: [PATCH] Add nss-resolve to the Name Service Switch (NSS) | ||
5 | |||
6 | Add `nss-resolve` so that `systemd-resolved` is used for name | ||
7 | resolution with glibc `gethostbyname` calls. | ||
8 | |||
9 | Upstream-Status: Inappropriate [no upstream, configuration]. | ||
10 | |||
11 | Signed-off-by: Eero Aaltonen <eero.aaltonen@vaisala.com> | ||
12 | --- | ||
13 | nsswitch.conf | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/nsswitch.conf b/nsswitch.conf | ||
17 | index 06f03d2..34b165c 100644 | ||
18 | --- a/nsswitch.conf | ||
19 | +++ b/nsswitch.conf | ||
20 | @@ -8,7 +8,7 @@ passwd: compat | ||
21 | group: compat | ||
22 | shadow: compat | ||
23 | |||
24 | -hosts: files dns | ||
25 | +hosts: resolve [!UNAVAIL=return] files dns | ||
26 | networks: files | ||
27 | |||
28 | protocols: db files | ||
29 | -- | ||
30 | 2.25.1 | ||
31 | |||
diff --git a/meta/recipes-core/base-files/base-files/nsswitch-resolved.conf b/meta/recipes-core/base-files/base-files/nsswitch-resolved.conf new file mode 100644 index 0000000000..ec6ce156b5 --- /dev/null +++ b/meta/recipes-core/base-files/base-files/nsswitch-resolved.conf | |||
@@ -0,0 +1,20 @@ | |||
1 | # /etc/nsswitch.conf | ||
2 | # | ||
3 | # Example configuration of GNU Name Service Switch functionality. | ||
4 | # If you have the `glibc-doc' and `info' packages installed, try: | ||
5 | # `info libc "Name Service Switch"' for information about this file. | ||
6 | |||
7 | passwd: compat | ||
8 | group: compat | ||
9 | shadow: compat | ||
10 | gshadow: files | ||
11 | |||
12 | hosts: resolve [!UNAVAIL=return] files dns | ||
13 | networks: files | ||
14 | |||
15 | protocols: db files | ||
16 | services: db files | ||
17 | ethers: db files | ||
18 | rpc: db files | ||
19 | |||
20 | netgroup: nis | ||
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb index 60253fcd42..59b084d141 100644 --- a/meta/recipes-core/base-files/base-files_3.0.14.bb +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb | |||
@@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f" | |||
11 | 11 | ||
12 | SRC_URI = "file://rotation \ | 12 | SRC_URI = "file://rotation \ |
13 | file://nsswitch.conf \ | 13 | file://nsswitch.conf \ |
14 | file://nsswitch-resolved.conf \ | ||
14 | file://motd \ | 15 | file://motd \ |
15 | file://hosts \ | 16 | file://hosts \ |
16 | file://host.conf \ | 17 | file://host.conf \ |
@@ -23,7 +24,6 @@ SRC_URI = "file://rotation \ | |||
23 | file://share/dot.profile \ | 24 | file://share/dot.profile \ |
24 | file://licenses/GPL-2 \ | 25 | file://licenses/GPL-2 \ |
25 | " | 26 | " |
26 | SRC_URI:append:libc-glibc = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd systemd-resolved', ' file://0001-add-nss-resolve-to-nsswitch.patch', '', d)}" | ||
27 | 27 | ||
28 | S = "${WORKDIR}/sources" | 28 | S = "${WORKDIR}/sources" |
29 | UNPACKDIR = "${S}" | 29 | UNPACKDIR = "${S}" |
@@ -124,7 +124,7 @@ do_install () { | |||
124 | } | 124 | } |
125 | 125 | ||
126 | do_install:append:libc-glibc () { | 126 | do_install:append:libc-glibc () { |
127 | install -m 0644 ${S}/nsswitch.conf ${D}${sysconfdir}/nsswitch.conf | 127 | install -m 0644 ${S}/${@bb.utils.contains('DISTRO_FEATURES', 'systemd systemd-resolved', 'nsswitch-resolved.conf', 'nsswitch.conf', d)} ${D}${sysconfdir}/nsswitch.conf |
128 | } | 128 | } |
129 | 129 | ||
130 | DISTRO_VERSION[vardepsexclude] += "DATE" | 130 | DISTRO_VERSION[vardepsexclude] += "DATE" |
diff --git a/meta/recipes-core/busybox/busybox/0001-hwclock-Check-for-SYS_settimeofday-before-calling-sy.patch b/meta/recipes-core/busybox/busybox/0001-hwclock-Check-for-SYS_settimeofday-before-calling-sy.patch new file mode 100644 index 0000000000..11ef2b6824 --- /dev/null +++ b/meta/recipes-core/busybox/busybox/0001-hwclock-Check-for-SYS_settimeofday-before-calling-sy.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 4e1eafc6e0de3e58cac9f62e57b552eddb50ca8e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 7 Mar 2021 17:30:24 -0800 | ||
4 | Subject: [PATCH] hwclock: Check for SYS_settimeofday before calling syscall | ||
5 | |||
6 | Some newer architectures e.g. RISCV32 have 64bit time_t from get go and | ||
7 | thusly do not have gettimeofday_time64/settimeofday_time64 implemented | ||
8 | therefore check for SYS_settimeofday definition before making the | ||
9 | syscall. Fixes build for riscv32 and it will bail out at runtime. | ||
10 | |||
11 | This issue has been discussed on the musl mailing list, and | ||
12 | the musl developers' opinion is that Busybox is wrong: | ||
13 | |||
14 | https://www.openwall.com/lists/musl/2024/03/03/2 | ||
15 | https://www.openwall.com/lists/musl/2024/04/07/2 | ||
16 | |||
17 | The correct fix isn't clear, and in the mean time, the patch | ||
18 | turns the build issue into a runtime error only on the problematic | ||
19 | architecture (riscv32), which seems like a reasonable trade-off | ||
20 | |||
21 | Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2021-March/088583.html]] | ||
22 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
23 | --- | ||
24 | util-linux/hwclock.c | 7 +++++-- | ||
25 | 1 file changed, 5 insertions(+), 2 deletions(-) | ||
26 | |||
27 | diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c | ||
28 | index c3fd0eb57..dea9c9a55 100644 | ||
29 | --- a/util-linux/hwclock.c | ||
30 | +++ b/util-linux/hwclock.c | ||
31 | @@ -132,6 +132,7 @@ static void show_clock(const char **pp_rtcname, int utc) | ||
32 | |||
33 | static void set_kernel_tz(const struct timezone *tz) | ||
34 | { | ||
35 | + int ret = 1; | ||
36 | #if LIBC_IS_MUSL | ||
37 | /* musl libc does not pass tz argument to syscall | ||
38 | * because "it's deprecated by POSIX, therefore it's fine | ||
39 | @@ -140,9 +141,11 @@ static void set_kernel_tz(const struct timezone *tz) | ||
40 | #if !defined(SYS_settimeofday) && defined(SYS_settimeofday_time32) | ||
41 | # define SYS_settimeofday SYS_settimeofday_time32 | ||
42 | #endif | ||
43 | - int ret = syscall(SYS_settimeofday, NULL, tz); | ||
44 | +#if defined(SYS_settimeofday) | ||
45 | + ret = syscall(SYS_settimeofday, NULL, tz); | ||
46 | +#endif | ||
47 | #else | ||
48 | - int ret = settimeofday(NULL, tz); | ||
49 | + ret = settimeofday(NULL, tz); | ||
50 | #endif | ||
51 | if (ret) | ||
52 | bb_simple_perror_msg_and_die("settimeofday"); | ||
diff --git a/meta/recipes-core/busybox/busybox_1.37.0.bb b/meta/recipes-core/busybox/busybox_1.37.0.bb index 85f22ada53..9f7ded3354 100644 --- a/meta/recipes-core/busybox/busybox_1.37.0.bb +++ b/meta/recipes-core/busybox/busybox_1.37.0.bb | |||
@@ -54,6 +54,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ | |||
54 | file://0002-start-stop-daemon-fix-tests.patch \ | 54 | file://0002-start-stop-daemon-fix-tests.patch \ |
55 | file://0003-start-stop-false.patch \ | 55 | file://0003-start-stop-false.patch \ |
56 | file://0001-archival-disallow-path-traversals-CVE-2023-39810.patch \ | 56 | file://0001-archival-disallow-path-traversals-CVE-2023-39810.patch \ |
57 | file://0001-hwclock-Check-for-SYS_settimeofday-before-calling-sy.patch \ | ||
57 | " | 58 | " |
58 | SRC_URI:append:libc-musl = " file://musl.cfg" | 59 | SRC_URI:append:libc-musl = " file://musl.cfg" |
59 | SRC_URI:append:x86-64 = " file://sha_accel.cfg" | 60 | SRC_URI:append:x86-64 = " file://sha_accel.cfg" |
diff --git a/meta/recipes-core/glib-2.0/glib-2.0-initial_2.84.1.bb b/meta/recipes-core/glib-2.0/glib-2.0-initial_2.84.2.bb index acec7e9676..acec7e9676 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0-initial_2.84.1.bb +++ b/meta/recipes-core/glib-2.0/glib-2.0-initial_2.84.2.bb | |||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.84.1.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.84.2.bb index ef80cc47cf..ef80cc47cf 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0_2.84.1.bb +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.84.2.bb | |||
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc index d00bfe4c65..38e75aab61 100644 --- a/meta/recipes-core/glib-2.0/glib.inc +++ b/meta/recipes-core/glib-2.0/glib.inc | |||
@@ -234,7 +234,7 @@ SRC_URI:append:class-native = " file://relocate-modules.patch \ | |||
234 | file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \ | 234 | file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \ |
235 | " | 235 | " |
236 | 236 | ||
237 | SRC_URI[sha256sum] = "2b4bc2ec49611a5fc35f86aca855f2ed0196e69e53092bab6bb73396bf30789a" | 237 | SRC_URI[sha256sum] = "88e960dd937057407d61fcb3b45a860704b25923c37ae2478b85f2ecb5a4021f" |
238 | 238 | ||
239 | # Find any meson cross files in FILESPATH that are relevant for the current | 239 | # Find any meson cross files in FILESPATH that are relevant for the current |
240 | # build (using siteinfo) and add them to EXTRA_OEMESON. | 240 | # build (using siteinfo) and add them to EXTRA_OEMESON. |
diff --git a/meta/recipes-core/glibc/glibc-common.inc b/meta/recipes-core/glibc/glibc-common.inc index e048f75c5d..fb62a4af94 100644 --- a/meta/recipes-core/glibc/glibc-common.inc +++ b/meta/recipes-core/glibc/glibc-common.inc | |||
@@ -23,3 +23,5 @@ ARM_INSTRUCTION_SET:armv6 = "arm" | |||
23 | COMPATIBLE_HOST:libc-musl:class-target = "null" | 23 | COMPATIBLE_HOST:libc-musl:class-target = "null" |
24 | 24 | ||
25 | PV = "2.41+git" | 25 | PV = "2.41+git" |
26 | |||
27 | TOOLCHAIN = "gcc" | ||
diff --git a/meta/recipes-core/libxml/libxml2/0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch b/meta/recipes-core/libxml/libxml2/0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch new file mode 100644 index 0000000000..6ea5adafa2 --- /dev/null +++ b/meta/recipes-core/libxml/libxml2/0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch | |||
@@ -0,0 +1,81 @@ | |||
1 | From 55ed199fdb55a1a600616ba14ad0feedcf828d86 Mon Sep 17 00:00:00 2001 | ||
2 | From: Peter Marko <peter.marko@siemens.com> | ||
3 | Date: Mon, 26 May 2025 21:11:14 +0200 | ||
4 | Subject: [PATCH] Revert "cmake: Fix installation directories in | ||
5 | libxml2-config.cmake" | ||
6 | |||
7 | This reverts commit 75dde50b20215a2a3a445b62f36a67c8ed337cab. | ||
8 | |||
9 | Upstream-Status: Inappropriate [upstream ticket https://gitlab.gnome.org/GNOME/libxml2/-/issues/898#note_2452864] | ||
10 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
11 | --- | ||
12 | configure.ac | 11 ----------- | ||
13 | libxml2-config.cmake.in | 11 +++++++---- | ||
14 | meson.build | 3 --- | ||
15 | 3 files changed, 7 insertions(+), 18 deletions(-) | ||
16 | |||
17 | diff --git a/configure.ac b/configure.ac | ||
18 | index 40e75151..d21ebfe5 100644 | ||
19 | --- a/configure.ac | ||
20 | +++ b/configure.ac | ||
21 | @@ -1061,17 +1061,6 @@ AC_SUBST(XML_PRIVATE_LIBS) | ||
22 | AC_SUBST(XML_PRIVATE_CFLAGS) | ||
23 | AC_SUBST(XML_INCLUDEDIR) | ||
24 | |||
25 | -# for libxml2-config.cmake.in | ||
26 | -AX_RECURSIVE_EVAL(["$bindir"], [INSTALL_BINDIR]) | ||
27 | -AX_RECURSIVE_EVAL(["$includedir"], [INSTALL_INCLUDEDIR]) | ||
28 | -AX_RECURSIVE_EVAL(["$libdir"], [INSTALL_LIBDIR]) | ||
29 | -AC_SUBST(INSTALL_BINDIR) | ||
30 | -AC_SUBST(INSTALL_INCLUDEDIR) | ||
31 | -AC_SUBST(INSTALL_LIBDIR) | ||
32 | -AM_SUBST_NOTMAKE(INSTALL_BINDIR) | ||
33 | -AM_SUBST_NOTMAKE(INSTALL_INCLUDEDIR) | ||
34 | -AM_SUBST_NOTMAKE(INSTALL_LIBDIR) | ||
35 | - | ||
36 | AX_RECURSIVE_EVAL(["$sysconfdir"], [XML_SYSCONFDIR]) | ||
37 | AC_DEFINE_UNQUOTED([XML_SYSCONFDIR], ["$XML_SYSCONFDIR"], | ||
38 | [System configuration directory (/etc)]) | ||
39 | diff --git a/libxml2-config.cmake.in b/libxml2-config.cmake.in | ||
40 | index 4945dda4..31036805 100644 | ||
41 | --- a/libxml2-config.cmake.in | ||
42 | +++ b/libxml2-config.cmake.in | ||
43 | @@ -24,17 +24,20 @@ | ||
44 | # LibXml2::LibXml2 - the LibXml2 library | ||
45 | # LibXml2::xmllint - the xmllint command-line executable | ||
46 | |||
47 | +get_filename_component(_libxml2_rootdir ${CMAKE_CURRENT_LIST_DIR}/../../../ ABSOLUTE) | ||
48 | + | ||
49 | set(LIBXML2_VERSION_MAJOR @LIBXML_MAJOR_VERSION@) | ||
50 | set(LIBXML2_VERSION_MINOR @LIBXML_MINOR_VERSION@) | ||
51 | set(LIBXML2_VERSION_MICRO @LIBXML_MICRO_VERSION@) | ||
52 | set(LIBXML2_VERSION_STRING "@VERSION@") | ||
53 | set(LIBXML2_DEFINITIONS "@XML_CFLAGS@") | ||
54 | -set(LIBXML2_INCLUDE_DIR @INSTALL_INCLUDEDIR@/libxml2) | ||
55 | -set(LIBXML2_LIBRARY_DIR @INSTALL_LIBDIR@) | ||
56 | +set(LIBXML2_INSTALL_PREFIX ${_libxml2_rootdir}) | ||
57 | +set(LIBXML2_INCLUDE_DIR ${_libxml2_rootdir}/include/libxml2) | ||
58 | +set(LIBXML2_LIBRARY_DIR ${_libxml2_rootdir}/lib) | ||
59 | |||
60 | find_library(LIBXML2_LIBRARY NAMES xml2 HINTS ${LIBXML2_LIBRARY_DIR} NO_DEFAULT_PATH) | ||
61 | -find_program(LIBXML2_XMLCATALOG_EXECUTABLE NAMES xmlcatalog HINTS @INSTALL_BINDIR@ NO_DEFAULT_PATH) | ||
62 | -find_program(LIBXML2_XMLLINT_EXECUTABLE NAMES xmllint HINTS @INSTALL_BINDIR@ NO_DEFAULT_PATH) | ||
63 | +find_program(LIBXML2_XMLCATALOG_EXECUTABLE NAMES xmlcatalog HINTS ${_libxml2_rootdir}/bin NO_DEFAULT_PATH) | ||
64 | +find_program(LIBXML2_XMLLINT_EXECUTABLE NAMES xmllint HINTS ${_libxml2_rootdir}/bin NO_DEFAULT_PATH) | ||
65 | |||
66 | set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY}) | ||
67 | set(LIBXML2_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR}) | ||
68 | diff --git a/meson.build b/meson.build | ||
69 | index 4c59211d..3e5f25d3 100644 | ||
70 | --- a/meson.build | ||
71 | +++ b/meson.build | ||
72 | @@ -599,9 +599,6 @@ config_cmake = configuration_data() | ||
73 | config_cmake.set('LIBXML_MAJOR_VERSION', v_maj) | ||
74 | config_cmake.set('LIBXML_MINOR_VERSION', v_min) | ||
75 | config_cmake.set('LIBXML_MICRO_VERSION', v_mic) | ||
76 | -config_cmake.set('INSTALL_BINDIR', dir_bin) | ||
77 | -config_cmake.set('INSTALL_INCLUDEDIR', dir_include) | ||
78 | -config_cmake.set('INSTALL_LIBDIR', dir_lib) | ||
79 | config_cmake.set('VERSION', meson.project_version()) | ||
80 | config_cmake.set('WITH_HTTP', want_http.to_int().to_string()) | ||
81 | config_cmake.set('WITH_ICONV', want_iconv.to_int().to_string()) | ||
diff --git a/meta/recipes-core/libxml/libxml2/install-tests.patch b/meta/recipes-core/libxml/libxml2/install-tests.patch index 1c8c13ab5c..789aeca119 100644 --- a/meta/recipes-core/libxml/libxml2/install-tests.patch +++ b/meta/recipes-core/libxml/libxml2/install-tests.patch | |||
@@ -15,7 +15,7 @@ diff --git a/Makefile.am b/Makefile.am | |||
15 | index 4cb9a5c..8adcd7e 100644 | 15 | index 4cb9a5c..8adcd7e 100644 |
16 | --- a/Makefile.am | 16 | --- a/Makefile.am |
17 | +++ b/Makefile.am | 17 | +++ b/Makefile.am |
18 | @@ -27,6 +27,16 @@ check_PROGRAMS = \ | 18 | @@ -26,6 +26,16 @@ check_PROGRAMS = \ |
19 | testparser \ | 19 | testparser \ |
20 | testrecurse | 20 | testrecurse |
21 | 21 | ||
@@ -29,6 +29,6 @@ index 4cb9a5c..8adcd7e 100644 | |||
29 | + cp -r $(srcdir)/result $(DESTDIR)$(ptestdir) | 29 | + cp -r $(srcdir)/result $(DESTDIR)$(ptestdir) |
30 | + cp -r $(srcdir)/python/tests $(DESTDIR)$(ptestdir)/python | 30 | + cp -r $(srcdir)/python/tests $(DESTDIR)$(ptestdir)/python |
31 | + | 31 | + |
32 | bin_PROGRAMS = xmllint xmlcatalog | 32 | bin_PROGRAMS = xmllint |
33 | 33 | ||
34 | bin_SCRIPTS = xml2-config | 34 | bin_SCRIPTS = xml2-config |
diff --git a/meta/recipes-core/libxml/libxml2/run-ptest b/meta/recipes-core/libxml/libxml2/run-ptest index f252a78f17..cbbdd5592f 100755 --- a/meta/recipes-core/libxml/libxml2/run-ptest +++ b/meta/recipes-core/libxml/libxml2/run-ptest | |||
@@ -5,7 +5,7 @@ set -e | |||
5 | export LC_ALL=en_US.UTF-8 | 5 | export LC_ALL=en_US.UTF-8 |
6 | 6 | ||
7 | # testModule isn't that useful and hard-codes buildtree, so we don't run that | 7 | # testModule isn't that useful and hard-codes buildtree, so we don't run that |
8 | TESTS="runtest runsuite testrecurse testchar testdict testThreads runxmlconf testapi" | 8 | TESTS="runtest runsuite testrecurse testchar testdict runxmlconf testapi testlimits testparser" |
9 | 9 | ||
10 | for T in $TESTS; do | 10 | for T in $TESTS; do |
11 | echo Running $T | 11 | echo Running $T |
diff --git a/meta/recipes-core/libxml/libxml2_2.13.8.bb b/meta/recipes-core/libxml/libxml2_2.14.3.bb index e82e0e8ec3..da75cbe450 100644 --- a/meta/recipes-core/libxml/libxml2_2.13.8.bb +++ b/meta/recipes-core/libxml/libxml2_2.14.3.bb | |||
@@ -4,7 +4,7 @@ HOMEPAGE = "https://gitlab.gnome.org/GNOME/libxml2" | |||
4 | BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2" | 4 | BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2" |
5 | SECTION = "libs" | 5 | SECTION = "libs" |
6 | LICENSE = "MIT" | 6 | LICENSE = "MIT" |
7 | LIC_FILES_CHKSUM = "file://Copyright;md5=f437ed9058e8e5135e47c01e973376ba \ | 7 | LIC_FILES_CHKSUM = "file://Copyright;md5=5873615e8a9ecbf5c8857c4312ee05d6 \ |
8 | file://dict.c;beginline=6;endline=15;md5=2b4b7b827d2d8b080372433c4c9c85b6 \ | 8 | file://dict.c;beginline=6;endline=15;md5=2b4b7b827d2d8b080372433c4c9c85b6 \ |
9 | file://list.c;beginline=4;endline=13;md5=b9c25b021ccaf287e50060602d20f3a7 \ | 9 | file://list.c;beginline=4;endline=13;md5=b9c25b021ccaf287e50060602d20f3a7 \ |
10 | " | 10 | " |
@@ -17,9 +17,10 @@ inherit gnomebase | |||
17 | SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testtar \ | 17 | SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testtar \ |
18 | file://run-ptest \ | 18 | file://run-ptest \ |
19 | file://install-tests.patch \ | 19 | file://install-tests.patch \ |
20 | file://0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch \ | ||
20 | " | 21 | " |
21 | 22 | ||
22 | SRC_URI[archive.sha256sum] = "277294cb33119ab71b2bc81f2f445e9bc9435b893ad15bb2cd2b0e859a0ee84a" | 23 | SRC_URI[archive.sha256sum] = "6de55cacc8c2bc758f2ef6f93c313cb30e4dd5d84ac5d3c7ccbd9344d8cc6833" |
23 | SRC_URI[testtar.sha256sum] = "c6b2d42ee50b8b236e711a97d68e6c4b5c8d83e69a2be4722379f08702ea7273" | 24 | SRC_URI[testtar.sha256sum] = "c6b2d42ee50b8b236e711a97d68e6c4b5c8d83e69a2be4722379f08702ea7273" |
24 | 25 | ||
25 | # Disputed as a security issue, but fixed in d39f780 | 26 | # Disputed as a security issue, but fixed in d39f780 |
@@ -27,11 +28,8 @@ CVE_STATUS[CVE-2023-45322] = "disputed: issue requires memory allocation to fail | |||
27 | 28 | ||
28 | BINCONFIG = "${bindir}/xml2-config" | 29 | BINCONFIG = "${bindir}/xml2-config" |
29 | 30 | ||
30 | PACKAGECONFIG ??= "python \ | 31 | PACKAGECONFIG ??= "python" |
31 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ | ||
32 | " | ||
33 | PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3" | 32 | PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3" |
34 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | ||
35 | 33 | ||
36 | inherit autotools pkgconfig binconfig-disabled ptest | 34 | inherit autotools pkgconfig binconfig-disabled ptest |
37 | 35 | ||
diff --git a/meta/recipes-core/newlib/libgloss_git.bb b/meta/recipes-core/newlib/libgloss_git.bb index 3c97a7f296..92bb81050b 100644 --- a/meta/recipes-core/newlib/libgloss_git.bb +++ b/meta/recipes-core/newlib/libgloss_git.bb | |||
@@ -21,8 +21,12 @@ do_install:append() { | |||
21 | install -d ${D}${libdir} | 21 | install -d ${D}${libdir} |
22 | mv -v ${D}${prefix}/${TARGET_SYS}/lib/* ${D}${libdir} | 22 | mv -v ${D}${prefix}/${TARGET_SYS}/lib/* ${D}${libdir} |
23 | 23 | ||
24 | # Remove original directory | 24 | # Remove original directory |
25 | rmdir -p --ignore-fail-on-non-empty ${D}${prefix}/${TARGET_SYS}/lib | 25 | rmdir -p --ignore-fail-on-non-empty ${D}${prefix}/${TARGET_SYS}/lib |
26 | # Remove empty include dir | ||
27 | rmdir ${D}/${prefix}/${TARGET_SYS}/include | ||
28 | rmdir ${D}/${prefix}/${TARGET_SYS}/ | ||
29 | |||
26 | } | 30 | } |
27 | 31 | ||
28 | # Split packages correctly | 32 | # Split packages correctly |
diff --git a/meta/recipes-core/newlib/newlib.inc b/meta/recipes-core/newlib/newlib.inc index 50113ba433..5b5025148e 100644 --- a/meta/recipes-core/newlib/newlib.inc +++ b/meta/recipes-core/newlib/newlib.inc | |||
@@ -8,16 +8,16 @@ LIC_FILES_CHKSUM = " \ | |||
8 | file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ | 8 | file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ |
9 | file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ | 9 | file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ |
10 | file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ | 10 | file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ |
11 | file://COPYING.LIBGLOSS;md5=c0469b6ebb847a75781066be515f032d \ | 11 | file://COPYING.LIBGLOSS;md5=faa6f6ad545714df2a7d1276ed899f15 \ |
12 | file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | 12 | file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ |
13 | file://COPYING.NEWLIB;md5=4f1a15846ffee91e352418563e1bce27 \ | 13 | file://COPYING.NEWLIB;md5=61255563bbcda142f581b94591b6a589 \ |
14 | file://newlib/libc/posix/COPYRIGHT;md5=103468ff1982be840fdf4ee9f8b51bbf \ | 14 | file://newlib/libc/posix/COPYRIGHT;md5=103468ff1982be840fdf4ee9f8b51bbf \ |
15 | " | 15 | " |
16 | 16 | ||
17 | BASEVER = "4.4.0" | 17 | BASEVER = "4.5.0" |
18 | PV = "${BASEVER}+git" | 18 | PV = "${BASEVER}+git" |
19 | SRC_URI = "git://sourceware.org/git/newlib-cygwin.git;protocol=https;branch=main" | 19 | SRC_URI = "git://sourceware.org/git/newlib-cygwin.git;protocol=https;branch=main" |
20 | SRCREV = "ad11e2587f83d61357a32c61c36d72ea4f39315e" | 20 | SRCREV = "5e5e51f1dc56a99eb4648c28e00d73b6ea44a8b0" |
21 | 21 | ||
22 | INHIBIT_DEFAULT_DEPS = "1" | 22 | INHIBIT_DEFAULT_DEPS = "1" |
23 | DEPENDS = "virtual/cross-cc" | 23 | DEPENDS = "virtual/cross-cc" |
diff --git a/meta/recipes-core/psplash/files/psplash-init b/meta/recipes-core/psplash/files/psplash-init index e0f80bcdc0..e0f80bcdc0 100755..100644 --- a/meta/recipes-core/psplash/files/psplash-init +++ b/meta/recipes-core/psplash/files/psplash-init | |||
diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb index 712fff7bd0..f3647d389d 100644 --- a/meta/recipes-core/psplash/psplash_git.bb +++ b/meta/recipes-core/psplash/psplash_git.bb | |||
@@ -6,7 +6,7 @@ LICENSE = "GPL-2.0-or-later" | |||
6 | LIC_FILES_CHKSUM = "file://psplash.h;beginline=1;endline=8;md5=8f232c1e95929eacab37f00900580224" | 6 | LIC_FILES_CHKSUM = "file://psplash.h;beginline=1;endline=8;md5=8f232c1e95929eacab37f00900580224" |
7 | DEPENDS = "gdk-pixbuf-native" | 7 | DEPENDS = "gdk-pixbuf-native" |
8 | 8 | ||
9 | SRCREV = "1f64c654129fdb6a1b75d8c16e3bcdd986468083" | 9 | SRCREV = "53ae74a36bf17675228552abb927d2f981940a6a" |
10 | PV = "0.1+git" | 10 | PV = "0.1+git" |
11 | 11 | ||
12 | SRC_URI = "git://git.yoctoproject.org/${BPN};branch=master;protocol=https \ | 12 | SRC_URI = "git://git.yoctoproject.org/${BPN};branch=master;protocol=https \ |
diff --git a/meta/recipes-core/systemd/systemd-boot_257.5.bb b/meta/recipes-core/systemd/systemd-boot_257.5.bb index 6a50ac05aa..151e4a9537 100644 --- a/meta/recipes-core/systemd/systemd-boot_257.5.bb +++ b/meta/recipes-core/systemd/systemd-boot_257.5.bb | |||
@@ -47,6 +47,11 @@ FILES:${PN} = "${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}" | |||
47 | 47 | ||
48 | RDEPENDS:${PN} += "virtual-systemd-bootconf" | 48 | RDEPENDS:${PN} += "virtual-systemd-bootconf" |
49 | 49 | ||
50 | # efi portions use -mgeneral-regs-only option which conflicts with SSE | ||
51 | # especially clang throws errors about it | ||
52 | # error: the 'sse' unit is not supported with this instruction set | ||
53 | TUNE_CCARGS:remove = "-mfpmath=sse" | ||
54 | |||
50 | CFLAGS:append:libc-musl = " -D__DEFINED_wchar_t" | 55 | CFLAGS:append:libc-musl = " -D__DEFINED_wchar_t" |
51 | 56 | ||
52 | COMPATIBLE_HOST = "(aarch64.*|arm.*|x86_64.*|i.86.*|riscv.*)-linux" | 57 | COMPATIBLE_HOST = "(aarch64.*|arm.*|x86_64.*|i.86.*|riscv.*)-linux" |
diff --git a/meta/recipes-devtools/binutils/binutils-2.44.inc b/meta/recipes-devtools/binutils/binutils-2.44.inc index 6bc65a0fea..40a9a53310 100644 --- a/meta/recipes-devtools/binutils/binutils-2.44.inc +++ b/meta/recipes-devtools/binutils/binutils-2.44.inc | |||
@@ -35,5 +35,7 @@ SRC_URI = "\ | |||
35 | file://0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \ | 35 | file://0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \ |
36 | file://0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \ | 36 | file://0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \ |
37 | file://0014-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch \ | 37 | file://0014-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch \ |
38 | file://0015-CVE-2025-1178.patch \ | ||
39 | file://CVE-2025-1180.patch \ | ||
38 | " | 40 | " |
39 | S = "${WORKDIR}/git" | 41 | S = "${WORKDIR}/git" |
diff --git a/meta/recipes-devtools/binutils/binutils/0015-CVE-2025-1178.patch b/meta/recipes-devtools/binutils/binutils/0015-CVE-2025-1178.patch new file mode 100644 index 0000000000..c39f43fba4 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0015-CVE-2025-1178.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 75086e9de1707281172cc77f178e7949a4414ed0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nick Clifton <nickc@redhat.com> | ||
3 | Date: Wed, 5 Feb 2025 13:26:51 +0000 | ||
4 | Subject: [PATCH] Prevent an abort in the bfd linker when attempting to | ||
5 | generate dynamic relocs for a corrupt input file. | ||
6 | |||
7 | PR 32638 | ||
8 | |||
9 | Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=75086e9de1707281172cc77f178e7949a4414ed0] | ||
10 | CVE: CVE-2025-1178 | ||
11 | |||
12 | Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> | ||
13 | |||
14 | diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c | ||
15 | index cb32732e..a08e9c97 100644 | ||
16 | --- a/bfd/elf64-x86-64.c | ||
17 | +++ b/bfd/elf64-x86-64.c | ||
18 | @@ -5031,6 +5031,15 @@ elf_x86_64_finish_dynamic_symbol (bfd *output_bfd, | ||
19 | |||
20 | if (generate_dynamic_reloc) | ||
21 | { | ||
22 | + /* If the relgot section has not been created, then | ||
23 | + generate an error instead of a reloc. cf PR 32638. */ | ||
24 | + if (relgot == NULL || relgot->size == 0) | ||
25 | + { | ||
26 | + info->callbacks->einfo (_("%F%pB: Unable to generate dynamic relocs because a suitable section does not exist\n"), | ||
27 | + output_bfd); | ||
28 | + return false; | ||
29 | + } | ||
30 | + | ||
31 | if (relative_reloc_name != NULL | ||
32 | && htab->params->report_relative_reloc) | ||
33 | _bfd_x86_elf_link_report_relative_reloc | ||
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2025-1180.patch b/meta/recipes-devtools/binutils/binutils/CVE-2025-1180.patch new file mode 100644 index 0000000000..073361cf19 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/CVE-2025-1180.patch | |||
@@ -0,0 +1,165 @@ | |||
1 | From 509c5afcd71afd36cd6496f8c84733b11bd5e9e5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nick Clifton <nickc@redhat.com> | ||
3 | Date: Thu, 22 May 2025 01:56:17 -0700 | ||
4 | Subject: [PATCH] Backport fix for PR 32642(CVE-2025-1180) | ||
5 | |||
6 | Backporting the fix from PR 32636 to fix PR 32642 (ld SEGV (illegal read access) | ||
7 | in _bfd_elf_write_section_eh_frame (bfd/elf-eh-frame.c:2234:29) with | ||
8 | --gc-sections --gc-keep-exported option) | ||
9 | |||
10 | https://nvd.nist.gov/vuln/detail/CVE-2025-1180 is associated with | ||
11 | PR32642 which will get fixed with commit from PR 32636. | ||
12 | |||
13 | (cherry picked from commit: f9978defb6fab0bd8583942d97c112b0932ac814) | ||
14 | Upstream-Status: Submitted [https://sourceware.org/pipermail/binutils/2025-May/141351.html] | ||
15 | CVE: CVE-2025-1180 | ||
16 | |||
17 | Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com> | ||
18 | --- | ||
19 | bfd/elflink.c | 88 +++++++++++++++++++++++++-------------------------- | ||
20 | 1 file changed, 44 insertions(+), 44 deletions(-) | ||
21 | |||
22 | diff --git a/bfd/elflink.c b/bfd/elflink.c | ||
23 | index 6346d7e2b4b..d765b688801 100644 | ||
24 | --- a/bfd/elflink.c | ||
25 | +++ b/bfd/elflink.c | ||
26 | @@ -96,22 +96,37 @@ _bfd_elf_link_keep_memory (struct bfd_link_info *info) | ||
27 | return true; | ||
28 | } | ||
29 | |||
30 | -asection * | ||
31 | -_bfd_elf_section_for_symbol (struct elf_reloc_cookie *cookie, | ||
32 | - unsigned long r_symndx, | ||
33 | - bool discard) | ||
34 | +static struct elf_link_hash_entry * | ||
35 | +get_ext_sym_hash (struct elf_reloc_cookie *cookie, unsigned long r_symndx) | ||
36 | { | ||
37 | - if (r_symndx >= cookie->locsymcount | ||
38 | - || ELF_ST_BIND (cookie->locsyms[r_symndx].st_info) != STB_LOCAL) | ||
39 | - { | ||
40 | - struct elf_link_hash_entry *h; | ||
41 | + struct elf_link_hash_entry *h = NULL; | ||
42 | |||
43 | + if ((r_symndx >= cookie->locsymcount | ||
44 | + || ELF_ST_BIND (cookie->locsyms[r_symndx].st_info) != STB_LOCAL) | ||
45 | + /* Guard against corrupt input. See PR 32636 for an example. */ | ||
46 | + && r_symndx >= cookie->extsymoff) | ||
47 | + { | ||
48 | h = cookie->sym_hashes[r_symndx - cookie->extsymoff]; | ||
49 | |||
50 | while (h->root.type == bfd_link_hash_indirect | ||
51 | || h->root.type == bfd_link_hash_warning) | ||
52 | h = (struct elf_link_hash_entry *) h->root.u.i.link; | ||
53 | + } | ||
54 | + | ||
55 | + return h; | ||
56 | +} | ||
57 | |||
58 | +asection * | ||
59 | +_bfd_elf_section_for_symbol (struct elf_reloc_cookie *cookie, | ||
60 | + unsigned long r_symndx, | ||
61 | + bool discard) | ||
62 | +{ | ||
63 | + struct elf_link_hash_entry *h; | ||
64 | + | ||
65 | + h = get_ext_sym_hash (cookie, r_symndx); | ||
66 | + | ||
67 | + if (h != NULL) | ||
68 | + { | ||
69 | if ((h->root.type == bfd_link_hash_defined | ||
70 | || h->root.type == bfd_link_hash_defweak) | ||
71 | && discarded_section (h->root.u.def.section)) | ||
72 | @@ -119,21 +134,20 @@ _bfd_elf_section_for_symbol (struct elf_reloc_cookie *cookie, | ||
73 | else | ||
74 | return NULL; | ||
75 | } | ||
76 | - else | ||
77 | - { | ||
78 | - /* It's not a relocation against a global symbol, | ||
79 | - but it could be a relocation against a local | ||
80 | - symbol for a discarded section. */ | ||
81 | - asection *isec; | ||
82 | - Elf_Internal_Sym *isym; | ||
83 | |||
84 | - /* Need to: get the symbol; get the section. */ | ||
85 | - isym = &cookie->locsyms[r_symndx]; | ||
86 | - isec = bfd_section_from_elf_index (cookie->abfd, isym->st_shndx); | ||
87 | - if (isec != NULL | ||
88 | - && discard ? discarded_section (isec) : 1) | ||
89 | - return isec; | ||
90 | - } | ||
91 | + /* It's not a relocation against a global symbol, | ||
92 | + but it could be a relocation against a local | ||
93 | + symbol for a discarded section. */ | ||
94 | + asection *isec; | ||
95 | + Elf_Internal_Sym *isym; | ||
96 | + | ||
97 | + /* Need to: get the symbol; get the section. */ | ||
98 | + isym = &cookie->locsyms[r_symndx]; | ||
99 | + isec = bfd_section_from_elf_index (cookie->abfd, isym->st_shndx); | ||
100 | + if (isec != NULL | ||
101 | + && discard ? discarded_section (isec) : 1) | ||
102 | + return isec; | ||
103 | + | ||
104 | return NULL; | ||
105 | } | ||
106 | |||
107 | @@ -13994,22 +14008,12 @@ _bfd_elf_gc_mark_rsec (struct bfd_link_info *info, asection *sec, | ||
108 | if (r_symndx == STN_UNDEF) | ||
109 | return NULL; | ||
110 | |||
111 | - if (r_symndx >= cookie->locsymcount | ||
112 | - || ELF_ST_BIND (cookie->locsyms[r_symndx].st_info) != STB_LOCAL) | ||
113 | + h = get_ext_sym_hash (cookie, r_symndx); | ||
114 | + | ||
115 | + if (h != NULL) | ||
116 | { | ||
117 | bool was_marked; | ||
118 | |||
119 | - h = cookie->sym_hashes[r_symndx - cookie->extsymoff]; | ||
120 | - if (h == NULL) | ||
121 | - { | ||
122 | - info->callbacks->fatal (_("%F%P: corrupt input: %pB\n"), | ||
123 | - sec->owner); | ||
124 | - return NULL; | ||
125 | - } | ||
126 | - while (h->root.type == bfd_link_hash_indirect | ||
127 | - || h->root.type == bfd_link_hash_warning) | ||
128 | - h = (struct elf_link_hash_entry *) h->root.u.i.link; | ||
129 | - | ||
130 | was_marked = h->mark; | ||
131 | h->mark = 1; | ||
132 | /* Keep all aliases of the symbol too. If an object symbol | ||
133 | @@ -15064,17 +15068,12 @@ bfd_elf_reloc_symbol_deleted_p (bfd_vma offset, void *cookie) | ||
134 | if (r_symndx == STN_UNDEF) | ||
135 | return true; | ||
136 | |||
137 | - if (r_symndx >= rcookie->locsymcount | ||
138 | - || ELF_ST_BIND (rcookie->locsyms[r_symndx].st_info) != STB_LOCAL) | ||
139 | - { | ||
140 | - struct elf_link_hash_entry *h; | ||
141 | - | ||
142 | - h = rcookie->sym_hashes[r_symndx - rcookie->extsymoff]; | ||
143 | + struct elf_link_hash_entry *h; | ||
144 | |||
145 | - while (h->root.type == bfd_link_hash_indirect | ||
146 | - || h->root.type == bfd_link_hash_warning) | ||
147 | - h = (struct elf_link_hash_entry *) h->root.u.i.link; | ||
148 | + h = get_ext_sym_hash (rcookie, r_symndx); | ||
149 | |||
150 | + if (h != NULL) | ||
151 | + { | ||
152 | if ((h->root.type == bfd_link_hash_defined | ||
153 | || h->root.type == bfd_link_hash_defweak) | ||
154 | && (h->root.u.def.section->owner != rcookie->abfd | ||
155 | @@ -15098,6 +15097,7 @@ bfd_elf_reloc_symbol_deleted_p (bfd_vma offset, void *cookie) | ||
156 | || discarded_section (isec))) | ||
157 | return true; | ||
158 | } | ||
159 | + | ||
160 | return false; | ||
161 | } | ||
162 | return false; | ||
163 | -- | ||
164 | 2.49.0 | ||
165 | |||
diff --git a/meta/recipes-devtools/clang/clang/0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch b/meta/recipes-devtools/clang/clang/0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch index 21b033b498..3853d7648b 100644 --- a/meta/recipes-devtools/clang/clang/0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch +++ b/meta/recipes-devtools/clang/clang/0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From ec9babfa91931042e7aa771915e2f1d4dc8d15e0 Mon Sep 17 00:00:00 2001 | 1 | From 1fa8ec110c67714cff009b481c430e3d004bfaad Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sun, 27 Aug 2017 10:37:49 -0700 | 3 | Date: Sun, 27 Aug 2017 10:37:49 -0700 |
4 | Subject: [PATCH] libcxxabi: Find libunwind headers when | 4 | Subject: [PATCH] libcxxabi: Find libunwind headers when |
diff --git a/meta/recipes-devtools/clang/clang/0002-compiler-rt-support-a-new-embedded-linux-target.patch b/meta/recipes-devtools/clang/clang/0002-compiler-rt-support-a-new-embedded-linux-target.patch index 88cef402da..d5d6a2c6d7 100644 --- a/meta/recipes-devtools/clang/clang/0002-compiler-rt-support-a-new-embedded-linux-target.patch +++ b/meta/recipes-devtools/clang/clang/0002-compiler-rt-support-a-new-embedded-linux-target.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 8cdfcfb9102c4008758bb844856e553d4fe4ae79 Mon Sep 17 00:00:00 2001 | 1 | From 6e8c6c53281fdd3b11d29d706905a3fe959afd11 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sun, 19 Apr 2015 15:16:23 -0700 | 3 | Date: Sun, 19 Apr 2015 15:16:23 -0700 |
4 | Subject: [PATCH] compiler-rt: support a new embedded linux target | 4 | Subject: [PATCH] compiler-rt: support a new embedded linux target |
diff --git a/meta/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch b/meta/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch index a153624860..0ee7090290 100644 --- a/meta/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch +++ b/meta/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From c105a2efab08776d1f4df6b9b8d26d0f89d14b41 Mon Sep 17 00:00:00 2001 | 1 | From 419855642e4a48d09e7b3b1e02593b6d9a506089 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Thu, 19 May 2016 23:11:45 -0700 | 3 | Date: Thu, 19 May 2016 23:11:45 -0700 |
4 | Subject: [PATCH] compiler-rt: Simplify cross-compilation. Don't use | 4 | Subject: [PATCH] compiler-rt: Simplify cross-compilation. Don't use |
diff --git a/meta/recipes-devtools/clang/clang/0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/meta/recipes-devtools/clang/clang/0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch index c70f740222..60b5360057 100644 --- a/meta/recipes-devtools/clang/clang/0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch +++ b/meta/recipes-devtools/clang/clang/0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 388a70b4a8f828b7c58a0fb7bc3ee18001bc5f9b Mon Sep 17 00:00:00 2001 | 1 | From 2603da5f1fce88f6c7f6134faf7757f17b7e14f5 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sat, 21 May 2016 00:33:20 +0000 | 3 | Date: Sat, 21 May 2016 00:33:20 +0000 |
4 | Subject: [PATCH] llvm: TargetLibraryInfo: Undefine libc functions if they are | 4 | Subject: [PATCH] llvm: TargetLibraryInfo: Undefine libc functions if they are |
diff --git a/meta/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-and-libdir-path.patch b/meta/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-and-libdir-path.patch index 6d3f5293aa..7aea73e611 100644 --- a/meta/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-and-libdir-path.patch +++ b/meta/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-and-libdir-path.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 0b344231c49d8c145bc3ad882d259d36fb19e827 Mon Sep 17 00:00:00 2001 | 1 | From 13a9ce5a34060abaa6d5da5176eb1dab271dac4e Mon Sep 17 00:00:00 2001 |
2 | From: Martin Kelly <mkelly@xevo.com> | 2 | From: Martin Kelly <mkelly@xevo.com> |
3 | Date: Fri, 19 May 2017 00:22:57 -0700 | 3 | Date: Fri, 19 May 2017 00:22:57 -0700 |
4 | Subject: [PATCH] llvm: allow env override of exe and libdir path | 4 | Subject: [PATCH] llvm: allow env override of exe and libdir path |
diff --git a/meta/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch b/meta/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch index 0258687820..44fa980ab8 100644 --- a/meta/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch +++ b/meta/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 80cacc04e4c0d34f79ee2f112b302c4fbb797d72 Mon Sep 17 00:00:00 2001 | 1 | From a804903ed85707d9a06c7e01aef536b3042790d0 Mon Sep 17 00:00:00 2001 |
2 | From: Dan McGregor <dan.mcgregor@usask.ca> | 2 | From: Dan McGregor <dan.mcgregor@usask.ca> |
3 | Date: Wed, 26 Apr 2017 20:29:41 -0600 | 3 | Date: Wed, 26 Apr 2017 20:29:41 -0600 |
4 | Subject: [PATCH] clang: driver: Check sysroot for ldso path | 4 | Subject: [PATCH] clang: driver: Check sysroot for ldso path |
diff --git a/meta/recipes-devtools/clang/clang/0007-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch b/meta/recipes-devtools/clang/clang/0007-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch index 1681080ece..6374ec7bf5 100644 --- a/meta/recipes-devtools/clang/clang/0007-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch +++ b/meta/recipes-devtools/clang/clang/0007-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 47dfdd42687c403c044fdb830472d7bedc1b3d39 Mon Sep 17 00:00:00 2001 | 1 | From 703e5acbeaad6eeb316740dd8b92b34db99bb1b3 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Thu, 19 May 2016 21:11:06 -0700 | 3 | Date: Thu, 19 May 2016 21:11:06 -0700 |
4 | Subject: [PATCH] clang: Driver/tools.cpp: Add -lssp_nonshared on musl | 4 | Subject: [PATCH] clang: Driver/tools.cpp: Add -lssp_nonshared on musl |
diff --git a/meta/recipes-devtools/clang/clang/0008-clang-Prepend-trailing-to-sysroot.patch b/meta/recipes-devtools/clang/clang/0008-clang-Prepend-trailing-to-sysroot.patch index 12f670034e..16d8c9bae5 100644 --- a/meta/recipes-devtools/clang/clang/0008-clang-Prepend-trailing-to-sysroot.patch +++ b/meta/recipes-devtools/clang/clang/0008-clang-Prepend-trailing-to-sysroot.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 4b64a243ce69f782964d4841d1079689a62ebdc1 Mon Sep 17 00:00:00 2001 | 1 | From b1d4a42b6078502530924cd0d15052671c760eb6 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Thu, 16 Mar 2017 09:02:13 -0700 | 3 | Date: Thu, 16 Mar 2017 09:02:13 -0700 |
4 | Subject: [PATCH] clang: Prepend trailing '/' to sysroot | 4 | Subject: [PATCH] clang: Prepend trailing '/' to sysroot |
diff --git a/meta/recipes-devtools/clang/clang/0009-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/meta/recipes-devtools/clang/clang/0009-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch index 5d7a292fcf..2ad1130355 100644 --- a/meta/recipes-devtools/clang/clang/0009-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch +++ b/meta/recipes-devtools/clang/clang/0009-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From edc111019281ed898add2c3f86ebfd54b0fa46d9 Mon Sep 17 00:00:00 2001 | 1 | From 3edfe16c0d8bb3d135465038cb07c8122baac698 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Thu, 16 Mar 2017 19:06:26 -0700 | 3 | Date: Thu, 16 Mar 2017 19:06:26 -0700 |
4 | Subject: [PATCH] clang: Look inside the target sysroot for compiler runtime | 4 | Subject: [PATCH] clang: Look inside the target sysroot for compiler runtime |
diff --git a/meta/recipes-devtools/clang/clang/0010-clang-Define-releative-gcc-installation-dir.patch b/meta/recipes-devtools/clang/clang/0010-clang-Define-releative-gcc-installation-dir.patch index c4fbaee956..346a4fcbb0 100644 --- a/meta/recipes-devtools/clang/clang/0010-clang-Define-releative-gcc-installation-dir.patch +++ b/meta/recipes-devtools/clang/clang/0010-clang-Define-releative-gcc-installation-dir.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From e79d44241dfd0f4b4ec25547e6a65e61d2a0b4b2 Mon Sep 17 00:00:00 2001 | 1 | From dc2de98d70a763f30347df2d76df1c70cc464b87 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sat, 20 Mar 2021 16:09:16 -0700 | 3 | Date: Sat, 20 Mar 2021 16:09:16 -0700 |
4 | Subject: [PATCH] clang: Define / releative gcc installation dir | 4 | Subject: [PATCH] clang: Define / releative gcc installation dir |
diff --git a/meta/recipes-devtools/clang/clang/0011-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch b/meta/recipes-devtools/clang/clang/0011-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch index e50e3bf026..25dade4389 100644 --- a/meta/recipes-devtools/clang/clang/0011-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch +++ b/meta/recipes-devtools/clang/clang/0011-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 42dc7f1fd3e7bc549f87b9c28fb3024a3970e96d Mon Sep 17 00:00:00 2001 | 1 | From 0712b0f0fa8c9cf27016e8b1ef8391f6c9cfa4ff Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 31 Jul 2019 22:51:39 -0700 | 3 | Date: Wed, 31 Jul 2019 22:51:39 -0700 |
4 | Subject: [PATCH] clang: Add -lpthread and -ldl along with -lunwind for static | 4 | Subject: [PATCH] clang: Add -lpthread and -ldl along with -lunwind for static |
diff --git a/meta/recipes-devtools/clang/clang/0012-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch b/meta/recipes-devtools/clang/clang/0012-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch index 0f386cd1a6..b55740e0d6 100644 --- a/meta/recipes-devtools/clang/clang/0012-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch +++ b/meta/recipes-devtools/clang/clang/0012-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 0e60706bcddbb9a97ab28df6fba39bf6bd49ab27 Mon Sep 17 00:00:00 2001 | 1 | From a6055a858f6e54cac2b427101fb43c83599b9072 Mon Sep 17 00:00:00 2001 |
2 | From: Anuj Mittal <anuj.mittal@intel.com> | 2 | From: Anuj Mittal <anuj.mittal@intel.com> |
3 | Date: Thu, 26 Dec 2019 12:56:16 -0800 | 3 | Date: Thu, 26 Dec 2019 12:56:16 -0800 |
4 | Subject: [PATCH] Pass PYTHON_EXECUTABLE when cross compiling for native build | 4 | Subject: [PATCH] Pass PYTHON_EXECUTABLE when cross compiling for native build |
diff --git a/meta/recipes-devtools/clang/clang/0013-Check-for-atomic-double-intrinsics.patch b/meta/recipes-devtools/clang/clang/0013-Check-for-atomic-double-intrinsics.patch index 3a6713a2de..99952fe182 100644 --- a/meta/recipes-devtools/clang/clang/0013-Check-for-atomic-double-intrinsics.patch +++ b/meta/recipes-devtools/clang/clang/0013-Check-for-atomic-double-intrinsics.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From f7ef28286dd0adfd384ef55c9039022b4f92f99c Mon Sep 17 00:00:00 2001 | 1 | From c9e8942cace57d9d222e8f005408631e1cd06c5c Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Mon, 18 Nov 2019 17:00:29 -0800 | 3 | Date: Mon, 18 Nov 2019 17:00:29 -0800 |
4 | Subject: [PATCH] Check for atomic<double> intrinsics | 4 | Subject: [PATCH] Check for atomic<double> intrinsics |
diff --git a/meta/recipes-devtools/clang/clang/0014-cmake-Fix-configure-for-packages-using-find_package.patch b/meta/recipes-devtools/clang/clang/0014-cmake-Fix-configure-for-packages-using-find_package.patch index 033f9e6d7c..f6df85538d 100644 --- a/meta/recipes-devtools/clang/clang/0014-cmake-Fix-configure-for-packages-using-find_package.patch +++ b/meta/recipes-devtools/clang/clang/0014-cmake-Fix-configure-for-packages-using-find_package.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From aae87f7ce9d07ba1c401de8f2981b046321fba3b Mon Sep 17 00:00:00 2001 | 1 | From a6bf17d7eb64bd7beabc73b5fe319b7a375bbcce Mon Sep 17 00:00:00 2001 |
2 | From: Ovidiu Panait <ovidiu.panait@windriver.com> | 2 | From: Ovidiu Panait <ovidiu.panait@windriver.com> |
3 | Date: Fri, 31 Jan 2020 10:56:11 +0200 | 3 | Date: Fri, 31 Jan 2020 10:56:11 +0200 |
4 | Subject: [PATCH] cmake: Fix configure for packages using find_package() | 4 | Subject: [PATCH] cmake: Fix configure for packages using find_package() |
diff --git a/meta/recipes-devtools/clang/clang/0015-clang-Fix-resource-dir-location-for-cross-toolchains.patch b/meta/recipes-devtools/clang/clang/0015-clang-Fix-resource-dir-location-for-cross-toolchains.patch index 479cc01004..4841d6c1bc 100644 --- a/meta/recipes-devtools/clang/clang/0015-clang-Fix-resource-dir-location-for-cross-toolchains.patch +++ b/meta/recipes-devtools/clang/clang/0015-clang-Fix-resource-dir-location-for-cross-toolchains.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From e374b21872c382d0450a5813184c72fdaabcac11 Mon Sep 17 00:00:00 2001 | 1 | From f3c6f924525179ca190fecce2889997250ca8705 Mon Sep 17 00:00:00 2001 |
2 | From: Jim Broadus <jbroadus@xevo.com> | 2 | From: Jim Broadus <jbroadus@xevo.com> |
3 | Date: Thu, 26 Mar 2020 16:05:53 -0700 | 3 | Date: Thu, 26 Mar 2020 16:05:53 -0700 |
4 | Subject: [PATCH] clang: Fix resource dir location for cross toolchains | 4 | Subject: [PATCH] clang: Fix resource dir location for cross toolchains |
diff --git a/meta/recipes-devtools/clang/clang/0016-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch b/meta/recipes-devtools/clang/clang/0016-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch index 3803603355..6bbbb5a259 100644 --- a/meta/recipes-devtools/clang/clang/0016-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch +++ b/meta/recipes-devtools/clang/clang/0016-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 3acdfa74ce633bfebf1c3982d86b4931b8b606c8 Mon Sep 17 00:00:00 2001 | 1 | From 7c70f891fb94f2d8c88bc6af4514d8dcd6488658 Mon Sep 17 00:00:00 2001 |
2 | From: Oleksandr Ocheretnyi <oocheret@cisco.com> | 2 | From: Oleksandr Ocheretnyi <oocheret@cisco.com> |
3 | Date: Wed, 15 Apr 2020 00:08:39 +0300 | 3 | Date: Wed, 15 Apr 2020 00:08:39 +0300 |
4 | Subject: [PATCH] clang: driver: Add dyld-prefix when checking sysroot for ldso | 4 | Subject: [PATCH] clang: driver: Add dyld-prefix when checking sysroot for ldso |
diff --git a/meta/recipes-devtools/clang/clang/0017-clang-Use-python3-in-python-scripts.patch b/meta/recipes-devtools/clang/clang/0017-clang-Use-python3-in-python-scripts.patch index 329cd8b023..8677c5ca13 100644 --- a/meta/recipes-devtools/clang/clang/0017-clang-Use-python3-in-python-scripts.patch +++ b/meta/recipes-devtools/clang/clang/0017-clang-Use-python3-in-python-scripts.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 02ce42db3325d5fab553627dfc73750270c0b665 Mon Sep 17 00:00:00 2001 | 1 | From f06bb3e20e47ab5a76efa76f50f0bbef682cd263 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 14 Oct 2020 22:19:57 -0700 | 3 | Date: Wed, 14 Oct 2020 22:19:57 -0700 |
4 | Subject: [PATCH] clang: Use python3 in python scripts | 4 | Subject: [PATCH] clang: Use python3 in python scripts |
diff --git a/meta/recipes-devtools/clang/clang/0018-llvm-clang-Insert-anchor-for-adding-OE-distro-vendor.patch b/meta/recipes-devtools/clang/clang/0018-llvm-clang-Insert-anchor-for-adding-OE-distro-vendor.patch index bf46b22f36..7ae88b870d 100644 --- a/meta/recipes-devtools/clang/clang/0018-llvm-clang-Insert-anchor-for-adding-OE-distro-vendor.patch +++ b/meta/recipes-devtools/clang/clang/0018-llvm-clang-Insert-anchor-for-adding-OE-distro-vendor.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From aec307904022e138d1004ceb44b9600deaa7fbdb Mon Sep 17 00:00:00 2001 | 1 | From cfe5ec616f1bbbe7d20409b552428e43e282f115 Mon Sep 17 00:00:00 2001 |
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
3 | Date: Mon, 25 Jan 2021 16:14:35 +0800 | 3 | Date: Mon, 25 Jan 2021 16:14:35 +0800 |
4 | Subject: [PATCH] llvm/clang: Insert anchor for adding OE distro vendor names | 4 | Subject: [PATCH] llvm/clang: Insert anchor for adding OE distro vendor names |
@@ -97,10 +97,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
97 | 5 files changed, 6 insertions(+), 1 deletion(-) | 97 | 5 files changed, 6 insertions(+), 1 deletion(-) |
98 | 98 | ||
99 | diff --git a/clang/include/clang/Driver/Distro.h b/clang/include/clang/Driver/Distro.h | 99 | diff --git a/clang/include/clang/Driver/Distro.h b/clang/include/clang/Driver/Distro.h |
100 | index b4d485dac8a2..ac0bf25b7c63 100644 | 100 | index c544a8c00219..3cd687ede458 100644 |
101 | --- a/clang/include/clang/Driver/Distro.h | 101 | --- a/clang/include/clang/Driver/Distro.h |
102 | +++ b/clang/include/clang/Driver/Distro.h | 102 | +++ b/clang/include/clang/Driver/Distro.h |
103 | @@ -45,6 +45,7 @@ public: | 103 | @@ -47,6 +47,7 @@ public: |
104 | RHEL7, | 104 | RHEL7, |
105 | Fedora, | 105 | Fedora, |
106 | Gentoo, | 106 | Gentoo, |
@@ -108,7 +108,7 @@ index b4d485dac8a2..ac0bf25b7c63 100644 | |||
108 | OpenSUSE, | 108 | OpenSUSE, |
109 | UbuntuHardy, | 109 | UbuntuHardy, |
110 | UbuntuIntrepid, | 110 | UbuntuIntrepid, |
111 | @@ -139,6 +140,7 @@ public: | 111 | @@ -141,6 +142,7 @@ public: |
112 | 112 | ||
113 | bool IsGentoo() const { return DistroVal == Gentoo; } | 113 | bool IsGentoo() const { return DistroVal == Gentoo; } |
114 | 114 | ||
@@ -117,7 +117,7 @@ index b4d485dac8a2..ac0bf25b7c63 100644 | |||
117 | }; | 117 | }; |
118 | 118 | ||
119 | diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp | 119 | diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp |
120 | index 3cc79535de8d..595656179bdc 100644 | 120 | index 71ba71fa1837..f64d0abddf6d 100644 |
121 | --- a/clang/lib/Driver/Distro.cpp | 121 | --- a/clang/lib/Driver/Distro.cpp |
122 | +++ b/clang/lib/Driver/Distro.cpp | 122 | +++ b/clang/lib/Driver/Distro.cpp |
123 | @@ -43,6 +43,7 @@ static Distro::DistroType DetectOsRelease(llvm::vfs::FileSystem &VFS) { | 123 | @@ -43,6 +43,7 @@ static Distro::DistroType DetectOsRelease(llvm::vfs::FileSystem &VFS) { |
diff --git a/meta/recipes-devtools/clang/clang/0019-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch b/meta/recipes-devtools/clang/clang/0019-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch index 9518716c00..05937b06c1 100644 --- a/meta/recipes-devtools/clang/clang/0019-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch +++ b/meta/recipes-devtools/clang/clang/0019-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From d0f40e9309a3f5734fa76c00994c5ebb70570c6c Mon Sep 17 00:00:00 2001 | 1 | From 4a23e833e66896f40bb36c3c13b4a4bb1b79162f Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 19 May 2021 17:32:13 -0700 | 3 | Date: Wed, 19 May 2021 17:32:13 -0700 |
4 | Subject: [PATCH] compiler-rt: Do not use backtrace APIs on non-glibc linux | 4 | Subject: [PATCH] compiler-rt: Do not use backtrace APIs on non-glibc linux |
diff --git a/meta/recipes-devtools/clang/clang/0020-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/meta/recipes-devtools/clang/clang/0020-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch index fd2b434fe2..7ce60e0efd 100644 --- a/meta/recipes-devtools/clang/clang/0020-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch +++ b/meta/recipes-devtools/clang/clang/0020-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 1ef38e252a55d2cdb00c3b29154387fce02e9911 Mon Sep 17 00:00:00 2001 | 1 | From 739e65a126178e4c4d8452297ac13c119ae79403 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 19 May 2021 17:56:03 -0700 | 3 | Date: Wed, 19 May 2021 17:56:03 -0700 |
4 | Subject: [PATCH] clang: Fix x86 triple for non-debian multiarch linux distros | 4 | Subject: [PATCH] clang: Fix x86 triple for non-debian multiarch linux distros |
diff --git a/meta/recipes-devtools/clang/clang/0021-libunwind-Added-unw_backtrace-method.patch b/meta/recipes-devtools/clang/clang/0021-libunwind-Added-unw_backtrace-method.patch index 2f0479bdd4..fe7157df47 100644 --- a/meta/recipes-devtools/clang/clang/0021-libunwind-Added-unw_backtrace-method.patch +++ b/meta/recipes-devtools/clang/clang/0021-libunwind-Added-unw_backtrace-method.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 5782e495684d6c056175ea16be83cfe788742d0a Mon Sep 17 00:00:00 2001 | 1 | From f60c6ade92826cea1c3d63d70f1168f4048a624b Mon Sep 17 00:00:00 2001 |
2 | From: Maksim Kita <maksim-kita@yandex-team.ru> | 2 | From: Maksim Kita <maksim-kita@yandex-team.ru> |
3 | Date: Sun, 23 May 2021 10:27:29 +0000 | 3 | Date: Sun, 23 May 2021 10:27:29 +0000 |
4 | Subject: [PATCH] libunwind: Added unw_backtrace method | 4 | Subject: [PATCH] libunwind: Added unw_backtrace method |
diff --git a/meta/recipes-devtools/clang/clang/0022-lldb-Link-with-libatomic-on-x86.patch b/meta/recipes-devtools/clang/clang/0022-lldb-Link-with-libatomic-on-x86.patch index 4996bc1c87..128666b8fb 100644 --- a/meta/recipes-devtools/clang/clang/0022-lldb-Link-with-libatomic-on-x86.patch +++ b/meta/recipes-devtools/clang/clang/0022-lldb-Link-with-libatomic-on-x86.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From f4f9b07a41449a0acbe5ea1717bb0e2ceabbfaab Mon Sep 17 00:00:00 2001 | 1 | From 45d44576a0dbaf843a9795519cafa944801c4679 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Tue, 8 Feb 2022 01:31:26 -0800 | 3 | Date: Tue, 8 Feb 2022 01:31:26 -0800 |
4 | Subject: [PATCH] lldb: Link with libatomic on x86 | 4 | Subject: [PATCH] lldb: Link with libatomic on x86 |
diff --git a/meta/recipes-devtools/clang/clang/0023-compiler-rt-Enable-__int128-for-ppc32.patch b/meta/recipes-devtools/clang/clang/0023-compiler-rt-Enable-__int128-for-ppc32.patch index eeaca43ae0..861064f4f4 100644 --- a/meta/recipes-devtools/clang/clang/0023-compiler-rt-Enable-__int128-for-ppc32.patch +++ b/meta/recipes-devtools/clang/clang/0023-compiler-rt-Enable-__int128-for-ppc32.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From a63acbeb8db17aa113dc2b2058540c61c2a16ac6 Mon Sep 17 00:00:00 2001 | 1 | From b676d7d93fa35e095595fc1f967e4c6a3b58414b Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 9 Mar 2022 16:28:16 -0800 | 3 | Date: Wed, 9 Mar 2022 16:28:16 -0800 |
4 | Subject: [PATCH] compiler-rt: Enable __int128 for ppc32 | 4 | Subject: [PATCH] compiler-rt: Enable __int128 for ppc32 |
diff --git a/meta/recipes-devtools/clang/clang/0024-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch b/meta/recipes-devtools/clang/clang/0024-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch index 831e3e7d3a..d49af8aeb9 100644 --- a/meta/recipes-devtools/clang/clang/0024-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch +++ b/meta/recipes-devtools/clang/clang/0024-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From abe955ac96370a16258fba1348edb938f3649096 Mon Sep 17 00:00:00 2001 | 1 | From 9cf5cc6d4378ad7918f338aa65ce79178d8a84f2 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 12 Aug 2022 11:50:57 -0700 | 3 | Date: Fri, 12 Aug 2022 11:50:57 -0700 |
4 | Subject: [PATCH] llvm: Do not use cmake infra to detect libzstd | 4 | Subject: [PATCH] llvm: Do not use cmake infra to detect libzstd |
diff --git a/meta/recipes-devtools/clang/clang/0025-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch b/meta/recipes-devtools/clang/clang/0025-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch index 4b8a915837..bca28cd7db 100644 --- a/meta/recipes-devtools/clang/clang/0025-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch +++ b/meta/recipes-devtools/clang/clang/0025-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 7cafe5615d91a429048c8baa824769cdf34aafd1 Mon Sep 17 00:00:00 2001 | 1 | From 744dbb6cf6925796e2bc5c028af08c40445bbb1c Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Tue, 3 Jan 2023 18:44:34 -0800 | 3 | Date: Tue, 3 Jan 2023 18:44:34 -0800 |
4 | Subject: [PATCH] compiler-rt: Fix stat struct's size for O32 ABI | 4 | Subject: [PATCH] compiler-rt: Fix stat struct's size for O32 ABI |
diff --git a/meta/recipes-devtools/clang/clang/0026-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch b/meta/recipes-devtools/clang/clang/0026-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch index 0e67129705..e129aa245d 100644 --- a/meta/recipes-devtools/clang/clang/0026-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch +++ b/meta/recipes-devtools/clang/clang/0026-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 92bf97247bb0df984410a6c1ee6b0d2577e82013 Mon Sep 17 00:00:00 2001 | 1 | From 6b6a518bc7686af7680f45fcdea7c414a22a2f53 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Tue, 21 Feb 2023 12:46:10 -0800 | 3 | Date: Tue, 21 Feb 2023 12:46:10 -0800 |
4 | Subject: [PATCH] compiler-rt: Undef _TIME_BITS along with _FILE_OFFSET_BITS in | 4 | Subject: [PATCH] compiler-rt: Undef _TIME_BITS along with _FILE_OFFSET_BITS in |
diff --git a/meta/recipes-devtools/clang/clang/0027-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch b/meta/recipes-devtools/clang/clang/0027-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch index 8362acf8d4..b6852a124d 100644 --- a/meta/recipes-devtools/clang/clang/0027-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch +++ b/meta/recipes-devtools/clang/clang/0027-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 86a5a81c556e27cd097493a040580362d0217721 Mon Sep 17 00:00:00 2001 | 1 | From a83b407a9c1b04d95e6cda74059744fe815fde17 Mon Sep 17 00:00:00 2001 |
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | 2 | From: Martin Jansa <Martin.Jansa@gmail.com> |
3 | Date: Thu, 31 Aug 2023 18:14:47 +0200 | 3 | Date: Thu, 31 Aug 2023 18:14:47 +0200 |
4 | Subject: [PATCH] ToolChains/Gnu.cpp: ARMLibDirs search also in lib32 | 4 | Subject: [PATCH] ToolChains/Gnu.cpp: ARMLibDirs search also in lib32 |
diff --git a/meta/recipes-devtools/clang/clang/0028-clang-llvm-Add-OE-specific-ABI-triple-for-N32-ABI.patch b/meta/recipes-devtools/clang/clang/0028-clang-llvm-Add-OE-specific-ABI-triple-for-N32-ABI.patch index a919a983c3..0136039358 100644 --- a/meta/recipes-devtools/clang/clang/0028-clang-llvm-Add-OE-specific-ABI-triple-for-N32-ABI.patch +++ b/meta/recipes-devtools/clang/clang/0028-clang-llvm-Add-OE-specific-ABI-triple-for-N32-ABI.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 721b7868a57fe3943557c405dd88365526d3728f Mon Sep 17 00:00:00 2001 | 1 | From 3572a4425844ef77131fd2635ea570eafc1df958 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sat, 3 Feb 2024 16:47:10 -0800 | 3 | Date: Sat, 3 Feb 2024 16:47:10 -0800 |
4 | Subject: [PATCH] clang/llvm: Add OE specific ABI triple for N32 ABI | 4 | Subject: [PATCH] clang/llvm: Add OE specific ABI triple for N32 ABI |
diff --git a/meta/recipes-devtools/clang/clang/0029-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch b/meta/recipes-devtools/clang/clang/0029-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch index 8eda4fb205..a42ac2484d 100644 --- a/meta/recipes-devtools/clang/clang/0029-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch +++ b/meta/recipes-devtools/clang/clang/0029-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From cc2fb22ae8e64f65fd726b476c3bf85b4d31906d Mon Sep 17 00:00:00 2001 | 1 | From e5223f6013c7c70a7f6e35ecec046cfdc0c15c2a Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Tue, 14 May 2024 22:04:43 -0700 | 3 | Date: Tue, 14 May 2024 22:04:43 -0700 |
4 | Subject: [PATCH] llvm: Add libunwind.pc.in and llvm-config scripts | 4 | Subject: [PATCH] llvm: Add libunwind.pc.in and llvm-config scripts |
diff --git a/meta/recipes-devtools/clang/clang/0030-scan-build-py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch b/meta/recipes-devtools/clang/clang/0030-scan-build-py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch index 01d054512f..85d3ce9ed3 100644 --- a/meta/recipes-devtools/clang/clang/0030-scan-build-py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch +++ b/meta/recipes-devtools/clang/clang/0030-scan-build-py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From e468c9f5b5cf85583c0435ad934affd5b900caec Mon Sep 17 00:00:00 2001 | 1 | From 3f03bd4a5a16f2b5525f4dc32c7b196840b96856 Mon Sep 17 00:00:00 2001 |
2 | From: Martin Jansa <martin.jansa@gmail.com> | 2 | From: Martin Jansa <martin.jansa@gmail.com> |
3 | Date: Fri, 13 Sep 2024 13:38:08 +0200 | 3 | Date: Fri, 13 Sep 2024 13:38:08 +0200 |
4 | Subject: [PATCH] scan-build-py: respect LLVM_LIBDIR_SUFFIX like other tools do | 4 | Subject: [PATCH] scan-build-py: respect LLVM_LIBDIR_SUFFIX like other tools do |
diff --git a/meta/recipes-devtools/clang/clang/0031-compiler-rt-Do-not-pass-target-to-clang-compiler.patch b/meta/recipes-devtools/clang/clang/0031-compiler-rt-Do-not-pass-target-to-clang-compiler.patch index 01fcc0689d..621c3653f0 100644 --- a/meta/recipes-devtools/clang/clang/0031-compiler-rt-Do-not-pass-target-to-clang-compiler.patch +++ b/meta/recipes-devtools/clang/clang/0031-compiler-rt-Do-not-pass-target-to-clang-compiler.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From cbb5bca513714f539c899a123bf5dc17651c9737 Mon Sep 17 00:00:00 2001 | 1 | From 518c0025921b0bd21e69bf4c38f369778032f4e0 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Thu, 13 Mar 2025 00:30:38 -0700 | 3 | Date: Thu, 13 Mar 2025 00:30:38 -0700 |
4 | Subject: [PATCH] compiler-rt: Do not pass --target to clang compiler | 4 | Subject: [PATCH] compiler-rt: Do not pass --target to clang compiler |
diff --git a/meta/recipes-devtools/clang/clang/0032-Fix-build-on-ppc64-musl.patch b/meta/recipes-devtools/clang/clang/0032-Fix-build-on-ppc64-musl.patch deleted file mode 100644 index e1fcb3a203..0000000000 --- a/meta/recipes-devtools/clang/clang/0032-Fix-build-on-ppc64-musl.patch +++ /dev/null | |||
@@ -1,97 +0,0 @@ | |||
1 | From bb99b65d884185a2eb1d4601e5135da582cbd8a9 Mon Sep 17 00:00:00 2001 | ||
2 | From: mojyack <mojyack@gmail.com> | ||
3 | Date: Mon, 16 Dec 2024 13:42:04 +0900 | ||
4 | Subject: [PATCH] Fix build on ppc64+musl | ||
5 | |||
6 | In powerpc64-unknown-linux-musl, signal.h does not include asm/ptrace.h, | ||
7 | which causes "member access into incomplete type 'struct pt_regs'" errors. | ||
8 | Include the header explicitly to fix this. | ||
9 | |||
10 | Also in sanitizer_linux_libcdep.cpp, there is a usage of | ||
11 | TlsPreTcbSize which is not defined in such a platform. | ||
12 | Guard the branch with macro. | ||
13 | |||
14 | Upstream-Status: Backport [https://github.com/llvm/llvm-project/pull/120036] | ||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | --- | ||
17 | .../lib/sanitizer_common/sanitizer_linux.cpp | 4 ++++ | ||
18 | .../sanitizer_common/sanitizer_linux_libcdep.cpp | 13 +++++++------ | ||
19 | .../sanitizer_platform_limits_posix.cpp | 2 +- | ||
20 | .../sanitizer_stoptheworld_linux_libcdep.cpp | 3 ++- | ||
21 | 4 files changed, 14 insertions(+), 8 deletions(-) | ||
22 | |||
23 | diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp | ||
24 | index 7aa48d29d2d5..a4d526b4466c 100644 | ||
25 | --- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp | ||
26 | +++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp | ||
27 | @@ -86,6 +86,10 @@ | ||
28 | # include <sys/sysmacros.h> | ||
29 | # endif | ||
30 | |||
31 | +# if SANITIZER_LINUX && defined(__powerpc64__) | ||
32 | +# include <asm/ptrace.h> | ||
33 | +# endif | ||
34 | + | ||
35 | # if SANITIZER_FREEBSD | ||
36 | # include <machine/atomic.h> | ||
37 | # include <sys/exec.h> | ||
38 | diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp | ||
39 | index e11eff13cd32..331e1c7d8d15 100644 | ||
40 | --- a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp | ||
41 | +++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp | ||
42 | @@ -619,21 +619,22 @@ static void GetTls(uptr *addr, uptr *size) { | ||
43 | *addr = tp - RoundUpTo(*size, align); | ||
44 | *size = tp - *addr + ThreadDescriptorSize(); | ||
45 | # else | ||
46 | - if (SANITIZER_GLIBC) | ||
47 | - *size += 1664; | ||
48 | - else if (SANITIZER_FREEBSD) | ||
49 | - *size += 128; // RTLD_STATIC_TLS_EXTRA | ||
50 | -# if defined(__mips__) || defined(__powerpc64__) || SANITIZER_RISCV64 | ||
51 | +# if SANITIZER_GLIBC | ||
52 | + *size += 1664; | ||
53 | +# elif SANITIZER_FREEBSD | ||
54 | + *size += 128; // RTLD_STATIC_TLS_EXTRA | ||
55 | +# if defined(__mips__) || defined(__powerpc64__) || SANITIZER_RISCV64 | ||
56 | const uptr pre_tcb_size = TlsPreTcbSize(); | ||
57 | *addr -= pre_tcb_size; | ||
58 | *size += pre_tcb_size; | ||
59 | -# else | ||
60 | +# else | ||
61 | // arm and aarch64 reserve two words at TP, so this underestimates the range. | ||
62 | // However, this is sufficient for the purpose of finding the pointers to | ||
63 | // thread-specific data keys. | ||
64 | const uptr tcb_size = ThreadDescriptorSize(); | ||
65 | *addr -= tcb_size; | ||
66 | *size += tcb_size; | ||
67 | +# endif | ||
68 | # endif | ||
69 | # endif | ||
70 | # elif SANITIZER_NETBSD | ||
71 | diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp | ||
72 | index a5311d266b0c..ec5f2edab6a6 100644 | ||
73 | --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp | ||
74 | +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp | ||
75 | @@ -96,7 +96,7 @@ | ||
76 | # include <sys/ptrace.h> | ||
77 | # if defined(__mips64) || defined(__aarch64__) || defined(__arm__) || \ | ||
78 | defined(__hexagon__) || defined(__loongarch__) || SANITIZER_RISCV64 || \ | ||
79 | - defined(__sparc__) | ||
80 | + defined(__sparc__) || defined(__powerpc64__) | ||
81 | # include <asm/ptrace.h> | ||
82 | # ifdef __arm__ | ||
83 | typedef struct user_fpregs elf_fpregset_t; | ||
84 | diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp | ||
85 | index 945da99d41f4..58d17d90c343 100644 | ||
86 | --- a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp | ||
87 | +++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp | ||
88 | @@ -31,7 +31,8 @@ | ||
89 | #include <sys/types.h> // for pid_t | ||
90 | #include <sys/uio.h> // for iovec | ||
91 | #include <elf.h> // for NT_PRSTATUS | ||
92 | -#if (defined(__aarch64__) || SANITIZER_RISCV64 || SANITIZER_LOONGARCH64) && \ | ||
93 | +#if (defined(__aarch64__) || defined(__powerpc64__) || \ | ||
94 | + SANITIZER_RISCV64 || SANITIZER_LOONGARCH64) && \ | ||
95 | !SANITIZER_ANDROID | ||
96 | // GLIBC 2.20+ sys/user does not include asm/ptrace.h | ||
97 | # include <asm/ptrace.h> | ||
diff --git a/meta/recipes-devtools/clang/clang/0033-clangd-Add-a-build-option-to-disable-building-dexp.patch b/meta/recipes-devtools/clang/clang/0032-clangd-Add-a-build-option-to-disable-building-dexp.patch index 198989cd42..3e0603477e 100644 --- a/meta/recipes-devtools/clang/clang/0033-clangd-Add-a-build-option-to-disable-building-dexp.patch +++ b/meta/recipes-devtools/clang/clang/0032-clangd-Add-a-build-option-to-disable-building-dexp.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 49fbbb928d5cafba3d367e3750d402b53425943a Mon Sep 17 00:00:00 2001 | 1 | From 12abcd058e2aa468054708b0ca7a06f2638eabab Mon Sep 17 00:00:00 2001 |
2 | From: Yoann Congal <yoann.congal@smile.fr> | 2 | From: Yoann Congal <yoann.congal@smile.fr> |
3 | Date: Tue, 25 Mar 2025 22:25:55 +0100 | 3 | Date: Tue, 25 Mar 2025 22:25:55 +0100 |
4 | Subject: [PATCH] clangd: Add a build option to disable building dexp | 4 | Subject: [PATCH] clangd: Add a build option to disable building dexp |
diff --git a/meta/recipes-devtools/clang/clang/0034-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch b/meta/recipes-devtools/clang/clang/0033-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch index 7545ba365b..1901efeae4 100644 --- a/meta/recipes-devtools/clang/clang/0034-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch +++ b/meta/recipes-devtools/clang/clang/0033-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 59921cb127dcfb2c655b357e8deb95004f3da41f Mon Sep 17 00:00:00 2001 | 1 | From 9e389e1dc73a2f5601cfbab34249aedffd053235 Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Fri, 27 Nov 2020 10:11:08 +0000 | 3 | Date: Fri, 27 Nov 2020 10:11:08 +0000 |
4 | Subject: [PATCH] AsmMatcherEmitter: sort ClassInfo lists by name as well | 4 | Subject: [PATCH] AsmMatcherEmitter: sort ClassInfo lists by name as well |
diff --git a/meta/recipes-devtools/clang/clang/0035-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch b/meta/recipes-devtools/clang/clang/0034-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch index 81820eeaca..2618f5ac40 100644 --- a/meta/recipes-devtools/clang/clang/0035-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch +++ b/meta/recipes-devtools/clang/clang/0034-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From e414f6489e055c981970b7210b941c2a41cc322b Mon Sep 17 00:00:00 2001 | 1 | From 81db296472e146995c3c5728981cdc0cc065ab9c Mon Sep 17 00:00:00 2001 |
2 | From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> | 2 | From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> |
3 | Date: Wed, 2 Apr 2025 17:05:17 +0300 | 3 | Date: Wed, 2 Apr 2025 17:05:17 +0300 |
4 | Subject: [PATCH] llvm-config: remove LLVM_LDFLAGS from --ldflags output | 4 | Subject: [PATCH] llvm-config: remove LLVM_LDFLAGS from --ldflags output |
diff --git a/meta/recipes-devtools/clang/clang/0036-openmp-Do-not-emit-date-and-time-into-generate-files.patch b/meta/recipes-devtools/clang/clang/0035-openmp-Do-not-emit-date-and-time-into-generate-files.patch index 91c718e2a4..f33d8851ea 100644 --- a/meta/recipes-devtools/clang/clang/0036-openmp-Do-not-emit-date-and-time-into-generate-files.patch +++ b/meta/recipes-devtools/clang/clang/0035-openmp-Do-not-emit-date-and-time-into-generate-files.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From f79ebc5bc696e8747c79a2277ffcf8d91bdadfd5 Mon Sep 17 00:00:00 2001 | 1 | From c439de272b3f983c6d97b8f6fec0135323e3363c Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 23 Apr 2025 11:52:48 -0700 | 3 | Date: Wed, 23 Apr 2025 11:52:48 -0700 |
4 | Subject: [PATCH] openmp: Do not emit date and time into generate files | 4 | Subject: [PATCH] openmp: Do not emit date and time into generate files |
diff --git a/meta/recipes-devtools/clang/clang/0036-libunwind-Use-gcs-instead-of-gcs-target-attribute.patch b/meta/recipes-devtools/clang/clang/0036-libunwind-Use-gcs-instead-of-gcs-target-attribute.patch new file mode 100644 index 0000000000..fe2bd77b33 --- /dev/null +++ b/meta/recipes-devtools/clang/clang/0036-libunwind-Use-gcs-instead-of-gcs-target-attribute.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From 8c839483915183a9c1ca4f74646ca4f478900e77 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 30 Apr 2025 19:51:19 -0700 | ||
4 | Subject: [PATCH] libunwind: Use +gcs instead of gcs target attribute | ||
5 | |||
6 | __attribute__((target("gcs"))) does not work with gcc | ||
7 | |||
8 | GCC-15 has added gcs intrinsics [1] but the syntax for enabling it is | ||
9 | slightly different. This syntax works with clang too. | ||
10 | |||
11 | With gcc15 compiler libunwind's check for this macros is succeeding and it | ||
12 | ends up enabling 'gcs' by using function attribute, this works with clang | ||
13 | but not with gcc but '+gcs' works with both | ||
14 | |||
15 | We can see this in rust compiler bootstrap for aarch64/musl when system | ||
16 | uses gcc15, it ends up with these errors | ||
17 | |||
18 | Building libunwind.a for aarch64-poky-linux-musl | ||
19 | cargo:warning=/mnt/b/yoe/master/sources/poky/build/tmp/work/cortexa57-poky-linux-musl/rust/1.85.1/rustc-1.85.1-src/src/llvm-project/libunwind/src/UnwindLevel1.c:191:1: error: arch extension 'gcs' should be prefixed by '+' | ||
20 | cargo:warning= 191 | unwind_phase2(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *exception_object) { | ||
21 | cargo:warning= | ^~~~~~~~~~~~~ | ||
22 | cargo:warning=/mnt/b/yoe/master/sources/poky/build/tmp/work/cortexa57-poky-linux-musl/rust/1.85.1/rustc-1.85.1-src/src/llvm-project/libunwind/src/UnwindLevel1.c:337:22: error: arch extension 'gcs' should be prefixed by '+' | ||
23 | cargo:warning= 337 | _Unwind_Stop_Fn stop, void *stop_parameter) { | ||
24 | cargo:warning= | ^~~~~~~~~~~~~~~ | ||
25 | |||
26 | [1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5a6af707f0af | ||
27 | |||
28 | Upstream-Status: Submitted [https://github.com/llvm/llvm-project/pull/138077] | ||
29 | |||
30 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
31 | --- | ||
32 | libunwind/src/UnwindLevel1.c | 4 ++-- | ||
33 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
34 | |||
35 | diff --git a/libunwind/src/UnwindLevel1.c b/libunwind/src/UnwindLevel1.c | ||
36 | index 7e785f4d31e7..ed2c8239824c 100644 | ||
37 | --- a/libunwind/src/UnwindLevel1.c | ||
38 | +++ b/libunwind/src/UnwindLevel1.c | ||
39 | @@ -185,7 +185,7 @@ extern int __unw_step_stage2(unw_cursor_t *); | ||
40 | |||
41 | #if defined(_LIBUNWIND_USE_GCS) | ||
42 | // Enable the GCS target feature to permit gcspop instructions to be used. | ||
43 | -__attribute__((target("gcs"))) | ||
44 | +__attribute__((target("+gcs"))) | ||
45 | #endif | ||
46 | static _Unwind_Reason_Code | ||
47 | unwind_phase2(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *exception_object) { | ||
48 | @@ -329,7 +329,7 @@ unwind_phase2(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *except | ||
49 | |||
50 | #if defined(_LIBUNWIND_USE_GCS) | ||
51 | // Enable the GCS target feature to permit gcspop instructions to be used. | ||
52 | -__attribute__((target("gcs"))) | ||
53 | +__attribute__((target("+gcs"))) | ||
54 | #endif | ||
55 | static _Unwind_Reason_Code | ||
56 | unwind_phase2_forced(unw_context_t *uc, unw_cursor_t *cursor, | ||
diff --git a/meta/recipes-devtools/clang/clang/0038-compiler-rt-Exclude-sync_fetch_and_-for-any-pre-ARMv.patch b/meta/recipes-devtools/clang/clang/0037-compiler-rt-Exclude-sync_fetch_and_-for-any-pre-ARMv.patch index 4639a73fe6..a7e5c5a859 100644 --- a/meta/recipes-devtools/clang/clang/0038-compiler-rt-Exclude-sync_fetch_and_-for-any-pre-ARMv.patch +++ b/meta/recipes-devtools/clang/clang/0037-compiler-rt-Exclude-sync_fetch_and_-for-any-pre-ARMv.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 5a0daa2dcc2bb39d87c4fcae7036cd8ab7ee6f6d Mon Sep 17 00:00:00 2001 | 1 | From d2360096db2da00121f4e653b39ca1f7eb2801eb Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sat, 10 May 2025 14:03:12 -0700 | 3 | Date: Sat, 10 May 2025 14:03:12 -0700 |
4 | Subject: [PATCH] compiler-rt: Exclude sync_fetch_and_* for any pre-ARMv6 targets | 4 | Subject: [PATCH] compiler-rt: Exclude sync_fetch_and_* for any pre-ARMv6 targets |
@@ -38,6 +38,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
38 | compiler-rt/lib/builtins/CMakeLists.txt | 12 ++++++++++++ | 38 | compiler-rt/lib/builtins/CMakeLists.txt | 12 ++++++++++++ |
39 | 1 file changed, 12 insertions(+) | 39 | 1 file changed, 12 insertions(+) |
40 | 40 | ||
41 | diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt | ||
42 | index cb276311b290..53a3cd1dc81f 100644 | ||
41 | --- a/compiler-rt/lib/builtins/CMakeLists.txt | 43 | --- a/compiler-rt/lib/builtins/CMakeLists.txt |
42 | +++ b/compiler-rt/lib/builtins/CMakeLists.txt | 44 | +++ b/compiler-rt/lib/builtins/CMakeLists.txt |
43 | @@ -864,6 +864,18 @@ else () | 45 | @@ -864,6 +864,18 @@ else () |
diff --git a/meta/recipes-devtools/clang/clang/0038-compiler-rt-Hardcode-uptr-sptr-typedefs-on-Mips-Linu.patch b/meta/recipes-devtools/clang/clang/0038-compiler-rt-Hardcode-uptr-sptr-typedefs-on-Mips-Linu.patch new file mode 100644 index 0000000000..b54c163857 --- /dev/null +++ b/meta/recipes-devtools/clang/clang/0038-compiler-rt-Hardcode-uptr-sptr-typedefs-on-Mips-Linu.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 9f88f2e4efa56e53c78f9b67775c71afa711a69c Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 22 May 2025 21:50:45 -0700 | ||
4 | Subject: [PATCH] [compiler-rt] Hardcode uptr/sptr typedefs on Mips/Linux | ||
5 | |||
6 | Sanitizer build on Mips/Linux faills to build due to assertion errors | ||
7 | mismatched definitions. This is due to inconsistent definitions of | ||
8 | `uptr` of either `unsigned long` or `unsigned int` in compiler-rt. This | ||
9 | is caused by clang defining | ||
10 | |||
11 | __UINTPTR_TYPE__ long unsigned int where as gcc defines it as | ||
12 | unsigned int | ||
13 | |||
14 | As a workaround, this hardcodes `uptr`/`sptr` in compiler-rt to | ||
15 | `unsigned int`/`int` on Linux Mips, matching gcc. | ||
16 | |||
17 | Upstream-Status: Submitted [https://github.com/llvm/llvm-project/pull/141201] | ||
18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
19 | --- | ||
20 | compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h | 2 +- | ||
21 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h | ||
24 | index fff60c96f632..511ee8fe49cc 100644 | ||
25 | --- a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h | ||
26 | +++ b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h | ||
27 | @@ -139,7 +139,7 @@ | ||
28 | namespace __sanitizer { | ||
29 | |||
30 | #if defined(__UINTPTR_TYPE__) | ||
31 | -# if defined(__arm__) && defined(__linux__) | ||
32 | +# if (defined(__arm__) || _ABIO32 == 1) && defined(__linux__) | ||
33 | // Linux Arm headers redefine __UINTPTR_TYPE__ and disagree with clang/gcc. | ||
34 | typedef unsigned int uptr; | ||
35 | typedef int sptr; | ||
diff --git a/meta/recipes-devtools/clang/clang_git.bb b/meta/recipes-devtools/clang/clang_git.bb index b41b700292..f958b72414 100644 --- a/meta/recipes-devtools/clang/clang_git.bb +++ b/meta/recipes-devtools/clang/clang_git.bb | |||
@@ -49,7 +49,7 @@ def get_clang_host_arch(bb, d): | |||
49 | def get_clang_target_arch(bb, d): | 49 | def get_clang_target_arch(bb, d): |
50 | return get_clang_arch(bb, d, 'TARGET_ARCH') | 50 | return get_clang_arch(bb, d, 'TARGET_ARCH') |
51 | 51 | ||
52 | PACKAGECONFIG_CLANG_COMMON = "build-id eh libedit rtti shared-libs \ | 52 | PACKAGECONFIG_CLANG_COMMON = "build-id eh libedit rtti shared-libs libclang-python \ |
53 | ${@bb.utils.contains('TC_CXX_RUNTIME', 'llvm', 'compiler-rt libcplusplus libomp unwindlib', '', d)} \ | 53 | ${@bb.utils.contains('TC_CXX_RUNTIME', 'llvm', 'compiler-rt libcplusplus libomp unwindlib', '', d)} \ |
54 | " | 54 | " |
55 | 55 | ||
@@ -90,6 +90,7 @@ PACKAGECONFIG[split-dwarf] = "-DLLVM_USE_SPLIT_DWARF=ON,-DLLVM_USE_SPLIT_DWARF=O | |||
90 | PACKAGECONFIG[terminfo] = "-DLLVM_ENABLE_TERMINFO=ON -DCOMPILER_RT_TERMINFO_LIB=ON,-DLLVM_ENABLE_TERMINFO=OFF -DCOMPILER_RT_TERMINFO_LIB=OFF,ncurses," | 90 | PACKAGECONFIG[terminfo] = "-DLLVM_ENABLE_TERMINFO=ON -DCOMPILER_RT_TERMINFO_LIB=ON,-DLLVM_ENABLE_TERMINFO=OFF -DCOMPILER_RT_TERMINFO_LIB=OFF,ncurses," |
91 | PACKAGECONFIG[thin-lto] = "-DLLVM_ENABLE_LTO=Thin -DLLVM_BINUTILS_INCDIR=${STAGING_INCDIR},,binutils," | 91 | PACKAGECONFIG[thin-lto] = "-DLLVM_ENABLE_LTO=Thin -DLLVM_BINUTILS_INCDIR=${STAGING_INCDIR},,binutils," |
92 | PACKAGECONFIG[unwindlib] = "-DCLANG_DEFAULT_UNWINDLIB=libunwind,-DCLANG_DEFAULT_UNWINDLIB=libgcc,," | 92 | PACKAGECONFIG[unwindlib] = "-DCLANG_DEFAULT_UNWINDLIB=libunwind,-DCLANG_DEFAULT_UNWINDLIB=libgcc,," |
93 | PACKAGECONFIG[libclang-python] = "-DCLANG_PYTHON_BINDINGS_VERSIONS=${PYTHON_BASEVERSION},," | ||
93 | 94 | ||
94 | OECMAKE_SOURCEPATH = "${S}/llvm" | 95 | OECMAKE_SOURCEPATH = "${S}/llvm" |
95 | 96 | ||
@@ -206,7 +207,7 @@ EXTRA_OECMAKE:append:class-target = "\ | |||
206 | 207 | ||
207 | DEPENDS = "binutils zlib zstd libffi libxml2 libxml2-native ninja-native swig-native spirv-tools-native" | 208 | DEPENDS = "binutils zlib zstd libffi libxml2 libxml2-native ninja-native swig-native spirv-tools-native" |
208 | DEPENDS:append:class-nativesdk = " clang-crosssdk-${SDK_SYS} virtual/nativesdk-cross-binutils nativesdk-python3" | 209 | DEPENDS:append:class-nativesdk = " clang-crosssdk-${SDK_SYS} virtual/nativesdk-cross-binutils nativesdk-python3" |
209 | DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} python3 ${@bb.utils.contains('TC_CXX_RUNTIME', 'llvm', 'compiler-rt libcxx', '', d)}" | 210 | DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} python3 ${@bb.utils.contains('TC_CXX_RUNTIME', 'llvm', 'compiler-rt libcxx', '', d)} spirv-llvm-translator-native" |
210 | 211 | ||
211 | RRECOMMENDS:${PN} = "binutils" | 212 | RRECOMMENDS:${PN} = "binutils" |
212 | RRECOMMENDS:${PN}:append:class-target = "${@bb.utils.contains('TC_CXX_RUNTIME', 'llvm', ' libcxx-dev', '', d)}" | 213 | RRECOMMENDS:${PN}:append:class-target = "${@bb.utils.contains('TC_CXX_RUNTIME', 'llvm', ' libcxx-dev', '', d)}" |
@@ -312,7 +313,7 @@ PROVIDES:append:class-native = " llvm-native libclc-native" | |||
312 | PROVIDES:append:class-target = " llvm libclc" | 313 | PROVIDES:append:class-target = " llvm libclc" |
313 | PROVIDES:append:class-nativesdk = " nativesdk-llvm nativesdk-libclc" | 314 | PROVIDES:append:class-nativesdk = " nativesdk-llvm nativesdk-libclc" |
314 | 315 | ||
315 | PACKAGES =+ "${PN}-libllvm ${PN}-lldb-python ${PN}-libclang-cpp ${PN}-tidy ${PN}-format ${PN}-tools ${PN}-clc \ | 316 | PACKAGES =+ "${PN}-libllvm ${PN}-lldb-python ${PN}-libclang-python ${PN}-libclang-cpp ${PN}-tidy ${PN}-format ${PN}-tools ${PN}-clc \ |
316 | libclang lldb lldb-server liblldb llvm-linker-tools" | 317 | libclang lldb lldb-server liblldb llvm-linker-tools" |
317 | 318 | ||
318 | 319 | ||
@@ -342,6 +343,8 @@ FILES:${PN}-libclang-cpp = "${libdir}/libclang-cpp.so.*" | |||
342 | 343 | ||
343 | FILES:${PN}-lldb-python = "${libdir}/python*/site-packages/lldb/*" | 344 | FILES:${PN}-lldb-python = "${libdir}/python*/site-packages/lldb/*" |
344 | 345 | ||
346 | FILES:${PN}-libclang-python = "${PYTHON_SITEPACKAGES_DIR}/clang/*" | ||
347 | |||
345 | FILES:${PN}-tidy = "${bindir}/*clang-tidy*" | 348 | FILES:${PN}-tidy = "${bindir}/*clang-tidy*" |
346 | FILES:${PN}-format = "${bindir}/*clang-format*" | 349 | FILES:${PN}-format = "${bindir}/*clang-format*" |
347 | 350 | ||
diff --git a/meta/recipes-devtools/clang/common-clang.inc b/meta/recipes-devtools/clang/common-clang.inc index 1099274d90..45616de3e3 100644 --- a/meta/recipes-devtools/clang/common-clang.inc +++ b/meta/recipes-devtools/clang/common-clang.inc | |||
@@ -5,7 +5,7 @@ LLVM_HTTP ?= "https://github.com/llvm" | |||
5 | 5 | ||
6 | MAJOR_VER = "20" | 6 | MAJOR_VER = "20" |
7 | MINOR_VER = "1" | 7 | MINOR_VER = "1" |
8 | PATCH_VER = "4" | 8 | PATCH_VER = "5" |
9 | # could be 'rcX' or 'git' or empty ( for release ) | 9 | # could be 'rcX' or 'git' or empty ( for release ) |
10 | VER_SUFFIX = "" | 10 | VER_SUFFIX = "" |
11 | 11 | ||
diff --git a/meta/recipes-devtools/clang/common.inc b/meta/recipes-devtools/clang/common.inc index f661a6283e..f53336326a 100644 --- a/meta/recipes-devtools/clang/common.inc +++ b/meta/recipes-devtools/clang/common.inc | |||
@@ -17,7 +17,7 @@ BASEURI ?= "${LLVM_HTTP}/llvm-project/releases/download/llvmorg-${PV}/llvm-proje | |||
17 | UPSTREAM_CHECK_URI = "${LLVM_HTTP}/llvm-project/releases/" | 17 | UPSTREAM_CHECK_URI = "${LLVM_HTTP}/llvm-project/releases/" |
18 | UPSTREAM_CHECK_REGEX = "releases/tag/llvmorg-?(?P<pver>\d+(\.\d+)+)" | 18 | UPSTREAM_CHECK_REGEX = "releases/tag/llvmorg-?(?P<pver>\d+(\.\d+)+)" |
19 | SOURCEDIR ?= "llvm-project-${PV}.src" | 19 | SOURCEDIR ?= "llvm-project-${PV}.src" |
20 | SRC_URI[sha256sum] = "a95365b02536ed4aef29b325c205dd89c268cba41503ab2fc05f81418613ab63" | 20 | SRC_URI[sha256sum] = "a069565cd1c6aee48ee0f36de300635b5781f355d7b3c96a28062d50d575fa3e" |
21 | 21 | ||
22 | SRC_URI = "\ | 22 | SRC_URI = "\ |
23 | ${BASEURI} \ | 23 | ${BASEURI} \ |
@@ -52,12 +52,13 @@ SRC_URI = "\ | |||
52 | file://0029-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch \ | 52 | file://0029-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch \ |
53 | file://0030-scan-build-py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch \ | 53 | file://0030-scan-build-py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch \ |
54 | file://0031-compiler-rt-Do-not-pass-target-to-clang-compiler.patch \ | 54 | file://0031-compiler-rt-Do-not-pass-target-to-clang-compiler.patch \ |
55 | file://0032-Fix-build-on-ppc64-musl.patch \ | 55 | file://0032-clangd-Add-a-build-option-to-disable-building-dexp.patch \ |
56 | file://0033-clangd-Add-a-build-option-to-disable-building-dexp.patch \ | 56 | file://0033-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch \ |
57 | file://0034-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch \ | 57 | file://0034-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch \ |
58 | file://0035-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch \ | 58 | file://0035-openmp-Do-not-emit-date-and-time-into-generate-files.patch \ |
59 | file://0036-openmp-Do-not-emit-date-and-time-into-generate-files.patch \ | 59 | file://0036-libunwind-Use-gcs-instead-of-gcs-target-attribute.patch \ |
60 | file://0038-compiler-rt-Exclude-sync_fetch_and_-for-any-pre-ARMv.patch \ | 60 | file://0037-compiler-rt-Exclude-sync_fetch_and_-for-any-pre-ARMv.patch \ |
61 | file://0038-compiler-rt-Hardcode-uptr-sptr-typedefs-on-Mips-Linu.patch \ | ||
61 | " | 62 | " |
62 | # Fallback to no-PIE if not set | 63 | # Fallback to no-PIE if not set |
63 | GCCPIE ??= "" | 64 | GCCPIE ??= "" |
diff --git a/meta/recipes-devtools/gcc/gcc-15.1.inc b/meta/recipes-devtools/gcc/gcc-15.1.inc index 864c6091a6..0032500cdc 100644 --- a/meta/recipes-devtools/gcc/gcc-15.1.inc +++ b/meta/recipes-devtools/gcc/gcc-15.1.inc | |||
@@ -10,6 +10,8 @@ BINV = "15.1.0" | |||
10 | 10 | ||
11 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc:${FILE_DIRNAME}/gcc/backport:" | 11 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc:${FILE_DIRNAME}/gcc/backport:" |
12 | 12 | ||
13 | TOOLCHAIN = "gcc" | ||
14 | |||
13 | DEPENDS =+ "mpfr gmp libmpc zlib zstd flex-native" | 15 | DEPENDS =+ "mpfr gmp libmpc zlib zstd flex-native" |
14 | NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native zstd-native" | 16 | NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native zstd-native" |
15 | 17 | ||
@@ -69,6 +71,8 @@ SRC_URI = "${BASEURI} \ | |||
69 | file://0023-Fix-install-path-of-linux64.h.patch \ | 71 | file://0023-Fix-install-path-of-linux64.h.patch \ |
70 | file://0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch \ | 72 | file://0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch \ |
71 | file://0025-gcc-testsuite-tweaks-for-mips-OE.patch \ | 73 | file://0025-gcc-testsuite-tweaks-for-mips-OE.patch \ |
74 | file://0026-arm-fully-validate-mem_noofs_operand-PR120351.patch \ | ||
75 | file://0026-fix-incorrect-preprocessor-line-numbers.patch \ | ||
72 | " | 76 | " |
73 | 77 | ||
74 | S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/${SOURCEDIR}" | 78 | S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/${SOURCEDIR}" |
diff --git a/meta/recipes-devtools/gcc/gcc/0026-arm-fully-validate-mem_noofs_operand-PR120351.patch b/meta/recipes-devtools/gcc/gcc/0026-arm-fully-validate-mem_noofs_operand-PR120351.patch new file mode 100644 index 0000000000..3f324fdc22 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc/0026-arm-fully-validate-mem_noofs_operand-PR120351.patch | |||
@@ -0,0 +1,95 @@ | |||
1 | From bb7adc5dab8bcee2ef1c0d2af370ea77c49bb5c5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Earnshaw <rearnsha@arm.com> | ||
3 | Date: Mon, 19 May 2025 16:19:39 +0100 | ||
4 | Subject: [PATCH] arm: fully validate mem_noofs_operand [PR120351] | ||
5 | |||
6 | It's not enough to just check that a memory operand is of the form | ||
7 | mem(reg); after RA we also need to validate the register being used. | ||
8 | The safest way to do this is to call memory_operand. | ||
9 | |||
10 | PR target/120351 | ||
11 | |||
12 | gcc/ChangeLog: | ||
13 | |||
14 | * config/arm/predicates.md (mem_noofs_operand): Also check the op | ||
15 | is a valid memory_operand. | ||
16 | |||
17 | gcc/testsuite/ChangeLog: | ||
18 | |||
19 | * gcc.target/arm/pr120351.c: New test. | ||
20 | |||
21 | Upstream-Status: Backport [https://gcc.gnu.org/cgit/gcc/commit/?id=e5bb7a328eb71daa02d15b48d3a6c6b8cd24abc5] | ||
22 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
23 | --- | ||
24 | gcc/config/arm/predicates.md | 3 +- | ||
25 | gcc/testsuite/gcc.target/arm/pr120351.c | 47 +++++++++++++++++++++++++ | ||
26 | 2 files changed, 49 insertions(+), 1 deletion(-) | ||
27 | create mode 100644 gcc/testsuite/gcc.target/arm/pr120351.c | ||
28 | |||
29 | diff --git a/gcc/config/arm/predicates.md b/gcc/config/arm/predicates.md | ||
30 | index 75c06d9be25..655f60312de 100644 | ||
31 | --- a/gcc/config/arm/predicates.md | ||
32 | +++ b/gcc/config/arm/predicates.md | ||
33 | @@ -907,7 +907,8 @@ | ||
34 | |||
35 | (define_predicate "mem_noofs_operand" | ||
36 | (and (match_code "mem") | ||
37 | - (match_code "reg" "0"))) | ||
38 | + (match_code "reg" "0") | ||
39 | + (match_operand 0 "memory_operand"))) | ||
40 | |||
41 | (define_predicate "call_insn_operand" | ||
42 | (ior (and (match_code "symbol_ref") | ||
43 | diff --git a/gcc/testsuite/gcc.target/arm/pr120351.c b/gcc/testsuite/gcc.target/arm/pr120351.c | ||
44 | new file mode 100644 | ||
45 | index 00000000000..d8e9d73275c | ||
46 | --- /dev/null | ||
47 | +++ b/gcc/testsuite/gcc.target/arm/pr120351.c | ||
48 | @@ -0,0 +1,47 @@ | ||
49 | +/* { dg-do assemble } */ | ||
50 | +/* { dg-require-effective-target arm_neon_ok } */ | ||
51 | +/* { dg-add-options arm_neon } */ | ||
52 | +/* { dg-additional-options "-O2" } */ | ||
53 | + | ||
54 | + | ||
55 | +typedef struct A | ||
56 | +{ | ||
57 | + int f1; | ||
58 | +} A; | ||
59 | + | ||
60 | +__inline void ref (A* x) | ||
61 | +{ | ||
62 | + __atomic_fetch_add(&x->f1, 1, 0); | ||
63 | +} | ||
64 | + | ||
65 | +typedef struct B | ||
66 | +{ | ||
67 | + A *d; | ||
68 | + int *ptr; | ||
69 | +} B; | ||
70 | + | ||
71 | +void insertOne (B*, B*); | ||
72 | + | ||
73 | +void init (B *); | ||
74 | +__inline void copy (B *p, B *q) | ||
75 | +{ | ||
76 | + p->d = q->d; | ||
77 | + p->ptr = q->ptr; | ||
78 | + ref (p->d); | ||
79 | +} | ||
80 | + | ||
81 | +__inline void emplace(B* x) | ||
82 | +{ | ||
83 | + B dummy; | ||
84 | + B _tmp; | ||
85 | + init (&dummy); | ||
86 | + copy (&_tmp, &dummy); | ||
87 | + insertOne(x, &_tmp); | ||
88 | +} | ||
89 | + | ||
90 | +void testing () | ||
91 | +{ | ||
92 | + B test; | ||
93 | + init (&test); | ||
94 | + emplace(&test); | ||
95 | +} | ||
diff --git a/meta/recipes-devtools/gcc/gcc/0026-fix-incorrect-preprocessor-line-numbers.patch b/meta/recipes-devtools/gcc/gcc/0026-fix-incorrect-preprocessor-line-numbers.patch new file mode 100644 index 0000000000..f799085662 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc/0026-fix-incorrect-preprocessor-line-numbers.patch | |||
@@ -0,0 +1,475 @@ | |||
1 | From edf745dc519ddbfef127e2789bf11bfbacd300b7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jakub Jelinek <jakub@redhat.com> | ||
3 | Date: Wed, 7 May 2025 17:25:42 +0200 | ||
4 | Subject: libcpp: Further fixes for incorrect line numbers in large files | ||
5 | [PR120061] | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | The backport of the PR108900 fix to 14 branch broke building chromium | ||
11 | because static_assert (__LINE__ == expected_line_number, ""); now triggers | ||
12 | as the __LINE__ values are off by one. | ||
13 | This isn't the case on the trunk and 15 branch because we've switched | ||
14 | to 64-bit location_t and so one actually needs far longer header files | ||
15 | to trigger it. | ||
16 | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120061#c11 | ||
17 | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120061#c12 | ||
18 | contain (large) testcases in patch form which show on the 14 branch | ||
19 | that the first one used to fail before the PR108900 backport and now | ||
20 | works correctly, while the second one attempts to match the chromium | ||
21 | behavior and it used to pass before the PR108900 backport and now it | ||
22 | FAILs. | ||
23 | The two testcases show rare problematic cases, because | ||
24 | do_include_common -> parse_include -> check_eol -> check_eol_1 -> | ||
25 | cpp_get_token_1 -> _cpp_lex_token -> _cpp_lex_direct -> linemap_line_start | ||
26 | triggers there | ||
27 | /* Allocate the new line_map. However, if the current map only has a | ||
28 | single line we can sometimes just increase its column_bits instead. */ | ||
29 | if (line_delta < 0 | ||
30 | || last_line != ORDINARY_MAP_STARTING_LINE_NUMBER (map) | ||
31 | || SOURCE_COLUMN (map, highest) >= (1U << (column_bits - range_bits)) | ||
32 | || ( /* We can't reuse the map if the line offset is sufficiently | ||
33 | large to cause overflow when computing location_t values. */ | ||
34 | (to_line - ORDINARY_MAP_STARTING_LINE_NUMBER (map)) | ||
35 | >= (((uint64_t) 1) | ||
36 | << (CHAR_BIT * sizeof (linenum_type) - column_bits))) | ||
37 | || range_bits < map->m_range_bits) | ||
38 | map = linemap_check_ordinary | ||
39 | (const_cast <line_map *> | ||
40 | (linemap_add (set, LC_RENAME, | ||
41 | ORDINARY_MAP_IN_SYSTEM_HEADER_P (map), | ||
42 | ORDINARY_MAP_FILE_NAME (map), | ||
43 | to_line))); | ||
44 | and so creates a new ordinary map on the line right after the | ||
45 | (problematic) #include line. | ||
46 | Now, in the spot that r14-11679-g8a884140c2bcb7 patched, | ||
47 | pfile->line_table->highest_location in all 3 tests (also | ||
48 | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120061#c13 | ||
49 | ) is before the decrement the start of the line after the #include line and so | ||
50 | the decrement is really desirable in that case to put highest_location | ||
51 | somewhere on the line where the #include actually is. | ||
52 | But at the same time it is also undesirable, because if we do decrement it, | ||
53 | then linemap_add LC_ENTER called from _cpp_do_file_change will then | ||
54 | /* Generate a start_location above the current highest_location. | ||
55 | If possible, make the low range bits be zero. */ | ||
56 | location_t start_location = set->highest_location + 1; | ||
57 | unsigned range_bits = 0; | ||
58 | if (start_location < LINE_MAP_MAX_LOCATION_WITH_COLS) | ||
59 | range_bits = set->default_range_bits; | ||
60 | start_location += (1 << range_bits) - 1; | ||
61 | start_location &= ~((1 << range_bits) - 1); | ||
62 | |||
63 | linemap_assert (!LINEMAPS_ORDINARY_USED (set) | ||
64 | || (start_location | ||
65 | >= MAP_START_LOCATION (LINEMAPS_LAST_ORDINARY_MAP (set)))); | ||
66 | and we can end up with the new LC_ENTER ordinary map having the same | ||
67 | start_location as the preceding LC_RENAME one. | ||
68 | Next thing that happens is computation of included_from: | ||
69 | if (reason == LC_ENTER) | ||
70 | { | ||
71 | if (set->depth == 0) | ||
72 | map->included_from = 0; | ||
73 | else | ||
74 | /* The location of the end of the just-closed map. */ | ||
75 | map->included_from | ||
76 | = (((map[0].start_location - 1 - map[-1].start_location) | ||
77 | & ~((1 << map[-1].m_column_and_range_bits) - 1)) | ||
78 | + map[-1].start_location); | ||
79 | The normal case (e.g. with the testcase included at the start of this comment) is | ||
80 | that map[-1] starts somewhere earlier and so map->included_from computation above | ||
81 | nicely computes location_t which expands to the start of the #include line. | ||
82 | With r14-11679 reverted, for #c11 as well as #c12 | ||
83 | map[0].start_location == map[-1].start_location above, and so it is | ||
84 | ((location_t) -1 & ~((1 << map[-1].m_column_and_range_bits) - 1))) | ||
85 | + map[-1].start_location, | ||
86 | which happens to be start of the #include line. | ||
87 | For #c11 map[0].start_location is 0x500003a0 and map[-1] has | ||
88 | m_column_and_range_bits 7 and map[-2] has m_column_and_range_bits 12 and | ||
89 | map[0].included_from is set to 0x50000320. | ||
90 | For #c12 map[0].start_location is 0x606c0402 and map[-2].start_location is | ||
91 | 0x606c0400 and m_column_and_range_bits is 0 for all 3 maps. | ||
92 | map[0].included_from is set to 0x606c0401. | ||
93 | The last important part is again in linemap_add when doing LC_LEAVE: | ||
94 | /* (MAP - 1) points to the map we are leaving. The | ||
95 | map from which (MAP - 1) got included should be the map | ||
96 | that comes right before MAP in the same file. */ | ||
97 | from = linemap_included_from_linemap (set, map - 1); | ||
98 | |||
99 | /* A TO_FILE of NULL is special - we use the natural values. */ | ||
100 | if (to_file == NULL) | ||
101 | { | ||
102 | to_file = ORDINARY_MAP_FILE_NAME (from); | ||
103 | to_line = SOURCE_LINE (from, from[1].start_location); | ||
104 | sysp = ORDINARY_MAP_IN_SYSTEM_HEADER_P (from); | ||
105 | } | ||
106 | Here it wants to compute the right to_line which ought to be the line after | ||
107 | the #include directive. | ||
108 | On the #c11 testcase that doesn't work correctly though, because | ||
109 | map[-1].included_from is 0x50000320, from[0] for that is LC_ENTER with | ||
110 | start_location 0x4080 and m_column_and_range_bits 12 but note that we've | ||
111 | earlier computed map[-1].start_location + (-1 & 0xffffff80) and so only | ||
112 | decreased by 7 bits, so to_line is still on the line with #include and not | ||
113 | after it. In the #c12 that doesn't happen, all the ordinary maps involved | ||
114 | there had 0 m_column_and_range_bits and so this computes correct line. | ||
115 | |||
116 | Below is a fix for the trunk including testcases using the | ||
117 | location_overflow_plugin hack to simulate the bugs without needing huge | ||
118 | files (in the 14 case it is just 330KB and almost 10MB, but in the 15 | ||
119 | case it would need to be far bigger). | ||
120 | The pre- r15-9018 trunk has | ||
121 | FAIL: gcc.dg/plugin/location-overflow-test-pr116047.c -fplugin=./location_overflow_plugin.so scan-file static_assert[^\n\r]*6[^\n\r]*== 6 | ||
122 | and current trunk | ||
123 | FAIL: gcc.dg/plugin/location-overflow-test-pr116047.c -fplugin=./location_overflow_plugin.so scan-file static_assert[^\n\r]*6[^\n\r]*== 6 | ||
124 | FAIL: gcc.dg/plugin/location-overflow-test-pr120061.c -fplugin=./location_overflow_plugin.so scan-file static_assert[^\n\r]*5[^\n\r]*== 5 | ||
125 | and with the patch everything PASSes. | ||
126 | I'll post afterwards a 14 version of the patch. | ||
127 | |||
128 | The patch reverts the r15-9018 change, because it is incorrect, | ||
129 | we really need to decrement it even when crossing ordinary map | ||
130 | boundaries, so that the location is not on the line after the #include | ||
131 | line but somewhere on the #include line. It also patches two spots | ||
132 | in linemap_add mentioned above to make sure we get correct locations | ||
133 | both in the included_from location_t when doing LC_ENTER (second | ||
134 | line-map.cc hunk) and when doing LC_LEAVE to compute the right to_line | ||
135 | (first line-map.cc hunk), both in presence of an added LC_RENAME | ||
136 | with the same start_location as the following LC_ENTER (i.e. the | ||
137 | problematic cases). | ||
138 | The LC_ENTER hunk is mostly to ensure included_form location_t is | ||
139 | at the start of the #include line (column 0), without it we can | ||
140 | decrease include_from not enough and end up at some random column | ||
141 | in the middle of the line, because it is masking away | ||
142 | map[-1].m_column_and_range_bits bits even when in the end the resulting | ||
143 | include_from location_t will be found in map[-2] map with perhaps | ||
144 | different m_column_and_range_bits. That alone doesn't fix the bug | ||
145 | though. | ||
146 | The more important is the LC_LEAVE hunk and the problem there is | ||
147 | caused by linemap_line_start not actually doing | ||
148 | r = set->highest_line + (line_delta << map->m_column_and_range_bits); | ||
149 | when adding a new map (the LC_RENAME one because we need to switch to | ||
150 | different number of directly encoded ranges, or columns, etc.). | ||
151 | So, in the original PR108900 case that | ||
152 | to_line = SOURCE_LINE (from, from[1].start_location); | ||
153 | doesn't do the right thing, from there is the last < 0x50000000 map | ||
154 | with m_column_and_range_bits 12, from[1] is the first one above it | ||
155 | and map[-1].included_from is the correct location of column 0 on | ||
156 | the #include line, but as the new LC_RENAME map has been created without | ||
157 | actually increasing highest_location to be on the new line (we've just | ||
158 | set to_line of the new LC_RENAME map to the correct line), | ||
159 | to_line = SOURCE_LINE (from, from[1].start_location); | ||
160 | stays on the same source line. I've tried to just replace that with | ||
161 | to_line = SOURCE_LINE (from, linemap_included_from (map - 1)) + 1; | ||
162 | i.e. just find out the #include line from map[-1].included_from and | ||
163 | add 1 to it, unfortunately that breaks the | ||
164 | c-c++-common/cpp/line-4.c | ||
165 | test where we expect to stay on the same 0 line for LC_LEAVE from | ||
166 | <command line> and gcc.dg/cpp/trad/Wunused.c, gcc.dg/cpp/trad/builtins.c | ||
167 | and c-c++-common/analyzer/named-constants-via-macros-traditional.c tests | ||
168 | all with -traditional-cpp preprocessing where to_line is also off-by-one | ||
169 | from the expected one. | ||
170 | So, this patch instead conditionalizes it, uses the | ||
171 | to_line = SOURCE_LINE (from, linemap_included_from (map - 1)) + 1; | ||
172 | way only if from[1] is a LC_RENAME map (rather than the usual | ||
173 | LC_ENTER one), that should limit it to the problematic cases of when | ||
174 | parse_include peeked after EOL and had to create LC_RENAME map with | ||
175 | the same start_location as the LC_ENTER after it. | ||
176 | |||
177 | Some further justification for the LC_ENTER hunk, using the | ||
178 | https://gcc.gnu.org/pipermail/gcc-patches/2025-May/682774.html testcase | ||
179 | (old is 14 before r14-11679, vanilla current 14 and new with the 14 patch) | ||
180 | I get | ||
181 | $ /usr/src/gcc-14/obj/gcc/cc1.old -quiet -std=c23 pr116047.c -nostdinc | ||
182 | In file included from pr116047-1.h:327677:21, | ||
183 | from pr116047.c:4: | ||
184 | pr116047-2.h:1:1: error: unknown type name ‘a’ | ||
185 | 1 | a b c; | ||
186 | | ^ | ||
187 | pr116047-2.h:1:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘c’ | ||
188 | 1 | a b c; | ||
189 | | ^ | ||
190 | pr116047-1.h:327677:1: error: static assertion failed: "" | ||
191 | 327677 | #include "pr116047-2.h" | ||
192 | | ^~~~~~~~~~~~~ | ||
193 | $ /usr/src/gcc-14/obj/gcc/cc1.vanilla -quiet -std=c23 pr116047.c -nostdinc | ||
194 | In file included from pr116047-1.h:327678, | ||
195 | from pr116047.c:4: | ||
196 | pr116047-2.h:1:1: error: unknown type name ‘a’ | ||
197 | 1 | a b c; | ||
198 | | ^ | ||
199 | pr116047-2.h:1:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘c’ | ||
200 | 1 | a b c; | ||
201 | | ^ | ||
202 | $ /usr/src/gcc-14/obj/gcc/cc1.new -quiet -std=c23 pr116047.c -nostdinc | ||
203 | In file included from pr116047-1.h:327677, | ||
204 | from pr116047.c:4: | ||
205 | pr116047-2.h:1:1: error: unknown type name ‘a’ | ||
206 | 1 | a b c; | ||
207 | | ^ | ||
208 | pr116047-2.h:1:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘c’ | ||
209 | 1 | a b c; | ||
210 | | ^ | ||
211 | |||
212 | pr116047-1.h has on lines 327677+327678: | ||
213 | #include "pr116047-2.h" | ||
214 | static_assert (__LINE__ == 327678, ""); | ||
215 | so the static_assert failure is something that was dealt mainly in the | ||
216 | LC_LEAVE hunk and files.cc reversion, but please have a look at the | ||
217 | In file included from lines. | ||
218 | 14.2 emits correct line (#include "pr116047-2.h" is indeed on line | ||
219 | 327677) but some random column in there (which is not normally printed | ||
220 | for smaller headers; 21 is the . before extension in the filename). | ||
221 | Current trunk emits incorrect line (327678 instead of 327677, clearly | ||
222 | it didn't decrement). | ||
223 | And the patched compiler emits the right line with no column, as would | ||
224 | be printed if I remove e.g. 300000 newlines from the file. | ||
225 | |||
226 | 2025-05-07 Jakub Jelinek <jakub@redhat.com> | ||
227 | |||
228 | PR preprocessor/108900 | ||
229 | PR preprocessor/116047 | ||
230 | PR preprocessor/120061 | ||
231 | * files.cc (_cpp_stack_file): Revert 2025-03-28 change. | ||
232 | * line-map.cc (linemap_add): Use | ||
233 | SOURCE_LINE (from, linemap_included_from (map - 1)) + 1; instead of | ||
234 | SOURCE_LINE (from, from[1].start_location); to compute to_line | ||
235 | for LC_LEAVE. For LC_ENTER included_from computation, look at | ||
236 | map[-2] or even lower if map[-1] has the same start_location as | ||
237 | map[0]. | ||
238 | |||
239 | * gcc.dg/plugin/plugin.exp: Add location-overflow-test-pr116047.c | ||
240 | and location-overflow-test-pr120061.c. | ||
241 | * gcc.dg/plugin/location_overflow_plugin.cc (plugin_init): Don't error | ||
242 | on unknown values, instead just break. Handle 0x4fHHHHHH arguments | ||
243 | differently. | ||
244 | * gcc.dg/plugin/location-overflow-test-pr116047.c: New test. | ||
245 | * gcc.dg/plugin/location-overflow-test-pr116047-1.h: New test. | ||
246 | * gcc.dg/plugin/location-overflow-test-pr116047-2.h: New test. | ||
247 | * gcc.dg/plugin/location-overflow-test-pr120061.c: New test. | ||
248 | * gcc.dg/plugin/location-overflow-test-pr120061-1.h: New test. | ||
249 | * gcc.dg/plugin/location-overflow-test-pr120061-2.h: New test. | ||
250 | |||
251 | Upstream-Status: Backport [https://gcc.gnu.org/cgit/gcc/commit/?id=edf745dc519ddbfef127e2789bf11bfbacd300b7] | ||
252 | Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> | ||
253 | --- | ||
254 | .../plugin/location-overflow-test-pr116047-1.h | 6 +++ | ||
255 | .../plugin/location-overflow-test-pr116047-2.h | 1 + | ||
256 | .../plugin/location-overflow-test-pr116047.c | 5 +++ | ||
257 | .../plugin/location-overflow-test-pr120061-1.h | 6 +++ | ||
258 | .../plugin/location-overflow-test-pr120061-2.h | 1 + | ||
259 | .../plugin/location-overflow-test-pr120061.c | 6 +++ | ||
260 | .../gcc.dg/plugin/location_overflow_plugin.cc | 15 +++++-- | ||
261 | gcc/testsuite/gcc.dg/plugin/plugin.exp | 4 +- | ||
262 | libcpp/files.cc | 8 ---- | ||
263 | libcpp/line-map.cc | 48 ++++++++++++++++++---- | ||
264 | 10 files changed, 80 insertions(+), 20 deletions(-) | ||
265 | create mode 100644 gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-1.h | ||
266 | create mode 100644 gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-2.h | ||
267 | create mode 100644 gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047.c | ||
268 | create mode 100644 gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-1.h | ||
269 | create mode 100644 gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-2.h | ||
270 | create mode 100644 gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061.c | ||
271 | |||
272 | diff --git a/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-1.h b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-1.h | ||
273 | new file mode 100644 | ||
274 | index 000000000000..3dd6434a938b | ||
275 | --- /dev/null | ||
276 | +++ b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-1.h | ||
277 | @@ -0,0 +1,6 @@ | ||
278 | + | ||
279 | + | ||
280 | + | ||
281 | + | ||
282 | +#include "location-overflow-test-pr116047-2.h" | ||
283 | +static_assert (__LINE__ == 6, ""); | ||
284 | diff --git a/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-2.h b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-2.h | ||
285 | new file mode 100644 | ||
286 | index 000000000000..048f715b4656 | ||
287 | --- /dev/null | ||
288 | +++ b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-2.h | ||
289 | @@ -0,0 +1 @@ | ||
290 | +int i; | ||
291 | diff --git a/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047.c b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047.c | ||
292 | new file mode 100644 | ||
293 | index 000000000000..75161fa5f055 | ||
294 | --- /dev/null | ||
295 | +++ b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047.c | ||
296 | @@ -0,0 +1,5 @@ | ||
297 | +/* PR preprocessor/116047 */ | ||
298 | +/* { dg-do preprocess } */ | ||
299 | +/* { dg-options "-nostdinc -std=c23 -fplugin-arg-location_overflow_plugin-value=0x4ffe0180" } */ | ||
300 | +#include "location-overflow-test-pr116047-1.h" | ||
301 | +/* { dg-final { scan-file location-overflow-test-pr116047.i "static_assert\[^\n\r]\*6\[^\n\r]\*== 6" } } */ | ||
302 | diff --git a/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-1.h b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-1.h | ||
303 | new file mode 100644 | ||
304 | index 000000000000..ebf7704f568e | ||
305 | --- /dev/null | ||
306 | +++ b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-1.h | ||
307 | @@ -0,0 +1,6 @@ | ||
308 | + | ||
309 | + | ||
310 | + | ||
311 | + | ||
312 | +#include "location-overflow-test-pr120061-2.h" | ||
313 | + | ||
314 | diff --git a/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-2.h b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-2.h | ||
315 | new file mode 100644 | ||
316 | index 000000000000..048f715b4656 | ||
317 | --- /dev/null | ||
318 | +++ b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-2.h | ||
319 | @@ -0,0 +1 @@ | ||
320 | +int i; | ||
321 | diff --git a/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061.c b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061.c | ||
322 | new file mode 100644 | ||
323 | index 000000000000..e8e803898da3 | ||
324 | --- /dev/null | ||
325 | +++ b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061.c | ||
326 | @@ -0,0 +1,6 @@ | ||
327 | +/* PR preprocessor/120061 */ | ||
328 | +/* { dg-do preprocess } */ | ||
329 | +/* { dg-options "-nostdinc -std=c23 -fplugin-arg-location_overflow_plugin-value=0x61000000" } */ | ||
330 | +#include "location-overflow-test-pr120061-1.h" | ||
331 | +static_assert (__LINE__ == 5, ""); | ||
332 | +/* { dg-final { scan-file location-overflow-test-pr120061.i "static_assert\[^\n\r]\*5\[^\n\r]\*== 5" } } */ | ||
333 | diff --git a/gcc/testsuite/gcc.dg/plugin/location_overflow_plugin.cc b/gcc/testsuite/gcc.dg/plugin/location_overflow_plugin.cc | ||
334 | index f731b1421b0f..f770d35ea518 100644 | ||
335 | --- a/gcc/testsuite/gcc.dg/plugin/location_overflow_plugin.cc | ||
336 | +++ b/gcc/testsuite/gcc.dg/plugin/location_overflow_plugin.cc | ||
337 | @@ -85,9 +85,18 @@ plugin_init (struct plugin_name_args *plugin_info, | ||
338 | error_at (UNKNOWN_LOCATION, "missing plugin argument"); | ||
339 | |||
340 | /* With 64-bit locations, the thresholds are larger, so shift the base | ||
341 | - location argument accordingly. */ | ||
342 | + location argument accordingly, basically remap the GCC 14 32-bit | ||
343 | + location_t argument values to 64-bit location_t counterparts. There | ||
344 | + is one exception for values slightly before the 32-bit location_t | ||
345 | + LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES (0x50000000). In that case | ||
346 | + remap them to the same amount before the 64-bit location_t | ||
347 | + LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES - | ||
348 | + ((location_t) 0x50000000) << 31. */ | ||
349 | gcc_assert (sizeof (location_t) == sizeof (uint64_t)); | ||
350 | - base_location = 1 + ((base_location - 1) << 31); | ||
351 | + if (base_location >= 0x4f000000 && base_location <= 0x4fffffff) | ||
352 | + base_location += (((location_t) 0x50000000) << 31) - 0x50000000; | ||
353 | + else | ||
354 | + base_location = 1 + ((base_location - 1) << 31); | ||
355 | |||
356 | register_callback (plugin_info->base_name, | ||
357 | PLUGIN_PRAGMAS, | ||
358 | @@ -107,7 +116,7 @@ plugin_init (struct plugin_name_args *plugin_info, | ||
359 | break; | ||
360 | |||
361 | default: | ||
362 | - error_at (UNKNOWN_LOCATION, "unrecognized value for plugin argument"); | ||
363 | + break; | ||
364 | } | ||
365 | |||
366 | return 0; | ||
367 | diff --git a/gcc/testsuite/gcc.dg/plugin/plugin.exp b/gcc/testsuite/gcc.dg/plugin/plugin.exp | ||
368 | index 90c91621d0aa..96e76d2e0c36 100644 | ||
369 | --- a/gcc/testsuite/gcc.dg/plugin/plugin.exp | ||
370 | +++ b/gcc/testsuite/gcc.dg/plugin/plugin.exp | ||
371 | @@ -138,7 +138,9 @@ set plugin_test_list [list \ | ||
372 | { location_overflow_plugin.cc \ | ||
373 | location-overflow-test-1.c \ | ||
374 | location-overflow-test-2.c \ | ||
375 | - location-overflow-test-pr83173.c } \ | ||
376 | + location-overflow-test-pr83173.c \ | ||
377 | + location-overflow-test-pr116047.c \ | ||
378 | + location-overflow-test-pr120061.c } \ | ||
379 | { must_tail_call_plugin.cc \ | ||
380 | must-tail-call-1.c \ | ||
381 | must-tail-call-2.c } \ | ||
382 | diff --git a/libcpp/files.cc b/libcpp/files.cc | ||
383 | index c1abde6639fe..d80c4bfd9077 100644 | ||
384 | --- a/libcpp/files.cc | ||
385 | +++ b/libcpp/files.cc | ||
386 | @@ -1047,14 +1047,6 @@ _cpp_stack_file (cpp_reader *pfile, _cpp_file *file, include_type type, | ||
387 | && (pfile->line_table->highest_location | ||
388 | != LINE_MAP_MAX_LOCATION - 1)); | ||
389 | |||
390 | - if (decrement && LINEMAPS_ORDINARY_USED (pfile->line_table)) | ||
391 | - { | ||
392 | - const line_map_ordinary *map | ||
393 | - = LINEMAPS_LAST_ORDINARY_MAP (pfile->line_table); | ||
394 | - if (map && map->start_location == pfile->line_table->highest_location) | ||
395 | - decrement = false; | ||
396 | - } | ||
397 | - | ||
398 | if (decrement) | ||
399 | pfile->line_table->highest_location--; | ||
400 | |||
401 | diff --git a/libcpp/line-map.cc b/libcpp/line-map.cc | ||
402 | index 17e7f12551c0..cf6557117c81 100644 | ||
403 | --- a/libcpp/line-map.cc | ||
404 | +++ b/libcpp/line-map.cc | ||
405 | @@ -621,8 +621,8 @@ linemap_add (line_maps *set, enum lc_reason reason, | ||
406 | #include "included", inside the same "includer" file. */ | ||
407 | |||
408 | linemap_assert (!MAIN_FILE_P (map - 1)); | ||
409 | - /* (MAP - 1) points to the map we are leaving. The | ||
410 | - map from which (MAP - 1) got included should be the map | ||
411 | + /* (MAP - 1) points to the map we are leaving. The | ||
412 | + map from which (MAP - 1) got included should be usually the map | ||
413 | that comes right before MAP in the same file. */ | ||
414 | from = linemap_included_from_linemap (set, map - 1); | ||
415 | |||
416 | @@ -630,7 +630,24 @@ linemap_add (line_maps *set, enum lc_reason reason, | ||
417 | if (to_file == NULL) | ||
418 | { | ||
419 | to_file = ORDINARY_MAP_FILE_NAME (from); | ||
420 | - to_line = SOURCE_LINE (from, from[1].start_location); | ||
421 | + /* Compute the line on which the map resumes, for #include this | ||
422 | + should be the line after the #include line. Usually FROM is | ||
423 | + the map right before LC_ENTER map - the first map of the included | ||
424 | + file, and in that case SOURCE_LINE (from, from[1].start_location); | ||
425 | + computes the right line (and does handle even some special cases | ||
426 | + (e.g. where for returning from <command line> we still want to | ||
427 | + be at line 0 or some -traditional-cpp cases). In rare cases | ||
428 | + FROM can be followed by LC_RENAME created by linemap_line_start | ||
429 | + for line right after #include line. If that happens, | ||
430 | + start_location of the FROM[1] map will be the same as | ||
431 | + start_location of FROM[2] LC_ENTER, but FROM[1] start_location | ||
432 | + might not have advance enough for moving to a full next line. | ||
433 | + In that case compute the line of #include line and add 1 to it | ||
434 | + to advance to the next line. See PR120061. */ | ||
435 | + if (from[1].reason == LC_RENAME) | ||
436 | + to_line = SOURCE_LINE (from, linemap_included_from (map - 1)) + 1; | ||
437 | + else | ||
438 | + to_line = SOURCE_LINE (from, from[1].start_location); | ||
439 | sysp = ORDINARY_MAP_IN_SYSTEM_HEADER_P (from); | ||
440 | } | ||
441 | else | ||
442 | @@ -660,11 +677,26 @@ linemap_add (line_maps *set, enum lc_reason reason, | ||
443 | if (set->depth == 0) | ||
444 | map->included_from = 0; | ||
445 | else | ||
446 | - /* The location of the end of the just-closed map. */ | ||
447 | - map->included_from | ||
448 | - = (((map[0].start_location - 1 - map[-1].start_location) | ||
449 | - & ~((loc_one << map[-1].m_column_and_range_bits) - 1)) | ||
450 | - + map[-1].start_location); | ||
451 | + { | ||
452 | + /* Compute location from whence this line map was included. | ||
453 | + For #include this should be preferrably column 0 of the | ||
454 | + line on which #include directive appears. | ||
455 | + map[-1] is the just closed map and usually included_from | ||
456 | + falls within that map. In rare cases linemap_line_start | ||
457 | + can insert a new LC_RENAME map for the line immediately | ||
458 | + after #include line, in that case map[-1] will have the | ||
459 | + same start_location as the new one and so included_from | ||
460 | + would not be from map[-1] but likely map[-2]. If that | ||
461 | + happens, mask off map[-2] m_column_and_range_bits bits | ||
462 | + instead of map[-1]. See PR120061. */ | ||
463 | + int i = -1; | ||
464 | + while (map[i].start_location == map[0].start_location) | ||
465 | + --i; | ||
466 | + map->included_from | ||
467 | + = (((map[0].start_location - 1 - map[i].start_location) | ||
468 | + & ~((loc_one << map[i].m_column_and_range_bits) - 1)) | ||
469 | + + map[i].start_location); | ||
470 | + } | ||
471 | set->depth++; | ||
472 | if (set->trace_includes) | ||
473 | trace_include (set, map); | ||
474 | -- | ||
475 | |||
diff --git a/meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-ed-style-patch.patch b/meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-ed-style-patch.patch deleted file mode 100644 index 78345e925e..0000000000 --- a/meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-ed-style-patch.patch +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | From 7f770b9c20da1a192dad8cb572a6391f2773285a Mon Sep 17 00:00:00 2001 | ||
2 | From: Jean Delvare <jdelvare@suse.de> | ||
3 | Date: Thu, 3 May 2018 14:31:55 +0200 | ||
4 | Subject: [PATCH 1/2] Don't leak temporary file on failed ed-style patch | ||
5 | |||
6 | Now that we write ed-style patches to a temporary file before we | ||
7 | apply them, we need to ensure that the temporary file is removed | ||
8 | before we leave, even on fatal error. | ||
9 | |||
10 | * src/pch.c (do_ed_script): Use global TMPEDNAME instead of local | ||
11 | tmpname. Don't unlink the file directly, instead tag it for removal | ||
12 | at exit time. | ||
13 | * src/patch.c (cleanup): Unlink TMPEDNAME at exit. | ||
14 | |||
15 | This closes bug #53820: | ||
16 | https://savannah.gnu.org/bugs/index.php?53820 | ||
17 | |||
18 | Fixes: 123eaff0d5d1 ("Fix arbitrary command execution in ed-style patches (CVE-2018-1000156)") | ||
19 | |||
20 | CVE: CVE-2018-1000156 | ||
21 | Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=19599883ffb6a450d2884f081f8ecf68edbed7ee] | ||
22 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
23 | --- | ||
24 | src/common.h | 2 ++ | ||
25 | src/pch.c | 12 +++++------- | ||
26 | 2 files changed, 7 insertions(+), 7 deletions(-) | ||
27 | |||
28 | diff --git a/src/common.h b/src/common.h | ||
29 | index ec50b40..22238b5 100644 | ||
30 | --- a/src/common.h | ||
31 | +++ b/src/common.h | ||
32 | @@ -94,10 +94,12 @@ XTERN char const *origsuff; | ||
33 | XTERN char const * TMPINNAME; | ||
34 | XTERN char const * TMPOUTNAME; | ||
35 | XTERN char const * TMPPATNAME; | ||
36 | +XTERN char const * TMPEDNAME; | ||
37 | |||
38 | XTERN bool TMPINNAME_needs_removal; | ||
39 | XTERN bool TMPOUTNAME_needs_removal; | ||
40 | XTERN bool TMPPATNAME_needs_removal; | ||
41 | +XTERN bool TMPEDNAME_needs_removal; | ||
42 | |||
43 | #ifdef DEBUGGING | ||
44 | XTERN int debug; | ||
45 | diff --git a/src/pch.c b/src/pch.c | ||
46 | index 16e001a..c1a62cf 100644 | ||
47 | --- a/src/pch.c | ||
48 | +++ b/src/pch.c | ||
49 | @@ -2392,7 +2392,6 @@ do_ed_script (char const *inname, char const *outname, | ||
50 | file_offset beginning_of_this_line; | ||
51 | size_t chars_read; | ||
52 | FILE *tmpfp = 0; | ||
53 | - char const *tmpname; | ||
54 | int tmpfd; | ||
55 | pid_t pid; | ||
56 | |||
57 | @@ -2404,12 +2403,13 @@ do_ed_script (char const *inname, char const *outname, | ||
58 | invalid commands and treats the next line as a new command, which | ||
59 | can lead to arbitrary command execution. */ | ||
60 | |||
61 | - tmpfd = make_tempfile (&tmpname, 'e', NULL, O_RDWR | O_BINARY, 0); | ||
62 | + tmpfd = make_tempfile (&TMPEDNAME, 'e', NULL, O_RDWR | O_BINARY, 0); | ||
63 | if (tmpfd == -1) | ||
64 | - pfatal ("Can't create temporary file %s", quotearg (tmpname)); | ||
65 | + pfatal ("Can't create temporary file %s", quotearg (TMPEDNAME)); | ||
66 | + TMPEDNAME_needs_removal = true; | ||
67 | tmpfp = fdopen (tmpfd, "w+b"); | ||
68 | if (! tmpfp) | ||
69 | - pfatal ("Can't open stream for file %s", quotearg (tmpname)); | ||
70 | + pfatal ("Can't open stream for file %s", quotearg (TMPEDNAME)); | ||
71 | } | ||
72 | |||
73 | for (;;) { | ||
74 | @@ -2449,8 +2449,7 @@ do_ed_script (char const *inname, char const *outname, | ||
75 | write_fatal (); | ||
76 | |||
77 | if (lseek (tmpfd, 0, SEEK_SET) == -1) | ||
78 | - pfatal ("Can't rewind to the beginning of file %s", quotearg (tmpname)); | ||
79 | - | ||
80 | + pfatal ("Can't rewind to the beginning of file %s", quotearg (TMPEDNAME)); | ||
81 | if (! dry_run && ! skip_rest_of_patch) { | ||
82 | int exclusive = *outname_needs_removal ? 0 : O_EXCL; | ||
83 | *outname_needs_removal = true; | ||
84 | @@ -2482,7 +2481,6 @@ do_ed_script (char const *inname, char const *outname, | ||
85 | } | ||
86 | |||
87 | fclose (tmpfp); | ||
88 | - safe_unlink (tmpname); | ||
89 | |||
90 | if (ofp) | ||
91 | { | ||
92 | -- | ||
93 | 2.17.0 | ||
94 | |||
diff --git a/meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-multi-file-ed.patch b/meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-multi-file-ed.patch deleted file mode 100644 index 8ffffef47e..0000000000 --- a/meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-multi-file-ed.patch +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | From 369dcccdfa6336e5a873d6d63705cfbe04c55727 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jean Delvare <jdelvare@suse.de> | ||
3 | Date: Mon, 7 May 2018 15:14:45 +0200 | ||
4 | Subject: Don't leak temporary file on failed multi-file ed-style patch | ||
5 | |||
6 | The previous fix worked fine with single-file ed-style patches, but | ||
7 | would still leak temporary files in the case of multi-file ed-style | ||
8 | patch. Fix that case as well, and extend the test case to check for | ||
9 | it. | ||
10 | |||
11 | * src/patch.c (main): Unlink TMPEDNAME if needed before moving to | ||
12 | the next file in a patch. | ||
13 | |||
14 | This closes bug #53820: | ||
15 | https://savannah.gnu.org/bugs/index.php?53820 | ||
16 | |||
17 | Fixes: 123eaff0d5d1 ("Fix arbitrary command execution in ed-style patches (CVE-2018-1000156)") | ||
18 | Fixes: 19599883ffb6 ("Don't leak temporary file on failed ed-style patch") | ||
19 | |||
20 | CVE: CVE-2018-1000156 | ||
21 | Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=369dcccdfa6336e5a873d6d63705cfbe04c55727] | ||
22 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
23 | --- | ||
24 | src/patch.c | 1 + | ||
25 | tests/ed-style | 31 +++++++++++++++++++++++++++++++ | ||
26 | 2 files changed, 32 insertions(+) | ||
27 | |||
28 | diff --git a/src/patch.c b/src/patch.c | ||
29 | index 9146597..81c7a02 100644 | ||
30 | --- a/src/patch.c | ||
31 | +++ b/src/patch.c | ||
32 | @@ -236,6 +236,7 @@ main (int argc, char **argv) | ||
33 | } | ||
34 | remove_if_needed (TMPOUTNAME, &TMPOUTNAME_needs_removal); | ||
35 | } | ||
36 | + remove_if_needed (TMPEDNAME, &TMPEDNAME_needs_removal); | ||
37 | |||
38 | if (! skip_rest_of_patch && ! file_type) | ||
39 | { | ||
40 | diff --git a/tests/ed-style b/tests/ed-style | ||
41 | index 6b6ef9d..504e6e5 100644 | ||
42 | --- a/tests/ed-style | ||
43 | +++ b/tests/ed-style | ||
44 | @@ -38,3 +38,34 @@ EOF | ||
45 | check 'cat foo' <<EOF | ||
46 | foo | ||
47 | EOF | ||
48 | + | ||
49 | +# Test the case where one ed-style patch modifies several files | ||
50 | + | ||
51 | +cat > ed3.diff <<EOF | ||
52 | +--- foo | ||
53 | ++++ foo | ||
54 | +1c | ||
55 | +bar | ||
56 | +. | ||
57 | +--- baz | ||
58 | ++++ baz | ||
59 | +0a | ||
60 | +baz | ||
61 | +. | ||
62 | +EOF | ||
63 | + | ||
64 | +# Apparently we can't create a file with such a patch, while it works fine | ||
65 | +# when the file name is provided on the command line | ||
66 | +cat > baz <<EOF | ||
67 | +EOF | ||
68 | + | ||
69 | +check 'patch -e -i ed3.diff' <<EOF | ||
70 | +EOF | ||
71 | + | ||
72 | +check 'cat foo' <<EOF | ||
73 | +bar | ||
74 | +EOF | ||
75 | + | ||
76 | +check 'cat baz' <<EOF | ||
77 | +baz | ||
78 | +EOF | ||
79 | -- | ||
80 | cgit v1.0-41-gc330 | ||
81 | |||
diff --git a/meta/recipes-devtools/patch/patch/0001-Fix-swapping-fake-lines-in-pch_swap.patch b/meta/recipes-devtools/patch/patch/0001-Fix-swapping-fake-lines-in-pch_swap.patch deleted file mode 100644 index 049149eb9e..0000000000 --- a/meta/recipes-devtools/patch/patch/0001-Fix-swapping-fake-lines-in-pch_swap.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From 9c986353e420ead6e706262bf204d6e03322c300 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andreas Gruenbacher <agruen@gnu.org> | ||
3 | Date: Fri, 17 Aug 2018 13:35:40 +0200 | ||
4 | Subject: [PATCH] Fix swapping fake lines in pch_swap | ||
5 | |||
6 | * src/pch.c (pch_swap): Fix swapping p_bfake and p_efake when there is a | ||
7 | blank line in the middle of a context-diff hunk: that empty line stays | ||
8 | in the middle of the hunk and isn't swapped. | ||
9 | |||
10 | Fixes: https://savannah.gnu.org/bugs/index.php?53133 | ||
11 | Signed-off-by: Andreas Gruenbacher <agruen@gnu.org> | ||
12 | |||
13 | Upstream-Status: Backport [https://git.savannah.gnu.org/git/patch.git] | ||
14 | CVE: CVE-2018-6952 | ||
15 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
16 | |||
17 | --- | ||
18 | src/pch.c | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/src/pch.c b/src/pch.c | ||
22 | index e92bc64..a500ad9 100644 | ||
23 | --- a/src/pch.c | ||
24 | +++ b/src/pch.c | ||
25 | @@ -2122,7 +2122,7 @@ pch_swap (void) | ||
26 | } | ||
27 | if (p_efake >= 0) { /* fix non-freeable ptr range */ | ||
28 | if (p_efake <= i) | ||
29 | - n = p_end - i + 1; | ||
30 | + n = p_end - p_ptrn_lines; | ||
31 | else | ||
32 | n = -i; | ||
33 | p_efake += n; | ||
34 | -- | ||
35 | 2.10.2 | ||
36 | |||
diff --git a/meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch b/meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch deleted file mode 100644 index d13d419f51..0000000000 --- a/meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From 3fcd042d26d70856e826a42b5f93dc4854d80bf0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andreas Gruenbacher <agruen@gnu.org> | ||
3 | Date: Fri, 6 Apr 2018 19:36:15 +0200 | ||
4 | Subject: [PATCH] Invoke ed directly instead of using the shell | ||
5 | |||
6 | * src/pch.c (do_ed_script): Invoke ed directly instead of using a shell | ||
7 | command to avoid quoting vulnerabilities. | ||
8 | |||
9 | CVE: CVE-2019-13638 CVE-2018-20969 | ||
10 | Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/patch.git/patch/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0] | ||
11 | Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> | ||
12 | |||
13 | --- | ||
14 | src/pch.c | 6 ++---- | ||
15 | 1 file changed, 2 insertions(+), 4 deletions(-) | ||
16 | |||
17 | |||
18 | diff --git a/src/pch.c b/src/pch.c | ||
19 | index 4fd5a05..16e001a 100644 | ||
20 | --- a/src/pch.c | ||
21 | +++ b/src/pch.c | ||
22 | @@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, | ||
23 | *outname_needs_removal = true; | ||
24 | copy_file (inname, outname, 0, exclusive, instat.st_mode, true); | ||
25 | } | ||
26 | - sprintf (buf, "%s %s%s", editor_program, | ||
27 | - verbosity == VERBOSE ? "" : "- ", | ||
28 | - outname); | ||
29 | fflush (stdout); | ||
30 | |||
31 | pid = fork(); | ||
32 | @@ -2470,7 +2467,8 @@ do_ed_script (char const *inname, char const *outname, | ||
33 | else if (pid == 0) | ||
34 | { | ||
35 | dup2 (tmpfd, 0); | ||
36 | - execl ("/bin/sh", "sh", "-c", buf, (char *) 0); | ||
37 | + assert (outname[0] != '!' && outname[0] != '-'); | ||
38 | + execlp (editor_program, editor_program, "-", outname, (char *) NULL); | ||
39 | _exit (2); | ||
40 | } | ||
41 | else | ||
42 | -- | ||
43 | 2.7.4 | ||
44 | |||
diff --git a/meta/recipes-devtools/patch/patch/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-devtools/patch/patch/0001-Unset-need_charset_alias-when-building-for-musl.patch deleted file mode 100644 index ba1a4bab4c..0000000000 --- a/meta/recipes-devtools/patch/patch/0001-Unset-need_charset_alias-when-building-for-musl.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 13 Apr 2015 17:02:13 -0700 | ||
4 | Subject: [PATCH] Unset need_charset_alias when building for musl | ||
5 | |||
6 | localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 | ||
7 | which actually shoudl be fixed in gnulib and then all downstream | ||
8 | projects will get it eventually. For now we apply the fix to | ||
9 | coreutils | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | lib/gnulib.mk | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/lib/gnulib.mk b/lib/gnulib.mk | ||
19 | index e1d74db..c0e92dd 100644 | ||
20 | --- a/lib/gnulib.mk | ||
21 | +++ b/lib/gnulib.mk | ||
22 | @@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local | ||
23 | case '$(host_os)' in \ | ||
24 | darwin[56]*) \ | ||
25 | need_charset_alias=true ;; \ | ||
26 | - darwin* | cygwin* | mingw* | pw32* | cegcc*) \ | ||
27 | + darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ | ||
28 | need_charset_alias=false ;; \ | ||
29 | *) \ | ||
30 | need_charset_alias=true ;; \ | ||
31 | -- | ||
32 | 2.1.4 | ||
33 | |||
diff --git a/meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch b/meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch deleted file mode 100644 index b0bd6fa83a..0000000000 --- a/meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From f290f48a621867084884bfff87f8093c15195e6a Mon Sep 17 00:00:00 2001 | ||
2 | From: Andreas Gruenbacher <agruen@gnu.org> | ||
3 | Date: Mon, 12 Feb 2018 16:48:24 +0100 | ||
4 | Subject: [PATCH] Fix segfault with mangled rename patch | ||
5 | |||
6 | http://savannah.gnu.org/bugs/?53132 | ||
7 | * src/pch.c (intuit_diff_type): Ensure that two filenames are specified | ||
8 | for renames and copies (fix the existing check). | ||
9 | |||
10 | Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=f290f48a621867084884bfff87f8093c15195e6a] | ||
11 | CVE: CVE-2018-6951 | ||
12 | |||
13 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
14 | |||
15 | --- | ||
16 | src/pch.c | 3 ++- | ||
17 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/src/pch.c b/src/pch.c | ||
20 | index ff9ed2c..bc6278c 100644 | ||
21 | --- a/src/pch.c | ||
22 | +++ b/src/pch.c | ||
23 | @@ -974,7 +974,8 @@ intuit_diff_type (bool need_header, mode_t *p_file_type) | ||
24 | if ((pch_rename () || pch_copy ()) | ||
25 | && ! inname | ||
26 | && ! ((i == OLD || i == NEW) && | ||
27 | - p_name[! reverse] && | ||
28 | + p_name[reverse] && p_name[! reverse] && | ||
29 | + name_is_valid (p_name[reverse]) && | ||
30 | name_is_valid (p_name[! reverse]))) | ||
31 | { | ||
32 | say ("Cannot %s file without two valid file names\n", pch_rename () ? "rename" : "copy"); | ||
33 | -- | ||
34 | 2.7.4 | ||
35 | |||
diff --git a/meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch b/meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch deleted file mode 100644 index 2a09d0c03b..0000000000 --- a/meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | From b5a91a01e5d0897facdd0f49d64b76b0f02b43e1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andreas Gruenbacher <agruen@gnu.org> | ||
3 | Date: Fri, 6 Apr 2018 11:34:51 +0200 | ||
4 | Subject: [PATCH] Allow input files to be missing for ed-style patches | ||
5 | |||
6 | * src/pch.c (do_ed_script): Allow input files to be missing so that new | ||
7 | files will be created as with non-ed-style patches. | ||
8 | |||
9 | Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=b5a91a01e5d0897facdd0f49d64b76b0f02b43e1] | ||
10 | CVE: CVE-2018-1000156 | ||
11 | |||
12 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
13 | --- | ||
14 | src/pch.c | 8 +++++--- | ||
15 | 1 file changed, 5 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/src/pch.c b/src/pch.c | ||
18 | index bc6278c..0c5cc26 100644 | ||
19 | --- a/src/pch.c | ||
20 | +++ b/src/pch.c | ||
21 | @@ -2394,9 +2394,11 @@ do_ed_script (char const *inname, char const *outname, | ||
22 | |||
23 | if (! dry_run && ! skip_rest_of_patch) { | ||
24 | int exclusive = *outname_needs_removal ? 0 : O_EXCL; | ||
25 | - assert (! inerrno); | ||
26 | - *outname_needs_removal = true; | ||
27 | - copy_file (inname, outname, 0, exclusive, instat.st_mode, true); | ||
28 | + if (inerrno != ENOENT) | ||
29 | + { | ||
30 | + *outname_needs_removal = true; | ||
31 | + copy_file (inname, outname, 0, exclusive, instat.st_mode, true); | ||
32 | + } | ||
33 | sprintf (buf, "%s %s%s", editor_program, | ||
34 | verbosity == VERBOSE ? "" : "- ", | ||
35 | outname); | ||
36 | -- | ||
37 | 2.7.4 | ||
38 | |||
diff --git a/meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch b/meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch deleted file mode 100644 index d74c2f182e..0000000000 --- a/meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch +++ /dev/null | |||
@@ -1,215 +0,0 @@ | |||
1 | From 123eaff0d5d1aebe128295959435b9ca5909c26d Mon Sep 17 00:00:00 2001 | ||
2 | From: Andreas Gruenbacher <agruen@gnu.org> | ||
3 | Date: Fri, 6 Apr 2018 12:14:49 +0200 | ||
4 | Subject: [PATCH] Fix arbitrary command execution in ed-style patches (CVE-2018-1000156) | ||
5 | |||
6 | * src/pch.c (do_ed_script): Write ed script to a temporary file instead | ||
7 | of piping it to ed: this will cause ed to abort on invalid commands | ||
8 | instead of rejecting them and carrying on. | ||
9 | * tests/ed-style: New test case. | ||
10 | * tests/Makefile.am (TESTS): Add test case. | ||
11 | |||
12 | Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=123eaff0d5d1aebe128295959435b9ca5909c26d] | ||
13 | CVE: CVE-2018-1000156 | ||
14 | |||
15 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
16 | --- | ||
17 | src/pch.c | 91 ++++++++++++++++++++++++++++++++++++++++--------------- | ||
18 | tests/Makefile.am | 1 + | ||
19 | tests/ed-style | 41 +++++++++++++++++++++++++ | ||
20 | 3 files changed, 108 insertions(+), 25 deletions(-) | ||
21 | create mode 100644 tests/ed-style | ||
22 | |||
23 | diff --git a/src/pch.c b/src/pch.c | ||
24 | index 0c5cc26..4fd5a05 100644 | ||
25 | --- a/src/pch.c | ||
26 | +++ b/src/pch.c | ||
27 | @@ -33,6 +33,7 @@ | ||
28 | # include <io.h> | ||
29 | #endif | ||
30 | #include <safe.h> | ||
31 | +#include <sys/wait.h> | ||
32 | |||
33 | #define INITHUNKMAX 125 /* initial dynamic allocation size */ | ||
34 | |||
35 | @@ -2389,24 +2390,28 @@ do_ed_script (char const *inname, char const *outname, | ||
36 | static char const editor_program[] = EDITOR_PROGRAM; | ||
37 | |||
38 | file_offset beginning_of_this_line; | ||
39 | - FILE *pipefp = 0; | ||
40 | size_t chars_read; | ||
41 | + FILE *tmpfp = 0; | ||
42 | + char const *tmpname; | ||
43 | + int tmpfd; | ||
44 | + pid_t pid; | ||
45 | + | ||
46 | + if (! dry_run && ! skip_rest_of_patch) | ||
47 | + { | ||
48 | + /* Write ed script to a temporary file. This causes ed to abort on | ||
49 | + invalid commands such as when line numbers or ranges exceed the | ||
50 | + number of available lines. When ed reads from a pipe, it rejects | ||
51 | + invalid commands and treats the next line as a new command, which | ||
52 | + can lead to arbitrary command execution. */ | ||
53 | + | ||
54 | + tmpfd = make_tempfile (&tmpname, 'e', NULL, O_RDWR | O_BINARY, 0); | ||
55 | + if (tmpfd == -1) | ||
56 | + pfatal ("Can't create temporary file %s", quotearg (tmpname)); | ||
57 | + tmpfp = fdopen (tmpfd, "w+b"); | ||
58 | + if (! tmpfp) | ||
59 | + pfatal ("Can't open stream for file %s", quotearg (tmpname)); | ||
60 | + } | ||
61 | |||
62 | - if (! dry_run && ! skip_rest_of_patch) { | ||
63 | - int exclusive = *outname_needs_removal ? 0 : O_EXCL; | ||
64 | - if (inerrno != ENOENT) | ||
65 | - { | ||
66 | - *outname_needs_removal = true; | ||
67 | - copy_file (inname, outname, 0, exclusive, instat.st_mode, true); | ||
68 | - } | ||
69 | - sprintf (buf, "%s %s%s", editor_program, | ||
70 | - verbosity == VERBOSE ? "" : "- ", | ||
71 | - outname); | ||
72 | - fflush (stdout); | ||
73 | - pipefp = popen(buf, binary_transput ? "wb" : "w"); | ||
74 | - if (!pipefp) | ||
75 | - pfatal ("Can't open pipe to %s", quotearg (buf)); | ||
76 | - } | ||
77 | for (;;) { | ||
78 | char ed_command_letter; | ||
79 | beginning_of_this_line = file_tell (pfp); | ||
80 | @@ -2417,14 +2422,14 @@ do_ed_script (char const *inname, char const *outname, | ||
81 | } | ||
82 | ed_command_letter = get_ed_command_letter (buf); | ||
83 | if (ed_command_letter) { | ||
84 | - if (pipefp) | ||
85 | - if (! fwrite (buf, sizeof *buf, chars_read, pipefp)) | ||
86 | + if (tmpfp) | ||
87 | + if (! fwrite (buf, sizeof *buf, chars_read, tmpfp)) | ||
88 | write_fatal (); | ||
89 | if (ed_command_letter != 'd' && ed_command_letter != 's') { | ||
90 | p_pass_comments_through = true; | ||
91 | while ((chars_read = get_line ()) != 0) { | ||
92 | - if (pipefp) | ||
93 | - if (! fwrite (buf, sizeof *buf, chars_read, pipefp)) | ||
94 | + if (tmpfp) | ||
95 | + if (! fwrite (buf, sizeof *buf, chars_read, tmpfp)) | ||
96 | write_fatal (); | ||
97 | if (chars_read == 2 && strEQ (buf, ".\n")) | ||
98 | break; | ||
99 | @@ -2437,13 +2442,49 @@ do_ed_script (char const *inname, char const *outname, | ||
100 | break; | ||
101 | } | ||
102 | } | ||
103 | - if (!pipefp) | ||
104 | + if (!tmpfp) | ||
105 | return; | ||
106 | - if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, pipefp) == 0 | ||
107 | - || fflush (pipefp) != 0) | ||
108 | + if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, tmpfp) == 0 | ||
109 | + || fflush (tmpfp) != 0) | ||
110 | write_fatal (); | ||
111 | - if (pclose (pipefp) != 0) | ||
112 | - fatal ("%s FAILED", editor_program); | ||
113 | + | ||
114 | + if (lseek (tmpfd, 0, SEEK_SET) == -1) | ||
115 | + pfatal ("Can't rewind to the beginning of file %s", quotearg (tmpname)); | ||
116 | + | ||
117 | + if (! dry_run && ! skip_rest_of_patch) { | ||
118 | + int exclusive = *outname_needs_removal ? 0 : O_EXCL; | ||
119 | + *outname_needs_removal = true; | ||
120 | + if (inerrno != ENOENT) | ||
121 | + { | ||
122 | + *outname_needs_removal = true; | ||
123 | + copy_file (inname, outname, 0, exclusive, instat.st_mode, true); | ||
124 | + } | ||
125 | + sprintf (buf, "%s %s%s", editor_program, | ||
126 | + verbosity == VERBOSE ? "" : "- ", | ||
127 | + outname); | ||
128 | + fflush (stdout); | ||
129 | + | ||
130 | + pid = fork(); | ||
131 | + if (pid == -1) | ||
132 | + pfatal ("Can't fork"); | ||
133 | + else if (pid == 0) | ||
134 | + { | ||
135 | + dup2 (tmpfd, 0); | ||
136 | + execl ("/bin/sh", "sh", "-c", buf, (char *) 0); | ||
137 | + _exit (2); | ||
138 | + } | ||
139 | + else | ||
140 | + { | ||
141 | + int wstatus; | ||
142 | + if (waitpid (pid, &wstatus, 0) == -1 | ||
143 | + || ! WIFEXITED (wstatus) | ||
144 | + || WEXITSTATUS (wstatus) != 0) | ||
145 | + fatal ("%s FAILED", editor_program); | ||
146 | + } | ||
147 | + } | ||
148 | + | ||
149 | + fclose (tmpfp); | ||
150 | + safe_unlink (tmpname); | ||
151 | |||
152 | if (ofp) | ||
153 | { | ||
154 | diff --git a/tests/Makefile.am b/tests/Makefile.am | ||
155 | index 6b6df63..16f8693 100644 | ||
156 | --- a/tests/Makefile.am | ||
157 | +++ b/tests/Makefile.am | ||
158 | @@ -32,6 +32,7 @@ TESTS = \ | ||
159 | crlf-handling \ | ||
160 | dash-o-append \ | ||
161 | deep-directories \ | ||
162 | + ed-style \ | ||
163 | empty-files \ | ||
164 | false-match \ | ||
165 | fifo \ | ||
166 | diff --git a/tests/ed-style b/tests/ed-style | ||
167 | new file mode 100644 | ||
168 | index 0000000..d8c0689 | ||
169 | --- /dev/null | ||
170 | +++ b/tests/ed-style | ||
171 | @@ -0,0 +1,41 @@ | ||
172 | +# Copyright (C) 2018 Free Software Foundation, Inc. | ||
173 | +# | ||
174 | +# Copying and distribution of this file, with or without modification, | ||
175 | +# in any medium, are permitted without royalty provided the copyright | ||
176 | +# notice and this notice are preserved. | ||
177 | + | ||
178 | +. $srcdir/test-lib.sh | ||
179 | + | ||
180 | +require cat | ||
181 | +use_local_patch | ||
182 | +use_tmpdir | ||
183 | + | ||
184 | +# ============================================================== | ||
185 | + | ||
186 | +cat > ed1.diff <<EOF | ||
187 | +0a | ||
188 | +foo | ||
189 | +. | ||
190 | +EOF | ||
191 | + | ||
192 | +check 'patch -e foo -i ed1.diff' <<EOF | ||
193 | +EOF | ||
194 | + | ||
195 | +check 'cat foo' <<EOF | ||
196 | +foo | ||
197 | +EOF | ||
198 | + | ||
199 | +cat > ed2.diff <<EOF | ||
200 | +1337a | ||
201 | +r !echo bar | ||
202 | +,p | ||
203 | +EOF | ||
204 | + | ||
205 | +check 'patch -e foo -i ed2.diff 2> /dev/null || echo "Status: $?"' <<EOF | ||
206 | +? | ||
207 | +Status: 2 | ||
208 | +EOF | ||
209 | + | ||
210 | +check 'cat foo' <<EOF | ||
211 | +foo | ||
212 | +EOF | ||
213 | -- | ||
214 | 2.7.4 | ||
215 | |||
diff --git a/meta/recipes-devtools/patch/patch/CVE-2019-13636.patch b/meta/recipes-devtools/patch/patch/CVE-2019-13636.patch deleted file mode 100644 index 8059d9fe19..0000000000 --- a/meta/recipes-devtools/patch/patch/CVE-2019-13636.patch +++ /dev/null | |||
@@ -1,113 +0,0 @@ | |||
1 | From dce4683cbbe107a95f1f0d45fabc304acfb5d71a Mon Sep 17 00:00:00 2001 | ||
2 | From: Andreas Gruenbacher <agruen@gnu.org> | ||
3 | Date: Mon, 15 Jul 2019 16:21:48 +0200 | ||
4 | Subject: Don't follow symlinks unless --follow-symlinks is given | ||
5 | |||
6 | * src/inp.c (plan_a, plan_b), src/util.c (copy_to_fd, copy_file, | ||
7 | append_to_file): Unless the --follow-symlinks option is given, open files with | ||
8 | the O_NOFOLLOW flag to avoid following symlinks. So far, we were only doing | ||
9 | that consistently for input files. | ||
10 | * src/util.c (create_backup): When creating empty backup files, (re)create them | ||
11 | with O_CREAT | O_EXCL to avoid following symlinks in that case as well. | ||
12 | |||
13 | CVE: CVE-2019-13636 | ||
14 | Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/patch.git/patch/?id=dce4683cbbe107a95f1f0d45fabc304acfb5d71a] | ||
15 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
16 | |||
17 | --- | ||
18 | src/inp.c | 12 ++++++++++-- | ||
19 | src/util.c | 14 +++++++++++--- | ||
20 | 2 files changed, 21 insertions(+), 5 deletions(-) | ||
21 | |||
22 | diff --git a/src/inp.c b/src/inp.c | ||
23 | index 32d0919..22d7473 100644 | ||
24 | --- a/src/inp.c | ||
25 | +++ b/src/inp.c | ||
26 | @@ -238,8 +238,13 @@ plan_a (char const *filename) | ||
27 | { | ||
28 | if (S_ISREG (instat.st_mode)) | ||
29 | { | ||
30 | - int ifd = safe_open (filename, O_RDONLY|binary_transput, 0); | ||
31 | + int flags = O_RDONLY | binary_transput; | ||
32 | size_t buffered = 0, n; | ||
33 | + int ifd; | ||
34 | + | ||
35 | + if (! follow_symlinks) | ||
36 | + flags |= O_NOFOLLOW; | ||
37 | + ifd = safe_open (filename, flags, 0); | ||
38 | if (ifd < 0) | ||
39 | pfatal ("can't open file %s", quotearg (filename)); | ||
40 | |||
41 | @@ -340,6 +345,7 @@ plan_a (char const *filename) | ||
42 | static void | ||
43 | plan_b (char const *filename) | ||
44 | { | ||
45 | + int flags = O_RDONLY | binary_transput; | ||
46 | int ifd; | ||
47 | FILE *ifp; | ||
48 | int c; | ||
49 | @@ -353,7 +359,9 @@ plan_b (char const *filename) | ||
50 | |||
51 | if (instat.st_size == 0) | ||
52 | filename = NULL_DEVICE; | ||
53 | - if ((ifd = safe_open (filename, O_RDONLY | binary_transput, 0)) < 0 | ||
54 | + if (! follow_symlinks) | ||
55 | + flags |= O_NOFOLLOW; | ||
56 | + if ((ifd = safe_open (filename, flags, 0)) < 0 | ||
57 | || ! (ifp = fdopen (ifd, binary_transput ? "rb" : "r"))) | ||
58 | pfatal ("Can't open file %s", quotearg (filename)); | ||
59 | if (TMPINNAME_needs_removal) | ||
60 | diff --git a/src/util.c b/src/util.c | ||
61 | index 1cc08ba..fb38307 100644 | ||
62 | --- a/src/util.c | ||
63 | +++ b/src/util.c | ||
64 | @@ -388,7 +388,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original) | ||
65 | |||
66 | try_makedirs_errno = ENOENT; | ||
67 | safe_unlink (bakname); | ||
68 | - while ((fd = safe_open (bakname, O_CREAT | O_WRONLY | O_TRUNC, 0666)) < 0) | ||
69 | + while ((fd = safe_open (bakname, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, 0666)) < 0) | ||
70 | { | ||
71 | if (errno != try_makedirs_errno) | ||
72 | pfatal ("Can't create file %s", quotearg (bakname)); | ||
73 | @@ -579,10 +579,13 @@ create_file (char const *file, int open_flags, mode_t mode, | ||
74 | static void | ||
75 | copy_to_fd (const char *from, int tofd) | ||
76 | { | ||
77 | + int from_flags = O_RDONLY | O_BINARY; | ||
78 | int fromfd; | ||
79 | ssize_t i; | ||
80 | |||
81 | - if ((fromfd = safe_open (from, O_RDONLY | O_BINARY, 0)) < 0) | ||
82 | + if (! follow_symlinks) | ||
83 | + from_flags |= O_NOFOLLOW; | ||
84 | + if ((fromfd = safe_open (from, from_flags, 0)) < 0) | ||
85 | pfatal ("Can't reopen file %s", quotearg (from)); | ||
86 | while ((i = read (fromfd, buf, bufsize)) != 0) | ||
87 | { | ||
88 | @@ -625,6 +628,8 @@ copy_file (char const *from, char const *to, struct stat *tost, | ||
89 | else | ||
90 | { | ||
91 | assert (S_ISREG (mode)); | ||
92 | + if (! follow_symlinks) | ||
93 | + to_flags |= O_NOFOLLOW; | ||
94 | tofd = create_file (to, O_WRONLY | O_BINARY | to_flags, mode, | ||
95 | to_dir_known_to_exist); | ||
96 | copy_to_fd (from, tofd); | ||
97 | @@ -640,9 +645,12 @@ copy_file (char const *from, char const *to, struct stat *tost, | ||
98 | void | ||
99 | append_to_file (char const *from, char const *to) | ||
100 | { | ||
101 | + int to_flags = O_WRONLY | O_APPEND | O_BINARY; | ||
102 | int tofd; | ||
103 | |||
104 | - if ((tofd = safe_open (to, O_WRONLY | O_BINARY | O_APPEND, 0)) < 0) | ||
105 | + if (! follow_symlinks) | ||
106 | + to_flags |= O_NOFOLLOW; | ||
107 | + if ((tofd = safe_open (to, to_flags, 0)) < 0) | ||
108 | pfatal ("Can't reopen file %s", quotearg (to)); | ||
109 | copy_to_fd (from, tofd); | ||
110 | if (close (tofd) != 0) | ||
111 | -- | ||
112 | cgit v1.0-41-gc330 | ||
113 | |||
diff --git a/meta/recipes-devtools/patch/patch/CVE-2019-20633.patch b/meta/recipes-devtools/patch/patch/CVE-2019-20633.patch deleted file mode 100644 index 9b2c07cf1e..0000000000 --- a/meta/recipes-devtools/patch/patch/CVE-2019-20633.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 15b158db3ae11cb835f2eb8d2eb48e09d1a4af48 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andreas Gruenbacher <agruen@gnu.org> | ||
3 | Date: Mon, 15 Jul 2019 19:10:02 +0200 | ||
4 | Subject: Avoid invalid memory access in context format diffs | ||
5 | |||
6 | * src/pch.c (another_hunk): Avoid invalid memory access in context format | ||
7 | diffs. | ||
8 | |||
9 | CVE: CVE-2019-20633 | ||
10 | Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/patch.git/patch/?id=15b158db3ae11cb835f2eb8d2eb48e09d1a4af48] | ||
11 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> | ||
12 | |||
13 | --- | ||
14 | src/pch.c | 1 + | ||
15 | 1 file changed, 1 insertion(+) | ||
16 | |||
17 | diff --git a/src/pch.c b/src/pch.c | ||
18 | index a500ad9..cb54e03 100644 | ||
19 | --- a/src/pch.c | ||
20 | +++ b/src/pch.c | ||
21 | @@ -1328,6 +1328,7 @@ another_hunk (enum diff difftype, bool rev) | ||
22 | ptrn_prefix_context = context; | ||
23 | ptrn_suffix_context = context; | ||
24 | if (repl_beginning | ||
25 | + || p_end <= 0 | ||
26 | || (p_end | ||
27 | != p_ptrn_lines + 1 + (p_Char[p_end - 1] == '\n'))) | ||
28 | { | ||
29 | -- | ||
30 | cgit v1.2.1 | ||
31 | |||
diff --git a/meta/recipes-devtools/patch/patch_2.7.6.bb b/meta/recipes-devtools/patch/patch_2.7.6.bb deleted file mode 100644 index 3dc3b5863c..0000000000 --- a/meta/recipes-devtools/patch/patch_2.7.6.bb +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | require patch.inc | ||
2 | LICENSE = "GPL-3.0-only" | ||
3 | |||
4 | SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ | ||
5 | file://0002-Fix-segfault-with-mangled-rename-patch.patch \ | ||
6 | file://0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch \ | ||
7 | file://0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch \ | ||
8 | file://0001-Fix-swapping-fake-lines-in-pch_swap.patch \ | ||
9 | file://CVE-2019-13636.patch \ | ||
10 | file://0001-Invoke-ed-directly-instead-of-using-the-shell.patch \ | ||
11 | file://0001-Don-t-leak-temporary-file-on-failed-ed-style-patch.patch \ | ||
12 | file://0001-Don-t-leak-temporary-file-on-failed-multi-file-ed.patch \ | ||
13 | file://CVE-2019-20633.patch \ | ||
14 | " | ||
15 | |||
16 | SRC_URI[sha256sum] = "8cf86e00ad3aaa6d26aca30640e86b0e3e1f395ed99f189b06d4c9f74bc58a4e" | ||
17 | |||
18 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
19 | |||
20 | PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)}" | ||
21 | PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr," | ||
22 | |||
23 | PROVIDES:append:class-native = " patch-replacement-native" | ||
24 | |||
25 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta/recipes-devtools/patch/patch_2.8.bb b/meta/recipes-devtools/patch/patch_2.8.bb new file mode 100644 index 0000000000..6317ac775d --- /dev/null +++ b/meta/recipes-devtools/patch/patch_2.8.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | require patch.inc | ||
2 | LICENSE = "GPL-3.0-only" | ||
3 | |||
4 | SRC_URI[sha256sum] = "308a4983ff324521b9b21310bfc2398ca861798f02307c79eb99bb0e0d2bf980" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
7 | |||
8 | PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)}" | ||
9 | PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr," | ||
10 | |||
11 | PROVIDES:append:class-native = " patch-replacement-native" | ||
12 | |||
13 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb index d7528d336b..4693afcaf6 100644 --- a/meta/recipes-devtools/pseudo/pseudo_git.bb +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb | |||
@@ -25,3 +25,10 @@ TARGET_CC_ARCH:remove = "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS | |||
25 | 25 | ||
26 | # error: use of undeclared identifier '_STAT_VER' | 26 | # error: use of undeclared identifier '_STAT_VER' |
27 | COMPATIBLE_HOST:libc-musl = 'null' | 27 | COMPATIBLE_HOST:libc-musl = 'null' |
28 | |||
29 | #| ./ports/linux/pseudo_wrappers.c:80:14: error: use of unknown builtin '__builtin_apply' [-Wimplicit-function-declaration] | ||
30 | #| void *res = __builtin_apply((void (*)()) real_syscall, __builtin_apply_args(), sizeof(long) * 7); | ||
31 | #| ^ | ||
32 | #| ./ports/linux/pseudo_wrappers.c:80:57: error: use of unknown builtin '__builtin_apply_args' [-Wimplicit-function-declaration] | ||
33 | #| void *res = __builtin_apply((void (*)()) real_syscall, __builtin_apply_args(), sizeof(long) * 7); | ||
34 | TOOLCHAIN = "gcc" | ||
diff --git a/meta/recipes-devtools/python/python3-numpy_2.2.5.bb b/meta/recipes-devtools/python/python3-numpy_2.2.6.bb index f963e15b83..10468d6850 100644 --- a/meta/recipes-devtools/python/python3-numpy_2.2.5.bb +++ b/meta/recipes-devtools/python/python3-numpy_2.2.6.bb | |||
@@ -12,7 +12,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${SRCNAME}-${PV}.tar.gz \ | |||
12 | file://fix_reproducibility.patch \ | 12 | file://fix_reproducibility.patch \ |
13 | file://run-ptest \ | 13 | file://run-ptest \ |
14 | " | 14 | " |
15 | SRC_URI[sha256sum] = "a9c0d994680cd991b1cb772e8b297340085466a6fe964bc9d4e80f5e2f43c291" | 15 | SRC_URI[sha256sum] = "e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd" |
16 | 16 | ||
17 | GITHUB_BASE_URI = "https://github.com/numpy/numpy/releases" | 17 | GITHUB_BASE_URI = "https://github.com/numpy/numpy/releases" |
18 | UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)$" | 18 | UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)$" |
diff --git a/meta/recipes-devtools/python/python3-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch b/meta/recipes-devtools/python/python3-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch deleted file mode 100644 index 785a2192c3..0000000000 --- a/meta/recipes-devtools/python/python3-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From 92363514224b0aeba065f83b868a15a2a03601ab Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Tue, 17 Jul 2018 10:13:38 +0800 | ||
4 | Subject: [PATCH] conditionally do not fetch code by easy_install | ||
5 | |||
6 | If NO_FETCH_BUILD is set, do not fetch code in easy_install. This avoids setup.py | ||
7 | trying to fetch missing dependencies at build time. | ||
8 | |||
9 | This is only used by the deprecated codepath as implemented by setuptools3.bbclass, so | ||
10 | when that ever gets removed this patch can also be deleted. | ||
11 | |||
12 | Upstream-Status: Denied [https://github.com/pypa/setuptools/issues/4735] | ||
13 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
14 | |||
15 | Update to apply against v75.6.0. | ||
16 | |||
17 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
18 | --- | ||
19 | setuptools/command/easy_install.py | 5 +++++ | ||
20 | 1 file changed, 5 insertions(+) | ||
21 | |||
22 | diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py | ||
23 | index eb1b4c1..4fd8d14 100644 | ||
24 | --- a/setuptools/command/easy_install.py | ||
25 | +++ b/setuptools/command/easy_install.py | ||
26 | @@ -672,6 +672,11 @@ class easy_install(Command): | ||
27 | os.path.exists(tmpdir) and _rmtree(tmpdir) | ||
28 | |||
29 | def easy_install(self, spec, deps: bool = False) -> Distribution | None: | ||
30 | + if os.environ.get('NO_FETCH_BUILD', None): | ||
31 | + log.error("ERROR: Do not try to fetch `%s' for building. " | ||
32 | + "Please add its native recipe to DEPENDS." % spec) | ||
33 | + return None | ||
34 | + | ||
35 | with self._tmpdir() as tmpdir: | ||
36 | if not isinstance(spec, Requirement): | ||
37 | if URL_SCHEME(spec): | ||
diff --git a/meta/recipes-devtools/python/python3-setuptools_78.1.0.bb b/meta/recipes-devtools/python/python3-setuptools_80.8.0.bb index 7455ec41af..327eff5700 100644 --- a/meta/recipes-devtools/python/python3-setuptools_78.1.0.bb +++ b/meta/recipes-devtools/python/python3-setuptools_80.8.0.bb | |||
@@ -8,12 +8,10 @@ inherit pypi python_setuptools_build_meta | |||
8 | 8 | ||
9 | CVE_PRODUCT = "python3-setuptools python:setuptools" | 9 | CVE_PRODUCT = "python3-setuptools python:setuptools" |
10 | 10 | ||
11 | SRC_URI:append:class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch" | ||
12 | |||
13 | SRC_URI += " \ | 11 | SRC_URI += " \ |
14 | file://0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch" | 12 | file://0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch" |
15 | 13 | ||
16 | SRC_URI[sha256sum] = "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" | 14 | SRC_URI[sha256sum] = "49f7af965996f26d43c8ae34539c8d99c5042fbff34302ea151eaa9c207cd257" |
17 | 15 | ||
18 | DEPENDS += "python3" | 16 | DEPENDS += "python3" |
19 | 17 | ||
diff --git a/meta/recipes-devtools/qemu/qemu_10.0.0.bb b/meta/recipes-devtools/qemu/qemu_10.0.0.bb index dc1352232e..5d544d8d13 100644 --- a/meta/recipes-devtools/qemu/qemu_10.0.0.bb +++ b/meta/recipes-devtools/qemu/qemu_10.0.0.bb | |||
@@ -7,6 +7,7 @@ DEPENDS += "glib-2.0 zlib pixman" | |||
7 | DEPENDS:append:libc-musl = " libucontext" | 7 | DEPENDS:append:libc-musl = " libucontext" |
8 | 8 | ||
9 | CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" | 9 | CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" |
10 | LDFLAGS:append:toolchain-clang:x86 = " -latomic" | ||
10 | 11 | ||
11 | RDEPENDS:${PN}-common:class-target += "bash" | 12 | RDEPENDS:${PN}-common:class-target += "bash" |
12 | 13 | ||
diff --git a/meta/recipes-devtools/rpm/rpm_4.20.0.bb b/meta/recipes-devtools/rpm/rpm_4.20.0.bb index 281fde1c82..bcc138dab0 100644 --- a/meta/recipes-devtools/rpm/rpm_4.20.0.bb +++ b/meta/recipes-devtools/rpm/rpm_4.20.0.bb | |||
@@ -62,6 +62,10 @@ OECMAKE_GENERATOR = "Unix Makefiles" | |||
62 | 62 | ||
63 | BBCLASSEXTEND = "native nativesdk" | 63 | BBCLASSEXTEND = "native nativesdk" |
64 | 64 | ||
65 | # Clang results in a reproducibility issue | ||
66 | # https://github.com/llvm/llvm-project/issues/82541 | ||
67 | TOOLCHAIN = "gcc" | ||
68 | |||
65 | PACKAGECONFIG ??= "archive" | 69 | PACKAGECONFIG ??= "archive" |
66 | 70 | ||
67 | PACKAGECONFIG[plugins] = "-DENABLE_PLUGINS=ON,-DENABLE_PLUGINS=OFF" | 71 | PACKAGECONFIG[plugins] = "-DENABLE_PLUGINS=ON,-DENABLE_PLUGINS=OFF" |
diff --git a/meta/recipes-devtools/rust/rust_1.85.1.bb b/meta/recipes-devtools/rust/rust_1.85.1.bb index dc4f564855..f289db6306 100644 --- a/meta/recipes-devtools/rust/rust_1.85.1.bb +++ b/meta/recipes-devtools/rust/rust_1.85.1.bb | |||
@@ -7,17 +7,12 @@ LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=9c0fae516fe8aaea2fb601db4800daf7" | |||
7 | inherit rust | 7 | inherit rust |
8 | inherit cargo_common | 8 | inherit cargo_common |
9 | 9 | ||
10 | DEPENDS += "file-native python3-native" | 10 | DEPENDS += "rust-llvm" |
11 | DEPENDS:append:class-native = " rust-llvm-native" | ||
12 | DEPENDS:append:class-nativesdk = " nativesdk-rust-llvm" | ||
13 | |||
14 | # native rust uses cargo/rustc from binary snapshots to bootstrap | 11 | # native rust uses cargo/rustc from binary snapshots to bootstrap |
15 | # but everything else should use our native builds | 12 | # but everything else should use our native builds |
16 | DEPENDS:append:class-target = " cargo-native rust-native" | 13 | DEPENDS:append:class-target = " cargo-native rust-native" |
17 | DEPENDS:append:class-nativesdk = " cargo-native rust-native" | 14 | DEPENDS:append:class-nativesdk = " cargo-native rust-native" |
18 | 15 | ||
19 | DEPENDS += "rust-llvm (=${PV})" | ||
20 | |||
21 | RDEPENDS:${PN}:append:class-target = " gcc g++ binutils" | 16 | RDEPENDS:${PN}:append:class-target = " gcc g++ binutils" |
22 | 17 | ||
23 | # Otherwise we'll depend on what we provide | 18 | # Otherwise we'll depend on what we provide |
@@ -64,7 +59,7 @@ do_rust_setup_snapshot () { | |||
64 | # are used internally by rust and result in symbol mismatches if we don't | 59 | # are used internally by rust and result in symbol mismatches if we don't |
65 | if [ ! -z "${UNINATIVE_LOADER}" -a -e "${UNINATIVE_LOADER}" ]; then | 60 | if [ ! -z "${UNINATIVE_LOADER}" -a -e "${UNINATIVE_LOADER}" ]; then |
66 | for bin in cargo rustc rustdoc; do | 61 | for bin in cargo rustc rustdoc; do |
67 | patchelf-uninative ${WORKDIR}/rust-snapshot/bin/$bin --set-interpreter ${UNINATIVE_LOADER} | 62 | patchelf ${WORKDIR}/rust-snapshot/bin/$bin --set-interpreter ${UNINATIVE_LOADER} |
68 | done | 63 | done |
69 | fi | 64 | fi |
70 | } | 65 | } |
@@ -72,6 +67,7 @@ addtask rust_setup_snapshot after do_unpack before do_configure | |||
72 | addtask do_test_compile after do_configure do_rust_gen_targets | 67 | addtask do_test_compile after do_configure do_rust_gen_targets |
73 | do_rust_setup_snapshot[dirs] += "${WORKDIR}/rust-snapshot" | 68 | do_rust_setup_snapshot[dirs] += "${WORKDIR}/rust-snapshot" |
74 | do_rust_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER" | 69 | do_rust_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER" |
70 | do_rust_setup_snapshot[depends] += "patchelf-native:do_populate_sysroot" | ||
75 | 71 | ||
76 | RUSTC_BOOTSTRAP = "${STAGING_BINDIR_NATIVE}/rustc" | 72 | RUSTC_BOOTSTRAP = "${STAGING_BINDIR_NATIVE}/rustc" |
77 | CARGO_BOOTSTRAP = "${STAGING_BINDIR_NATIVE}/cargo" | 73 | CARGO_BOOTSTRAP = "${STAGING_BINDIR_NATIVE}/cargo" |
@@ -207,9 +203,9 @@ rust_runx () { | |||
207 | mkdir -p `dirname ${RUST_ALTERNATE_EXE_PATH}` | 203 | mkdir -p `dirname ${RUST_ALTERNATE_EXE_PATH}` |
208 | cp ${RUST_ALTERNATE_EXE_PATH_NATIVE} ${RUST_ALTERNATE_EXE_PATH} | 204 | cp ${RUST_ALTERNATE_EXE_PATH_NATIVE} ${RUST_ALTERNATE_EXE_PATH} |
209 | if [ -e ${STAGING_LIBDIR_NATIVE}/libc++.so.1 ]; then | 205 | if [ -e ${STAGING_LIBDIR_NATIVE}/libc++.so.1 ]; then |
210 | chrpath -r \$ORIGIN/../../../../../`basename ${STAGING_DIR_NATIVE}`${libdir_native} ${RUST_ALTERNATE_EXE_PATH} | 206 | patchelf --set-rpath \$ORIGIN/../../../../../`basename ${STAGING_DIR_NATIVE}`${libdir_native} ${RUST_ALTERNATE_EXE_PATH} |
211 | else | 207 | else |
212 | chrpath -d ${RUST_ALTERNATE_EXE_PATH} | 208 | patchelf --remove-rpath ${RUST_ALTERNATE_EXE_PATH} |
213 | fi | 209 | fi |
214 | fi | 210 | fi |
215 | 211 | ||
@@ -266,7 +262,7 @@ rust_do_install:class-nativesdk() { | |||
266 | install -d ${D}${bindir} | 262 | install -d ${D}${bindir} |
267 | for i in cargo-clippy clippy-driver rustfmt; do | 263 | for i in cargo-clippy clippy-driver rustfmt; do |
268 | cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir} | 264 | cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir} |
269 | chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i | 265 | patchelf --set-rpath "\$ORIGIN/../lib" ${D}${bindir}/$i |
270 | done | 266 | done |
271 | 267 | ||
272 | chown root:root ${D}/ -R | 268 | chown root:root ${D}/ -R |
@@ -301,7 +297,7 @@ rust_do_install:class-target() { | |||
301 | install -d ${D}${bindir} | 297 | install -d ${D}${bindir} |
302 | for i in ${EXTRA_TOOLS}; do | 298 | for i in ${EXTRA_TOOLS}; do |
303 | cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir} | 299 | cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir} |
304 | chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i | 300 | patchelf --set-rpath "\$ORIGIN/../lib" ${D}${bindir}/$i |
305 | done | 301 | done |
306 | 302 | ||
307 | install -d ${D}${libdir}/rustlib/${RUST_HOST_SYS} | 303 | install -d ${D}${libdir}/rustlib/${RUST_HOST_SYS} |
diff --git a/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb b/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb index 1e65616081..449a75ebf8 100644 --- a/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb +++ b/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb | |||
@@ -130,3 +130,8 @@ FILES:${PN}-staticdev += "${datadir}/${BPN}/com32/lib*.a ${libdir}/${BPN}/com32/ | |||
130 | FILES:${PN}-misc = "${datadir}/${BPN}/* ${libdir}/${BPN}/* ${bindir}/*" | 130 | FILES:${PN}-misc = "${datadir}/${BPN}/* ${libdir}/${BPN}/* ${bindir}/*" |
131 | 131 | ||
132 | BBCLASSEXTEND = "native nativesdk" | 132 | BBCLASSEXTEND = "native nativesdk" |
133 | |||
134 | # com32/lib/../include/stdarg.h:9:15: fatal error: 'stdarg.h' file not found | ||
135 | # 9 | #include_next <stdarg.h> | ||
136 | # | ^~~~~~~~~~ | ||
137 | TOOLCHAIN = "gcc" | ||
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.25.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.25.1.bb index 6650dcedbf..a8b0be5767 100644 --- a/meta/recipes-devtools/valgrind/valgrind_3.25.0.bb +++ b/meta/recipes-devtools/valgrind/valgrind_3.25.1.bb | |||
@@ -27,7 +27,7 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \ | |||
27 | file://0001-tests-arm-Use-O-instead-of-O0.patch \ | 27 | file://0001-tests-arm-Use-O-instead-of-O0.patch \ |
28 | file://0001-Use-portable-syntax-for-pushsection-directive-in-inl.patch \ | 28 | file://0001-Use-portable-syntax-for-pushsection-directive-in-inl.patch \ |
29 | " | 29 | " |
30 | SRC_URI[sha256sum] = "295f60291d6b64c0d90c1ce645634bdc5361d39b0c50ecf9de6385ee77586ecc" | 30 | SRC_URI[sha256sum] = "61deb8d0727b45c268efdc1b3b6c9e679cd97cbf5ee4b28d1dead7c8b7a271af" |
31 | UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar" | 31 | UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar" |
32 | 32 | ||
33 | COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64|riscv64).*-linux' | 33 | COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64|riscv64).*-linux' |
@@ -106,3 +106,11 @@ INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libexecdir}/valgrind/vgpreload_memcheck- | |||
106 | # valgrind needs debug information for ld.so at runtime in order to | 106 | # valgrind needs debug information for ld.so at runtime in order to |
107 | # redirect functions like strlen. | 107 | # redirect functions like strlen. |
108 | RRECOMMENDS:${PN} += "${TCLIBC}-dbg" | 108 | RRECOMMENDS:${PN} += "${TCLIBC}-dbg" |
109 | |||
110 | # Valgrind needs intrinsics which are not provided by clang | ||
111 | # m_signals.c:2213:7: error: __builtin_longjmp is not supported for the current target | ||
112 | # 2213 | VG_MINIMAL_LONGJMP(tst->sched_jmpbuf); | ||
113 | # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
114 | # | ||
115 | # It needs something like - https://bugs.kde.org/show_bug.cgi?id=369723 | ||
116 | TOOLCHAIN:riscv64 = "gcc" | ||
diff --git a/meta/recipes-extended/less/less_668.bb b/meta/recipes-extended/less/less_678.bb index 63fc367e33..87ec6c92ca 100644 --- a/meta/recipes-extended/less/less_668.bb +++ b/meta/recipes-extended/less/less_678.bb | |||
@@ -21,7 +21,7 @@ SECTION = "console/utils" | |||
21 | 21 | ||
22 | LICENSE = "GPL-3.0-or-later | BSD-2-Clause" | 22 | LICENSE = "GPL-3.0-or-later | BSD-2-Clause" |
23 | LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \ | 23 | LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \ |
24 | file://LICENSE;md5=ea7ea443692720f3015859945c0fb65d \ | 24 | file://LICENSE;md5=8051a271adb36d1462531a3b40c22878 \ |
25 | " | 25 | " |
26 | DEPENDS = "ncurses" | 26 | DEPENDS = "ncurses" |
27 | 27 | ||
@@ -29,7 +29,7 @@ SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \ | |||
29 | file://run-ptest \ | 29 | file://run-ptest \ |
30 | " | 30 | " |
31 | 31 | ||
32 | SRC_URI[sha256sum] = "2819f55564d86d542abbecafd82ff61e819a3eec967faa36cd3e68f1596a44b8" | 32 | SRC_URI[sha256sum] = "4c085364f3028290d34647df27f56018c365dc4c0092ab7de74ed8fe89014fe7" |
33 | 33 | ||
34 | UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html" | 34 | UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html" |
35 | 35 | ||
diff --git a/meta/recipes-extended/ltp/ltp/0001-cve-2015-3290-Disable-AVX-for-x86_64.patch b/meta/recipes-extended/ltp/ltp/0001-cve-2015-3290-Disable-AVX-for-x86_64.patch new file mode 100644 index 0000000000..c6fae88eb9 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-cve-2015-3290-Disable-AVX-for-x86_64.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 28d823a63ee29f5d72c2aba781a06a7e2651cadc Mon Sep 17 00:00:00 2001 | ||
2 | From: Siddhesh Poyarekar <siddhesh@gotplt.org> | ||
3 | Date: Mon, 7 Apr 2025 06:24:47 -0400 | ||
4 | Subject: [PATCH] cve-2015-3290: Disable AVX for x86_64 | ||
5 | |||
6 | When the input compiler enables AVX, stack realignment requirements | ||
7 | causes gcc to fail to omit %rbp use, due to which the test fails to | ||
8 | clobber %rbp in inline asm. Disable AVX to build the test on x86_64 so | ||
9 | that the test continues working. | ||
10 | |||
11 | Link: https://lore.kernel.org/ltp/20250407102448.2605506-2-siddhesh@gotplt.org/ | ||
12 | |||
13 | Upstream-Status: Backport [https://github.com/linux-test-project/ltp/commit/28d823a63ee29f5d72c2aba781a06a7e2651cadc] | ||
14 | |||
15 | Reviewed-by: Martin Doucha <mdoucha@suse.cz> | ||
16 | Reviewed-by: Petr Vorel <pvorel@suse.cz> | ||
17 | Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org> | ||
18 | |||
19 | --- | ||
20 | testcases/cve/Makefile | 6 ++++++ | ||
21 | 1 file changed, 6 insertions(+) | ||
22 | |||
23 | diff --git a/testcases/cve/Makefile b/testcases/cve/Makefile | ||
24 | index 01b9b9ccb..98c38e908 100644 | ||
25 | --- a/testcases/cve/Makefile | ||
26 | +++ b/testcases/cve/Makefile | ||
27 | @@ -22,6 +22,12 @@ ifneq (,$(filter $(HOST_CPU),x86 x86_64)) | ||
28 | meltdown: CFLAGS += -msse2 | ||
29 | endif | ||
30 | |||
31 | +# The test needs to clobber %rbp, which requires frame pointer omission. Also | ||
32 | +# for x86_64, disable AVX since that could sometimes require a stack | ||
33 | +# realignment, which gets in the way of frame pointer omission. | ||
34 | cve-2015-3290: CFLAGS += -pthread -fomit-frame-pointer | ||
35 | +ifeq ($(HOST_CPU),x86_64) | ||
36 | +cve-2015-3290: CFLAGS += -mno-avx | ||
37 | +endif | ||
38 | |||
39 | include $(top_srcdir)/include/mk/generic_leaf_target.mk | ||
40 | -- | ||
41 | 2.37.3 | ||
42 | |||
diff --git a/meta/recipes-extended/ltp/ltp_20250130.bb b/meta/recipes-extended/ltp/ltp_20250130.bb index 690224e6d7..f9521acbc6 100644 --- a/meta/recipes-extended/ltp/ltp_20250130.bb +++ b/meta/recipes-extended/ltp/ltp_20250130.bb | |||
@@ -30,6 +30,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=ht | |||
30 | file://0001-Remove-OOM-tests-from-runtest-mm.patch \ | 30 | file://0001-Remove-OOM-tests-from-runtest-mm.patch \ |
31 | file://0001-Add-__clear_cache-declaration-for-clang.patch \ | 31 | file://0001-Add-__clear_cache-declaration-for-clang.patch \ |
32 | file://0001-kernel-kvm-don-t-hardcode-objcopy.patch \ | 32 | file://0001-kernel-kvm-don-t-hardcode-objcopy.patch \ |
33 | file://0001-cve-2015-3290-Disable-AVX-for-x86_64.patch \ | ||
33 | " | 34 | " |
34 | 35 | ||
35 | S = "${WORKDIR}/git" | 36 | S = "${WORKDIR}/git" |
diff --git a/meta/recipes-extended/man-pages/man-pages_6.13.bb b/meta/recipes-extended/man-pages/man-pages_6.14.bb index a2e6a89843..92afff640d 100644 --- a/meta/recipes-extended/man-pages/man-pages_6.13.bb +++ b/meta/recipes-extended/man-pages/man-pages_6.14.bb | |||
@@ -20,7 +20,7 @@ LIC_FILES_CHKSUM = "file://README;md5=72cff06b7954222c24d38bc2c41b234e \ | |||
20 | SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/${BP}.tar.gz \ | 20 | SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/${BP}.tar.gz \ |
21 | " | 21 | " |
22 | 22 | ||
23 | SRC_URI[sha256sum] = "869a682be64ee634149f62b4bcbd8334fd1e400883181618d7164a43de6a3aa1" | 23 | SRC_URI[sha256sum] = "a298963d8baf37fa5ecd2b07c803e1f29ab0476add405a7e263e5c63baf43588" |
24 | 24 | ||
25 | inherit manpages lib_package | 25 | inherit manpages lib_package |
26 | 26 | ||
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 07a57b11c8..7c067420c1 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc | |||
@@ -20,8 +20,8 @@ SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \ | |||
20 | file://0001-dont-build-clover-frontend.patch \ | 20 | file://0001-dont-build-clover-frontend.patch \ |
21 | " | 21 | " |
22 | 22 | ||
23 | SRC_URI[sha256sum] = "b1c45888969ee5df997e2542654f735ab1b772924b442f3016d2293414c99c14" | 23 | SRC_URI[sha256sum] = "cf942a18b7b9e9b88524dcbf0b31fed3cde18e6d52b3375b0ab6587a14415bce" |
24 | PV = "25.1.0" | 24 | PV = "25.1.1" |
25 | 25 | ||
26 | UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)" | 26 | UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)" |
27 | 27 | ||
@@ -33,15 +33,21 @@ do_install:append() { | |||
33 | if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)} && [ -f ${D}${includedir}/EGL/eglplatform.h ]; then | 33 | if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)} && [ -f ${D}${includedir}/EGL/eglplatform.h ]; then |
34 | sed -i -e 's/^#elif defined(__unix__) && defined(EGL_NO_X11)$/#elif defined(__unix__) \&\& defined(EGL_NO_X11) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h | 34 | sed -i -e 's/^#elif defined(__unix__) && defined(EGL_NO_X11)$/#elif defined(__unix__) \&\& defined(EGL_NO_X11) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h |
35 | fi | 35 | fi |
36 | # These are ICDs, apps are not supposed to link against them | ||
37 | if ${@bb.utils.contains('PACKAGECONFIG', 'glvnd', 'true', 'false', d)} ; then | ||
38 | rm -f ${D}${libdir}/libEGL_mesa.so ${D}${libdir}/libGLX_mesa.so | ||
39 | fi | ||
36 | } | 40 | } |
37 | 41 | ||
38 | DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native python3-pyyaml-native" | 42 | DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native python3-pyyaml-native" |
39 | EXTRANATIVEPATH += "chrpath-native" | 43 | EXTRANATIVEPATH += "chrpath-native" |
40 | PROVIDES = " \ | 44 | GLPROVIDES = " \ |
41 | ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \ | 45 | ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \ |
42 | ${@bb.utils.contains('PACKAGECONFIG', 'glvnd', 'virtual/libglx', '', d)} \ | ||
43 | ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2 virtual/libgles3', '', d)} \ | 46 | ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2 virtual/libgles3', '', d)} \ |
44 | ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \ | 47 | ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \ |
48 | " | ||
49 | PROVIDES = " \ | ||
50 | ${@bb.utils.contains('PACKAGECONFIG', 'glvnd', '', d.getVar('GLPROVIDES'), d)} \ | ||
45 | ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \ | 51 | ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \ |
46 | virtual/mesa \ | 52 | virtual/mesa \ |
47 | " | 53 | " |
@@ -68,7 +74,6 @@ def check_buildtype(d): | |||
68 | MESON_BUILDTYPE = "${@check_buildtype(d)}" | 74 | MESON_BUILDTYPE = "${@check_buildtype(d)}" |
69 | 75 | ||
70 | EXTRA_OEMESON = " \ | 76 | EXTRA_OEMESON = " \ |
71 | -Dshared-glapi=enabled \ | ||
72 | -Dglx-read-only-text=true \ | 77 | -Dglx-read-only-text=true \ |
73 | -Dplatforms='${@",".join("${PLATFORMS}".split())}' \ | 78 | -Dplatforms='${@",".join("${PLATFORMS}".split())}' \ |
74 | " | 79 | " |
@@ -102,7 +107,7 @@ PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}" | |||
102 | PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols" | 107 | PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols" |
103 | 108 | ||
104 | VULKAN_DRIVERS_AMD = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',amd', '', d)}" | 109 | VULKAN_DRIVERS_AMD = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',amd', '', d)}" |
105 | VULKAN_DRIVERS_ASAHI = "${@bb.utils.contains('PACKAGECONFIG', 'asahi libclc', ',asahi', '', d)}" | 110 | VULKAN_DRIVERS_ASAHI = "${@bb.utils.contains('PACKAGECONFIG', 'asahi libclc opencl', ',asahi', '', d)}" |
106 | VULKAN_DRIVERS_INTEL = "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc', ',intel', '', d)}" | 111 | VULKAN_DRIVERS_INTEL = "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc', ',intel', '', d)}" |
107 | VULKAN_DRIVERS_SWRAST = ",swrast" | 112 | VULKAN_DRIVERS_SWRAST = ",swrast" |
108 | # Crashes on x32 | 113 | # Crashes on x32 |
@@ -146,11 +151,7 @@ PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled" | |||
146 | 151 | ||
147 | # "opencl" also requires libclc and gallium-llvm to be present in PKGCONFIG! | 152 | # "opencl" also requires libclc and gallium-llvm to be present in PKGCONFIG! |
148 | # Be sure to enable them both for the target and for the native build. | 153 | # Be sure to enable them both for the target and for the native build. |
149 | PACKAGECONFIG[opencl] = " \ | 154 | PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true, -Dgallium-rusticl=false, bindgen-cli-native" |
150 | -Dgallium-opencl=icd -Dgallium-rusticl=true, \ | ||
151 | -Dgallium-opencl=disabled -Dgallium-rusticl=false, \ | ||
152 | bindgen-cli-native \ | ||
153 | " | ||
154 | 155 | ||
155 | PACKAGECONFIG[broadcom] = "" | 156 | PACKAGECONFIG[broadcom] = "" |
156 | PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native" | 157 | PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native" |
@@ -169,8 +170,7 @@ GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'vc4', ',vc4', '' | |||
169 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '', d)}" | 170 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '', d)}" |
170 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '', d)}" | 171 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '', d)}" |
171 | 172 | ||
172 | # radeonsi requires LLVM | 173 | GALLIUMDRIVERS_ASAHI = "${@bb.utils.contains('PACKAGECONFIG', 'asahi libclc opencl', ',asahi', '', d)}" |
173 | GALLIUMDRIVERS_ASAHI = "${@bb.utils.contains('PACKAGECONFIG', 'asahi libclc', ',asahi', '', d)}" | ||
174 | GALLIUMDRIVERS_IRIS = "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc', ',iris', '', d)}" | 174 | GALLIUMDRIVERS_IRIS = "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc', ',iris', '', d)}" |
175 | GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',radeonsi', '', d)}" | 175 | GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',radeonsi', '', d)}" |
176 | GALLIUMDRIVERS_LLVMPIPE = ",llvmpipe" | 176 | GALLIUMDRIVERS_LLVMPIPE = ",llvmpipe" |
@@ -219,8 +219,6 @@ GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'tegra', ',tegra, | |||
219 | 219 | ||
220 | PACKAGECONFIG[vulkan-beta] = "-Dvulkan-beta=true,-Dvulkan-beta=false" | 220 | PACKAGECONFIG[vulkan-beta] = "-Dvulkan-beta=true,-Dvulkan-beta=false" |
221 | 221 | ||
222 | PACKAGECONFIG[osmesa] = "-Dosmesa=true,-Dosmesa=false" | ||
223 | |||
224 | PACKAGECONFIG[perfetto] = "-Dperfetto=true,-Dperfetto=false,libperfetto" | 222 | PACKAGECONFIG[perfetto] = "-Dperfetto=true,-Dperfetto=false,libperfetto" |
225 | 223 | ||
226 | PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" | 224 | PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" |
@@ -239,22 +237,14 @@ CFLAGS:append:armv6 = " -DMISSING_64BIT_ATOMICS" | |||
239 | # Remove the mesa dependency on mesa-dev, as mesa is empty | 237 | # Remove the mesa dependency on mesa-dev, as mesa is empty |
240 | DEV_PKG_DEPENDENCY = "" | 238 | DEV_PKG_DEPENDENCY = "" |
241 | 239 | ||
242 | # Khronos documentation says that include/GLES2/gl2ext.h can be used for | ||
243 | # OpenGL ES 3 specification as well as for OpenGL ES 2. | ||
244 | # There can be applications including GLES2/gl2ext.h instead of GLES3/gl3ext.h | ||
245 | # meaning we should probably bring in GLES2/gl2ext.h if someone asks for | ||
246 | # development package of libgles3. | ||
247 | RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev" | ||
248 | |||
249 | # GLES2 and GLES3 implementations are packaged in a single library in libgles2-mesa. | 240 | # GLES2 and GLES3 implementations are packaged in a single library in libgles2-mesa. |
250 | # Add a dependency so the GLES3 dev package is associated with its implementation. | 241 | # Add a dependency so the GLES3 dev package is associated with its implementation. |
251 | RDEPENDS:libgles2-mesa += "libgles3-mesa" | 242 | RPROVIDES:libgles2-mesa += "libgles3-mesa" |
252 | ALLOW_EMPTY:libgles3-mesa = "1" | 243 | RPROVIDES:libgles2-mesa-dev += "libgles3-mesa-dev" |
253 | 244 | ||
254 | RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools spirv-llvm-translator', '', d)}" | 245 | RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools spirv-llvm-translator', '', d)}" |
255 | 246 | ||
256 | PACKAGES =+ "libegl-mesa libegl-mesa-dev \ | 247 | PACKAGES =+ "libegl-mesa libegl-mesa-dev \ |
257 | libosmesa libosmesa-dev \ | ||
258 | libgallium \ | 248 | libgallium \ |
259 | libgl-mesa libgl-mesa-dev \ | 249 | libgl-mesa libgl-mesa-dev \ |
260 | libglx-mesa libglx-mesa-dev \ | 250 | libglx-mesa libglx-mesa-dev \ |
@@ -262,8 +252,7 @@ PACKAGES =+ "libegl-mesa libegl-mesa-dev \ | |||
262 | libgbm libgbm-dev \ | 252 | libgbm libgbm-dev \ |
263 | libgles1-mesa libgles1-mesa-dev \ | 253 | libgles1-mesa libgles1-mesa-dev \ |
264 | libgles2-mesa libgles2-mesa-dev \ | 254 | libgles2-mesa libgles2-mesa-dev \ |
265 | libgles3-mesa libgles3-mesa-dev \ | 255 | libopencl-mesa \ |
266 | libopencl-mesa libopencl-mesa-dev \ | ||
267 | libxatracker libxatracker-dev \ | 256 | libxatracker libxatracker-dev \ |
268 | mesa-megadriver mesa-vulkan-drivers \ | 257 | mesa-megadriver mesa-vulkan-drivers \ |
269 | mesa-vdpau-drivers mesa-tools \ | 258 | mesa-vdpau-drivers mesa-tools \ |
@@ -280,36 +269,42 @@ do_install:append () { | |||
280 | # RPROVIDEs/RCONFLICTs on the generic libgl name. | 269 | # RPROVIDEs/RCONFLICTs on the generic libgl name. |
281 | python __anonymous() { | 270 | python __anonymous() { |
282 | pkgconfig = (d.getVar('PACKAGECONFIG') or "").split() | 271 | pkgconfig = (d.getVar('PACKAGECONFIG') or "").split() |
272 | mlprefix = d.getVar("MLPREFIX") | ||
283 | suffix = "" | 273 | suffix = "" |
284 | if "-native" in d.getVar("PN"): | 274 | if "-native" in d.getVar("PN"): |
285 | suffix = "-native" | 275 | suffix = "-native" |
286 | for p in (("egl", "libegl", "libegl1"), | ||
287 | ("opengl", "libgl", "libgl1"), | ||
288 | ("glvnd", "libglx",), | ||
289 | ("gles", "libgles1", "libglesv1-cm1"), | ||
290 | ("gles", "libgles2", "libglesv2-2"), | ||
291 | ("gles", "libgles3",), | ||
292 | ("opencl", "libopencl",)): | ||
293 | if not p[0] in pkgconfig: | ||
294 | continue | ||
295 | mlprefix = d.getVar("MLPREFIX") | ||
296 | fullp = mlprefix + p[1] + "-mesa" + suffix | ||
297 | mlprefix = d.getVar("MLPREFIX") | ||
298 | pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:]) | ||
299 | d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") | ||
300 | d.appendVar("RREPLACES:" + fullp, pkgs) | ||
301 | d.appendVar("RPROVIDES:" + fullp, pkgs) | ||
302 | d.appendVar("RCONFLICTS:" + fullp, pkgs) | ||
303 | 276 | ||
277 | for p in ("libegl", "libgl", "libglx", "libgles1", "libgles2", "libgles3", "libopencl"): | ||
278 | fullp = mlprefix + p + "-mesa" + suffix | ||
304 | d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}mesa-megadriver" + suffix) | 279 | d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}mesa-megadriver" + suffix) |
305 | 280 | ||
306 | # For -dev, the first element is both the Debian and original name | 281 | d.setVar("DEBIAN_NOAUTONAME:%slibopencl-mesa%s" % (mlprefix, suffix), "1") |
307 | fullp = mlprefix + p[1] + "-mesa-dev" + suffix | 282 | |
308 | pkgs = " " + mlprefix + p[1] + "-dev" + suffix | 283 | if 'glvnd' in pkgconfig: |
309 | d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") | 284 | for p in ("libegl", "libglx"): |
310 | d.appendVar("RREPLACES:" + fullp, pkgs) | 285 | fullp = mlprefix + p + "-mesa" + suffix |
311 | d.appendVar("RPROVIDES:" + fullp, pkgs) | 286 | d.appendVar("RPROVIDES:" + fullp, '%s-icd' % p) |
312 | d.appendVar("RCONFLICTS:" + fullp, pkgs) | 287 | else: |
288 | for p in (("egl", "libegl", "libegl1"), | ||
289 | ("opengl", "libgl", "libgl1"), | ||
290 | ("gles", "libgles1", "libglesv1-cm1"), | ||
291 | ("gles", "libgles2", "libglesv2-2", "libgles3")): | ||
292 | if not p[0] in pkgconfig: | ||
293 | continue | ||
294 | fullp = mlprefix + p[1] + "-mesa" + suffix | ||
295 | pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:]) | ||
296 | d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") | ||
297 | d.appendVar("RREPLACES:" + fullp, pkgs) | ||
298 | d.appendVar("RPROVIDES:" + fullp, pkgs) | ||
299 | d.appendVar("RCONFLICTS:" + fullp, pkgs) | ||
300 | |||
301 | # For -dev, the first element is both the Debian and original name | ||
302 | fullp = mlprefix + p[1] + "-mesa-dev" + suffix | ||
303 | pkgs = " " + mlprefix + p[1] + "-dev" + suffix | ||
304 | d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") | ||
305 | d.appendVar("RREPLACES:" + fullp, pkgs) | ||
306 | d.appendVar("RPROVIDES:" + fullp, pkgs) | ||
307 | d.appendVar("RCONFLICTS:" + fullp, pkgs) | ||
313 | } | 308 | } |
314 | 309 | ||
315 | python mesa_populate_packages() { | 310 | python mesa_populate_packages() { |
@@ -331,9 +326,6 @@ python mesa_populate_packages() { | |||
331 | d.appendVar("RPROVIDES:%s" % lib_name, pkg_name) | 326 | d.appendVar("RPROVIDES:%s" % lib_name, pkg_name) |
332 | d.appendVar("RCONFLICTS:%s" % lib_name, pkg_name) | 327 | d.appendVar("RCONFLICTS:%s" % lib_name, pkg_name) |
333 | d.appendVar("RREPLACES:%s" % lib_name, pkg_name) | 328 | d.appendVar("RREPLACES:%s" % lib_name, pkg_name) |
334 | |||
335 | pipe_drivers_root = os.path.join(d.getVar('libdir'), "gallium-pipe") | ||
336 | do_split_packages(d, pipe_drivers_root, r'^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='') | ||
337 | } | 329 | } |
338 | 330 | ||
339 | PACKAGESPLITFUNCS =+ "mesa_populate_packages" | 331 | PACKAGESPLITFUNCS =+ "mesa_populate_packages" |
@@ -345,28 +337,23 @@ FILES:mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d" | |||
345 | FILES:mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${libdir}/libpowervr_rogue.so ${datadir}/vulkan" | 337 | FILES:mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${libdir}/libpowervr_rogue.so ${datadir}/vulkan" |
346 | FILES:${PN}-vdpau-drivers = "${libdir}/vdpau/*.so.*" | 338 | FILES:${PN}-vdpau-drivers = "${libdir}/vdpau/*.so.*" |
347 | FILES:libegl-mesa = "${libdir}/libEGL*.so.* ${datadir}/glvnd/egl_vendor.d" | 339 | FILES:libegl-mesa = "${libdir}/libEGL*.so.* ${datadir}/glvnd/egl_vendor.d" |
348 | FILES:libgbm = "${libdir}/libgbm.so.* ${libdir}/gbm/*_gbm.so ${includedir}/gbm_backend_abi.h" | 340 | FILES:libgbm = "${libdir}/libgbm.so.* ${libdir}/gbm/*_gbm.so" |
349 | FILES:libgallium = "${libdir}/libgallium-*.so" | 341 | FILES:libgallium = "${libdir}/libgallium-*.so" |
350 | FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*" | 342 | FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*" |
351 | FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*" | 343 | FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*" |
352 | FILES:libgl-mesa = "${libdir}/libGL.so.*" | 344 | FILES:libgl-mesa = "${libdir}/libGL.so.*" |
353 | FILES:libglx-mesa = "${libdir}/libGLX*.so.*" | 345 | FILES:libglx-mesa = "${libdir}/libGLX*.so.*" |
354 | FILES:libopencl-mesa = "${libdir}/lib*OpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/*.icd" | 346 | FILES:libopencl-mesa = "${libdir}/lib*OpenCL.so* ${sysconfdir}/OpenCL/vendors/*.icd" |
355 | FILES:libglapi = "${libdir}/libglapi.so.*" | 347 | FILES:libglapi = "${libdir}/libglapi.so.*" |
356 | FILES:libosmesa = "${libdir}/libOSMesa.so.*" | ||
357 | FILES:libxatracker = "${libdir}/libxatracker.so.*" | 348 | FILES:libxatracker = "${libdir}/libxatracker.so.*" |
358 | 349 | ||
359 | FILES:${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan ${libdir}/vdpau/*.so" | 350 | FILES:${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/GL/internal/dri_interface.h ${includedir}/vulkan ${libdir}/vdpau/*.so" |
360 | FILES:libegl-mesa-dev = "${libdir}/libEGL*.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc" | 351 | FILES:libegl-mesa-dev = "${libdir}/libEGL*.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc" |
361 | FILES:libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h" | 352 | FILES:libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h ${includedir}/gbm_backend_abi.h" |
362 | FILES:libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc" | 353 | FILES:libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL/*.h ${libdir}/pkgconfig/gl.pc" |
363 | FILES:libglx-mesa-dev = "${libdir}/libGLX*.*" | ||
364 | FILES:libglapi-dev = "${libdir}/libglapi.*" | 354 | FILES:libglapi-dev = "${libdir}/libglapi.*" |
365 | FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc" | 355 | FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc" |
366 | FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc" | 356 | FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${includedir}/GLES3 ${libdir}/pkgconfig/glesv2.pc" |
367 | FILES:libgles3-mesa-dev = "${includedir}/GLES3" | ||
368 | FILES:libopencl-mesa-dev = "${libdir}/lib*OpenCL.so" | ||
369 | FILES:libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc" | ||
370 | FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \ | 357 | FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \ |
371 | ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \ | 358 | ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \ |
372 | ${libdir}/pkgconfig/xatracker.pc" | 359 | ${libdir}/pkgconfig/xatracker.pc" |
@@ -377,6 +364,9 @@ ALLOW_EMPTY:${PN}-tools = "1" | |||
377 | # All DRI drivers are symlinks to libdril_dri.so | 364 | # All DRI drivers are symlinks to libdril_dri.so |
378 | INSANE_SKIP:${PN}-megadriver += "dev-so" | 365 | INSANE_SKIP:${PN}-megadriver += "dev-so" |
379 | 366 | ||
367 | # OpenCL ICDs package also ship correspondig .so files, there is no -dev package | ||
368 | INSANE_SKIP:libopencl-mesa += "dev-so" | ||
369 | |||
380 | # Fix upgrade path from mesa to mesa-megadriver | 370 | # Fix upgrade path from mesa to mesa-megadriver |
381 | RREPLACES:mesa-megadriver = "mesa" | 371 | RREPLACES:mesa-megadriver = "mesa" |
382 | RCONFLICTS:mesa-megadriver = "mesa" | 372 | RCONFLICTS:mesa-megadriver = "mesa" |
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-Include-stdint.h.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-Include-stdint.h.patch deleted file mode 100644 index b30b0e0017..0000000000 --- a/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-Include-stdint.h.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | From 9a187d2f54d3683636b951a10c165d949b3a1d18 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 23 Mar 2025 20:09:35 -0700 | ||
4 | Subject: [PATCH] framework: Include stdint.h | ||
5 | |||
6 | Needed for uint32_t used in this header | ||
7 | GCC 15 gets upset about it. | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/KhronosGroup/Vulkan-Samples/pull/1314] | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | framework/platform/configuration.h | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/framework/platform/configuration.h b/framework/platform/configuration.h | ||
16 | index f6a9cae..c15f76f 100644 | ||
17 | --- a/framework/platform/configuration.h | ||
18 | +++ b/framework/platform/configuration.h | ||
19 | @@ -18,6 +18,7 @@ | ||
20 | #pragma once | ||
21 | |||
22 | #include <algorithm> | ||
23 | +#include <cstdint> | ||
24 | #include <map> | ||
25 | #include <memory> | ||
26 | #include <string> | ||
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0003-bldsys-cmake-global_options.cmake-removed-unused-ROO.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0003-bldsys-cmake-global_options.cmake-removed-unused-ROO.patch deleted file mode 100644 index ffac2d78ce..0000000000 --- a/meta/recipes-graphics/vulkan/vulkan-samples/0003-bldsys-cmake-global_options.cmake-removed-unused-ROO.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From da4ef211810bc3b0c51ea89f02c031a170fe0cb8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Tue, 1 Apr 2025 18:53:34 +0200 | ||
4 | Subject: [PATCH] bldsys/cmake/global_options.cmake: removed unused | ||
5 | ROOT_PATH_SIZE define | ||
6 | |||
7 | After various refactorings it is no longer used anywhere (and | ||
8 | is problematic for build reproducibility, as build path sizes can | ||
9 | differ between build hosts). | ||
10 | |||
11 | Upstream-Status: Submitted [https://github.com/KhronosGroup/Vulkan-Samples/pull/1325] | ||
12 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
13 | --- | ||
14 | bldsys/cmake/global_options.cmake | 3 --- | ||
15 | 1 file changed, 3 deletions(-) | ||
16 | |||
17 | diff --git a/bldsys/cmake/global_options.cmake b/bldsys/cmake/global_options.cmake | ||
18 | index 96c7add..67a6c5e 100644 | ||
19 | --- a/bldsys/cmake/global_options.cmake | ||
20 | +++ b/bldsys/cmake/global_options.cmake | ||
21 | @@ -126,9 +126,6 @@ set(CMAKE_CXX_STANDARD 17) | ||
22 | set(CMAKE_DISABLE_SOURCE_CHANGES ON) | ||
23 | set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) | ||
24 | |||
25 | -string(LENGTH "${CMAKE_SOURCE_DIR}/" ROOT_PATH_SIZE) | ||
26 | -add_definitions(-DROOT_PATH_SIZE=${ROOT_PATH_SIZE}) | ||
27 | - | ||
28 | set(CMAKE_C_FLAGS_DEBUG "-DDEBUG=0 ${CMAKE_C_FLAGS_DEBUG}") | ||
29 | set(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG=0 ${CMAKE_CXX_FLAGS_DEBUG}") | ||
30 | |||
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb index 554e6eb290..22b5546631 100644 --- a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb +++ b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb | |||
@@ -7,12 +7,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=48aa35cefb768436223a6e7f18dc2a2a" | |||
7 | 7 | ||
8 | SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git;branch=main;protocol=https;lfs=0 \ | 8 | SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git;branch=main;protocol=https;lfs=0 \ |
9 | file://0001-SPIRV-SpvBuilder.h-add-missing-cstdint-include.patch;patchdir=third_party/glslang \ | 9 | file://0001-SPIRV-SpvBuilder.h-add-missing-cstdint-include.patch;patchdir=third_party/glslang \ |
10 | file://0001-framework-Include-stdint.h.patch \ | ||
11 | file://0003-bldsys-cmake-global_options.cmake-removed-unused-ROO.patch \ | ||
12 | " | 10 | " |
13 | 11 | ||
14 | UPSTREAM_CHECK_COMMITS = "1" | 12 | UPSTREAM_CHECK_COMMITS = "1" |
15 | SRCREV = "8547ce1022a19870d3e49075b5b08ca2d11c8773" | 13 | SRCREV = "eca122602a5d7a9f63686411dcef1b62feb36a9a" |
16 | 14 | ||
17 | UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for" | 15 | UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for" |
18 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-fix-lttng-tools-fails-to-compile-with-libxml2-2.14.0.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-fix-lttng-tools-fails-to-compile-with-libxml2-2.14.0.patch new file mode 100644 index 0000000000..7c2b893731 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-tools/0001-fix-lttng-tools-fails-to-compile-with-libxml2-2.14.0.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | From 0b19e10a8a52fab0bfadbac5ce70f1b2d185a1d1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Wed, 21 May 2025 13:09:25 +0800 | ||
4 | Subject: [PATCH] fix lttng-tools fails to compile with libxml2 2.14.0+ | ||
5 | |||
6 | Description: | ||
7 | | In file included from /srv/pokybuild/yocto-worker/qemux86-alt/build/build/tmp/work/core2-32-poky-linux/lttng-tools/2.13.15/recipe-sysroot/usr/include/libxml2/libxml/parser.h:25, | ||
8 | | from ../../../../lttng-tools-2.13.15/src/common/config/session-config.c:29: | ||
9 | | /srv/pokybuild/yocto-worker/qemux86-alt/build/build/tmp/work/core2-32-poky-linux/lttng-tools/2.13.15/recipe-sysroot/usr/include/libxml2/libxml/encoding.h:173:7: note: declared here | ||
10 | | 173 | } input XML_DEPRECATED_MEMBER; | ||
11 | | | ^~~~~ | ||
12 | | ../../../../lttng-tools-2.13.15/src/common/config/session-config.c:432:15: error: called object is not a function or function pointer | ||
13 | | 432 | ret = handler->input(out_str, &out_len, (const xmlChar *) in_str, &in_len); | ||
14 | | | ^~~~~~~ | ||
15 | | At top level: | ||
16 | | cc1: note: unrecognized command-line option '-Wno-incomplete-setjmp-declaration' may have been intended to silence earlier diagnostics | ||
17 | |||
18 | |||
19 | According to [1][2], the UTF-8 handler is | ||
20 | ``` | ||
21 | static xmlCharEncError | ||
22 | UTF8ToUTF8(void *vctxt ATTRIBUTE_UNUSED, | ||
23 | unsigned char* out, int *outlen, | ||
24 | const unsigned char* in, int *inlen, | ||
25 | int flush ATTRIBUTE_UNUSED) | ||
26 | ``` | ||
27 | |||
28 | Update input.func with setting ATTRIBUTE_UNUSED params with NULL and 0 | ||
29 | |||
30 | [1] https://gitlab.gnome.org/GNOME/libxml2/-/commit/38f475072aefe032fff1dc058df3e56c1e7062fa | ||
31 | [2] https://gitlab.gnome.org/GNOME/libxml2/-/commit/69b83bb68e2a8ed0013f80c51b9a358714b00c9a#478024cc18a2cc8dbaed34076e9775f6827f413d_2188_2201 | ||
32 | |||
33 | Upstream-Status: Submitted [https://github.com/lttng/lttng-tools/pull/170] | ||
34 | Signed-off-by: Marko, Peter <Peter.Marko@siemens.com> | ||
35 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
36 | --- | ||
37 | src/common/config/session-config.c | 2 +- | ||
38 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
39 | |||
40 | diff --git a/src/common/config/session-config.c b/src/common/config/session-config.c | ||
41 | index bb4e9fe..4042d34 100644 | ||
42 | --- a/src/common/config/session-config.c | ||
43 | +++ b/src/common/config/session-config.c | ||
44 | @@ -429,7 +429,7 @@ static xmlChar *encode_string(const char *in_str) | ||
45 | goto end; | ||
46 | } | ||
47 | |||
48 | - ret = handler->input(out_str, &out_len, (const xmlChar *) in_str, &in_len); | ||
49 | + ret = handler->input.func(NULL, out_str, &out_len, (const xmlChar *) in_str, &in_len, 0); | ||
50 | if (ret < 0) { | ||
51 | xmlFree(out_str); | ||
52 | out_str = NULL; | ||
53 | -- | ||
54 | 2.34.1 | ||
55 | |||
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.13.15.bb b/meta/recipes-kernel/lttng/lttng-tools_2.13.15.bb index 762d4e5c2f..f39404afa0 100644 --- a/meta/recipes-kernel/lttng/lttng-tools_2.13.15.bb +++ b/meta/recipes-kernel/lttng/lttng-tools_2.13.15.bb | |||
@@ -39,6 +39,7 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ | |||
39 | file://0001-compat-Define-off64_t-as-off_t-on-linux.patch \ | 39 | file://0001-compat-Define-off64_t-as-off_t-on-linux.patch \ |
40 | file://0001-tests-add-check_skip_kernel_test-to-check-root-user-.patch \ | 40 | file://0001-tests-add-check_skip_kernel_test-to-check-root-user-.patch \ |
41 | file://0001-Fix-rotation-destroy-flush-fix-session-daemon-abort-.patch \ | 41 | file://0001-Fix-rotation-destroy-flush-fix-session-daemon-abort-.patch \ |
42 | file://0001-fix-lttng-tools-fails-to-compile-with-libxml2-2.14.0.patch \ | ||
42 | " | 43 | " |
43 | 44 | ||
44 | SRC_URI[sha256sum] = "96ea42351ee112c19dad9fdc7aae93b583d9f1722b2175664a381d2d337703c4" | 45 | SRC_URI[sha256sum] = "96ea42351ee112c19dad9fdc7aae93b583d9f1722b2175664a381d2d337703c4" |
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index d06dd2fa5a..0d19e1bdc2 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb | |||
@@ -81,6 +81,16 @@ LDFLAGS = "-ldl -lutil" | |||
81 | # avoiding the 'buildpaths' QA warning. | 81 | # avoiding the 'buildpaths' QA warning. |
82 | TARGET_CC_ARCH += "${SELECTED_OPTIMIZATION} ${DEBUG_PREFIX_MAP}" | 82 | TARGET_CC_ARCH += "${SELECTED_OPTIMIZATION} ${DEBUG_PREFIX_MAP}" |
83 | 83 | ||
84 | #| libbpf.c: In function 'find_kernel_btf_id.constprop': | ||
85 | #| libbpf.c:10009:33: error: 'mod_len' may be used uninitialized [-Werror=maybe-uninitialized] | ||
86 | #| 10009 | if (mod_name && strncmp(mod->name, mod_name, mod_len) != 0) | ||
87 | #| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
88 | #| libbpf.c:9979:21: note: 'mod_len' was declared here | ||
89 | #| 9979 | int ret, i, mod_len; | ||
90 | #| | ^~~~~~~ | ||
91 | #| cc1: all warnings being treated as errors | ||
92 | TARGET_CC_ARCH:append:toolchain-clang:arm = " -fno-error=maybe-uninitialized" | ||
93 | |||
84 | EXTRA_OEMAKE = '\ | 94 | EXTRA_OEMAKE = '\ |
85 | V=1 \ | 95 | V=1 \ |
86 | VF=1 \ | 96 | VF=1 \ |
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc index 18c12ede63..695f4b676d 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc | |||
@@ -71,6 +71,14 @@ inherit bash-completion meson pkgconfig useradd gettext perlnative systemd manpa | |||
71 | # if using --disable-nls | 71 | # if using --disable-nls |
72 | USE_NLS = "yes" | 72 | USE_NLS = "yes" |
73 | 73 | ||
74 | # Helps tests for -msse fail on non-SSE architectures which is all non-x86 | ||
75 | TUNE_CCARGS:append:toolchain-clang = " -Werror=unused-command-line-argument" | ||
76 | |||
77 | # mix_neon.c:179:9: error: invalid operand in inline asm: 'vld1.s32 ${0:h}, [$2] | ||
78 | # vld1.s32 ${1:h}, [$3] ' | ||
79 | TOOLCHAIN:armv7ve = "gcc" | ||
80 | TOOLCHAIN:armv7a = "gcc" | ||
81 | |||
74 | EXTRA_OEMESON = "\ | 82 | EXTRA_OEMESON = "\ |
75 | -Dhal-compat=false \ | 83 | -Dhal-compat=false \ |
76 | -Dorc=disabled \ | 84 | -Dorc=disabled \ |
diff --git a/meta/recipes-multimedia/sbc/sbc_2.1.bb b/meta/recipes-multimedia/sbc/sbc_2.1.bb index 5aaa52313f..8b91e7e65b 100644 --- a/meta/recipes-multimedia/sbc/sbc_2.1.bb +++ b/meta/recipes-multimedia/sbc/sbc_2.1.bb | |||
@@ -19,5 +19,7 @@ SRC_URI[sha256sum] = "426633cabd7c798236443516dfa8335b47e004b0ef37ff107e0c7ead32 | |||
19 | 19 | ||
20 | inherit autotools pkgconfig | 20 | inherit autotools pkgconfig |
21 | 21 | ||
22 | CFLAGS += "-std=gnu17" | ||
23 | |||
22 | PACKAGES =+ "${PN}-examples" | 24 | PACKAGES =+ "${PN}-examples" |
23 | FILES:${PN}-examples += "${bindir}/*" | 25 | FILES:${PN}-examples += "${bindir}/*" |
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.48.1.bb b/meta/recipes-sato/webkit/webkitgtk_2.48.1.bb index 5b9846a6d6..a58b44440e 100644 --- a/meta/recipes-sato/webkit/webkitgtk_2.48.1.bb +++ b/meta/recipes-sato/webkit/webkitgtk_2.48.1.bb | |||
@@ -176,3 +176,5 @@ src_package_preprocess () { | |||
176 | ${B}/WebKitGTK/DerivedSources/webkit/*.cpp | 176 | ${B}/WebKitGTK/DerivedSources/webkit/*.cpp |
177 | } | 177 | } |
178 | 178 | ||
179 | # Clang-20 issue - https://github.com/llvm/llvm-project/issues/132322 | ||
180 | TOOLCHAIN:arm = "gcc" | ||
diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc index ee490cee0a..64a57ddfb2 100644 --- a/meta/recipes-support/boost/boost.inc +++ b/meta/recipes-support/boost/boost.inc | |||
@@ -32,6 +32,7 @@ BOOST_LIBS = "\ | |||
32 | json \ | 32 | json \ |
33 | log \ | 33 | log \ |
34 | math \ | 34 | math \ |
35 | process \ | ||
35 | program_options \ | 36 | program_options \ |
36 | random \ | 37 | random \ |
37 | regex \ | 38 | regex \ |
diff --git a/meta/recipes-support/ca-certificates/ca-certificates_20250419.bb b/meta/recipes-support/ca-certificates/ca-certificates_20250419.bb index f06a30bd6d..01f594095e 100644 --- a/meta/recipes-support/ca-certificates/ca-certificates_20250419.bb +++ b/meta/recipes-support/ca-certificates/ca-certificates_20250419.bb | |||
@@ -60,7 +60,8 @@ do_install:append:class-target () { | |||
60 | } | 60 | } |
61 | 61 | ||
62 | pkg_postinst:${PN}:class-target () { | 62 | pkg_postinst:${PN}:class-target () { |
63 | $D${sbindir}/update-ca-certificates --sysroot $D | 63 | [ -n "$D" ] && sysroot_args="--sysroot $D" |
64 | $D${sbindir}/update-ca-certificates $sysroot_args | ||
64 | } | 65 | } |
65 | 66 | ||
66 | CONFFILES:${PN} += "${sysconfdir}/ca-certificates.conf" | 67 | CONFFILES:${PN} += "${sysconfdir}/ca-certificates.conf" |
diff --git a/meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch b/meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch index f2d11b2983..2cec20b4b1 100644 --- a/meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch +++ b/meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 1343e4ee17bb3f72e6b244706cacbeb16463c5d7 Mon Sep 17 00:00:00 2001 | 1 | From 969d21aa2bf474d9c5c80a64de1a9fe0e17e31b2 Mon Sep 17 00:00:00 2001 |
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
3 | Date: Thu, 14 Oct 2021 15:57:36 +0800 | 3 | Date: Thu, 14 Oct 2021 15:57:36 +0800 |
4 | Subject: [PATCH] nativesdk-libcap: Raise the size of arrays containing dl | 4 | Subject: [PATCH] nativesdk-libcap: Raise the size of arrays containing dl |
@@ -19,12 +19,12 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | |||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | 19 | 1 file changed, 1 insertion(+), 1 deletion(-) |
20 | 20 | ||
21 | diff --git a/libcap/execable.h b/libcap/execable.h | 21 | diff --git a/libcap/execable.h b/libcap/execable.h |
22 | index 89e61a3..22518dd 100644 | 22 | index a68ea24..60d3853 100644 |
23 | --- a/libcap/execable.h | 23 | --- a/libcap/execable.h |
24 | +++ b/libcap/execable.h | 24 | +++ b/libcap/execable.h |
25 | @@ -23,7 +23,7 @@ | 25 | @@ -34,7 +34,7 @@ extern const int _IO_stdin_used; |
26 | #endif | 26 | const int _IO_stdin_used __attribute__((weak)) = 131073; |
27 | #define __EXECABLE_H | 27 | #endif /* def __GLIBC__ */ |
28 | 28 | ||
29 | -const char __execable_dl_loader[] __attribute((section(".interp"))) = | 29 | -const char __execable_dl_loader[] __attribute((section(".interp"))) = |
30 | +const char __execable_dl_loader[4096] __attribute((section(".interp"))) = | 30 | +const char __execable_dl_loader[4096] __attribute((section(".interp"))) = |
diff --git a/meta/recipes-support/libcap/libcap_2.75.bb b/meta/recipes-support/libcap/libcap_2.76.bb index 8530f13295..c842246fc0 100644 --- a/meta/recipes-support/libcap/libcap_2.75.bb +++ b/meta/recipes-support/libcap/libcap_2.76.bb | |||
@@ -16,7 +16,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${ | |||
16 | SRC_URI:append:class-nativesdk = " \ | 16 | SRC_URI:append:class-nativesdk = " \ |
17 | file://0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch \ | 17 | file://0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch \ |
18 | " | 18 | " |
19 | SRC_URI[sha256sum] = "de4e7e064c9ba451d5234dd46e897d7c71c96a9ebf9a0c445bc04f4742d83632" | 19 | SRC_URI[sha256sum] = "629da4ab29900d0f7fcc36227073743119925fd711c99a1689bbf5c9b40c8e6f" |
20 | 20 | ||
21 | UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/" | 21 | UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/" |
22 | 22 | ||
diff --git a/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch b/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch index 9615611f6e..7b840644d4 100644 --- a/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch +++ b/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From bcfd89abdb5110b93314297120412d4c7f2da313 Mon Sep 17 00:00:00 2001 | 1 | From fcb53181b18c00083a8b08625db74829cfd6b4b2 Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <trevor.gamblin@windriver.com> | 2 | From: Trevor Gamblin <trevor.gamblin@windriver.com> |
3 | Date: Tue, 29 Oct 2019 14:08:32 -0400 | 3 | Date: Tue, 29 Oct 2019 14:08:32 -0400 |
4 | Subject: [PATCH] libgcrypt: fix m4 file for oe-core | 4 | Subject: [PATCH] libgcrypt: fix m4 file for oe-core |
@@ -11,13 +11,12 @@ settings. | |||
11 | Upstream-Status: Inappropriate [oe-specific] | 11 | Upstream-Status: Inappropriate [oe-specific] |
12 | 12 | ||
13 | Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> | 13 | Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> |
14 | |||
15 | --- | 14 | --- |
16 | src/libgcrypt.m4 | 90 +++--------------------------------------------- | 15 | src/libgcrypt.m4 | 90 +++--------------------------------------------- |
17 | 1 file changed, 4 insertions(+), 86 deletions(-) | 16 | 1 file changed, 4 insertions(+), 86 deletions(-) |
18 | 17 | ||
19 | diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4 | 18 | diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4 |
20 | index 353df81b6d..b195e22894 100644 | 19 | index 353df81..b195e22 100644 |
21 | --- a/src/libgcrypt.m4 | 20 | --- a/src/libgcrypt.m4 |
22 | +++ b/src/libgcrypt.m4 | 21 | +++ b/src/libgcrypt.m4 |
23 | @@ -116,41 +116,6 @@ dnl | 22 | @@ -116,41 +116,6 @@ dnl |
@@ -144,6 +143,3 @@ index 353df81b6d..b195e22894 100644 | |||
144 | ifelse([$3], , :, [$3]) | 143 | ifelse([$3], , :, [$3]) |
145 | fi | 144 | fi |
146 | AC_SUBST(LIBGCRYPT_CFLAGS) | 145 | AC_SUBST(LIBGCRYPT_CFLAGS) |
147 | -- | ||
148 | 2.34.1 | ||
149 | |||
diff --git a/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch b/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch deleted file mode 100644 index 78b02eda9d..0000000000 --- a/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From e96df0c82e086bf348753d2d0fa37fa6191b4b14 Mon Sep 17 00:00:00 2001 | ||
2 | From: "simit.ghane" <simit.ghane@lge.com> | ||
3 | Date: Tue, 11 Jun 2024 07:22:28 +0530 | ||
4 | Subject: [PATCH] random:cipher: handle substitution in sed command | ||
5 | |||
6 | Upstream-Status: Backport [https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=e96df0c82e086bf348753d2d0fa37fa6191b4b14] | ||
7 | |||
8 | * cipher/Makefile.am (o_flag_munging): Add 'g' flag for first sed | ||
9 | expression. | ||
10 | * random/Makefile.am (o_flag_munging): Likewise. | ||
11 | -- | ||
12 | |||
13 | It was there earlier and accidentally removed from | ||
14 | Makefile.am of cipher and random | ||
15 | |||
16 | Signed-off-by: simit.ghane <simit.ghane@lge.com> | ||
17 | [jk: add changelog to commit message] | ||
18 | Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi> | ||
19 | --- | ||
20 | cipher/Makefile.am | 2 +- | ||
21 | random/Makefile.am | 2 +- | ||
22 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
23 | |||
24 | diff --git a/cipher/Makefile.am b/cipher/Makefile.am | ||
25 | index ea9014cc98..149c9f2101 100644 | ||
26 | --- a/cipher/Makefile.am | ||
27 | +++ b/cipher/Makefile.am | ||
28 | @@ -169,7 +169,7 @@ gost-s-box$(EXEEXT_FOR_BUILD): gost-s-box.c | ||
29 | |||
30 | |||
31 | if ENABLE_O_FLAG_MUNGING | ||
32 | -o_flag_munging = sed -e 's/[[:blank:]]-O\([2-9sgz][2-9sgz]*\)/ -O1 /' -e 's/[[:blank:]]-Ofast/ -O1 /g' | ||
33 | +o_flag_munging = sed -e 's/[[:blank:]]-O\([2-9sgz][2-9sgz]*\)/ -O1 /g' -e 's/[[:blank:]]-Ofast/ -O1 /g' | ||
34 | else | ||
35 | o_flag_munging = cat | ||
36 | endif | ||
37 | diff --git a/random/Makefile.am b/random/Makefile.am | ||
38 | index c7100ef8b8..a42e430649 100644 | ||
39 | --- a/random/Makefile.am | ||
40 | +++ b/random/Makefile.am | ||
41 | @@ -56,7 +56,7 @@ jitterentropy-base.c jitterentropy.h jitterentropy-base-user.h | ||
42 | |||
43 | # The rndjent module needs to be compiled without optimization. */ | ||
44 | if ENABLE_O_FLAG_MUNGING | ||
45 | -o_flag_munging = sed -e 's/[[:blank:]]-O\([1-9sgz][1-9sgz]*\)/ -O0 /' -e 's/[[:blank:]]-Ofast/ -O0 /g' | ||
46 | +o_flag_munging = sed -e 's/[[:blank:]]-O\([1-9sgz][1-9sgz]*\)/ -O0 /g' -e 's/[[:blank:]]-Ofast/ -O0 /g' | ||
47 | else | ||
48 | o_flag_munging = cat | ||
49 | endif | ||
diff --git a/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch b/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch index 4233fa7877..ccf4e18910 100644 --- a/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch +++ b/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 9182bc2dc676858a823c477d8f45a578b8c4f69f Mon Sep 17 00:00:00 2001 | 1 | From c7a99e7a15f1f703ac90fc2a16b2c2115a66a996 Mon Sep 17 00:00:00 2001 |
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
3 | Date: Sun, 12 Jun 2016 04:44:29 -0400 | 3 | Date: Sun, 12 Jun 2016 04:44:29 -0400 |
4 | Subject: [PATCH] tests/Makefile.am: fix undefined reference to | 4 | Subject: [PATCH] tests/Makefile.am: fix undefined reference to |
@@ -9,16 +9,15 @@ Add missing '-lpthread' to CFLAGS | |||
9 | Upstream-Status: Pending | 9 | Upstream-Status: Pending |
10 | 10 | ||
11 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | 11 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
12 | |||
13 | --- | 12 | --- |
14 | tests/Makefile.am | 4 ++-- | 13 | tests/Makefile.am | 4 ++-- |
15 | 1 file changed, 2 insertions(+), 2 deletions(-) | 14 | 1 file changed, 2 insertions(+), 2 deletions(-) |
16 | 15 | ||
17 | diff --git a/tests/Makefile.am b/tests/Makefile.am | 16 | diff --git a/tests/Makefile.am b/tests/Makefile.am |
18 | index e6953fd..f47e1d3 100644 | 17 | index 3170a58..9a9e1c2 100644 |
19 | --- a/tests/Makefile.am | 18 | --- a/tests/Makefile.am |
20 | +++ b/tests/Makefile.am | 19 | +++ b/tests/Makefile.am |
21 | @@ -76,7 +76,7 @@ t_mpi_bit_LDADD = $(standard_ldadd) @LDADD_FOR_TESTS_KLUDGE@ | 20 | @@ -93,7 +93,7 @@ t_mpi_bit_LDADD = $(standard_ldadd) @LDADD_FOR_TESTS_KLUDGE@ |
22 | t_secmem_LDADD = $(standard_ldadd) @LDADD_FOR_TESTS_KLUDGE@ | 21 | t_secmem_LDADD = $(standard_ldadd) @LDADD_FOR_TESTS_KLUDGE@ |
23 | testapi_LDADD = $(standard_ldadd) @LDADD_FOR_TESTS_KLUDGE@ | 22 | testapi_LDADD = $(standard_ldadd) @LDADD_FOR_TESTS_KLUDGE@ |
24 | t_lock_LDADD = $(standard_ldadd) $(GPG_ERROR_MT_LIBS) @LDADD_FOR_TESTS_KLUDGE@ | 23 | t_lock_LDADD = $(standard_ldadd) $(GPG_ERROR_MT_LIBS) @LDADD_FOR_TESTS_KLUDGE@ |
@@ -27,7 +26,7 @@ index e6953fd..f47e1d3 100644 | |||
27 | testdrv_LDADD = $(LDADD_FOR_TESTS_KLUDGE) | 26 | testdrv_LDADD = $(LDADD_FOR_TESTS_KLUDGE) |
28 | 27 | ||
29 | # Build a version of the test driver for the build platform. | 28 | # Build a version of the test driver for the build platform. |
30 | @@ -95,7 +95,7 @@ else | 29 | @@ -112,7 +112,7 @@ else |
31 | xtestsuite_libs = ../src/.libs/libgcrypt.so* | 30 | xtestsuite_libs = ../src/.libs/libgcrypt.so* |
32 | xtestsuite_driver = testdrv | 31 | xtestsuite_driver = testdrv |
33 | t_kdf_LDADD = $(standard_ldadd) $(GPG_ERROR_MT_LIBS) @LDADD_FOR_TESTS_KLUDGE@ | 32 | t_kdf_LDADD = $(standard_ldadd) $(GPG_ERROR_MT_LIBS) @LDADD_FOR_TESTS_KLUDGE@ |
diff --git a/meta/recipes-support/libgcrypt/files/no-bench-slope.patch b/meta/recipes-support/libgcrypt/files/no-bench-slope.patch index ed65ed4e67..44aac1913e 100644 --- a/meta/recipes-support/libgcrypt/files/no-bench-slope.patch +++ b/meta/recipes-support/libgcrypt/files/no-bench-slope.patch | |||
@@ -1,3 +1,8 @@ | |||
1 | From eb3a5bc4d5a212da64c0f9396c7f31f83aa6f36c Mon Sep 17 00:00:00 2001 | ||
2 | From: Ross Burton <ross.burton@arm.com> | ||
3 | Date: Fri, 9 Sep 2022 11:13:37 +0100 | ||
4 | Subject: [PATCH] libgcrypt: disable bench-slope test case | ||
5 | |||
1 | The bench-slope test appears to be aborting fairly frequently, which causes | 6 | The bench-slope test appears to be aborting fairly frequently, which causes |
2 | failures on the autobuilder. | 7 | failures on the autobuilder. |
3 | 8 | ||
@@ -10,10 +15,10 @@ Signed-off-by: Ross Burton <ross.burton@arm.com> | |||
10 | 1 file changed, 1 deletion(-) | 15 | 1 file changed, 1 deletion(-) |
11 | 16 | ||
12 | diff --git a/tests/testdrv.c b/tests/testdrv.c | 17 | diff --git a/tests/testdrv.c b/tests/testdrv.c |
13 | index bfca4c2314..5a755f512e 100644 | 18 | index 634b718..1e9dddb 100644 |
14 | --- a/tests/testdrv.c | 19 | --- a/tests/testdrv.c |
15 | +++ b/tests/testdrv.c | 20 | +++ b/tests/testdrv.c |
16 | @@ -77,7 +77,6 @@ static struct { | 21 | @@ -76,7 +76,6 @@ static struct { |
17 | { "t-x448" }, | 22 | { "t-x448" }, |
18 | { "t-ed448" }, | 23 | { "t-ed448" }, |
19 | { "benchmark" }, | 24 | { "benchmark" }, |
@@ -21,4 +26,3 @@ index bfca4c2314..5a755f512e 100644 | |||
21 | { "hashtest-6g", "hashtest", "--hugeblock --gigs 6 SHA1 SHA256 SHA512 " | 26 | { "hashtest-6g", "hashtest", "--hugeblock --gigs 6 SHA1 SHA256 SHA512 " |
22 | "SHA3-512 SM3 BLAKE2S_256 " | 27 | "SHA3-512 SM3 BLAKE2S_256 " |
23 | "BLAKE2B_512 CRC32 " | 28 | "BLAKE2B_512 CRC32 " |
24 | |||
diff --git a/meta/recipes-support/libgcrypt/files/no-native-gpg-error.patch b/meta/recipes-support/libgcrypt/files/no-native-gpg-error.patch index b9a607863d..98874ce12a 100644 --- a/meta/recipes-support/libgcrypt/files/no-native-gpg-error.patch +++ b/meta/recipes-support/libgcrypt/files/no-native-gpg-error.patch | |||
@@ -1,11 +1,19 @@ | |||
1 | From ede03b847038afc294e206ca345d12d75bbba844 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ross Burton <ross.burton@arm.com> | ||
3 | Date: Fri, 26 Aug 2022 15:23:37 +0100 | ||
4 | Subject: [PATCH] libgcrypt: rewrite ptest | ||
5 | |||
1 | Don't depend on a native libgpg-error to build the test driver, as it's | 6 | Don't depend on a native libgpg-error to build the test driver, as it's |
2 | an optional dependency for some C annotations. | 7 | an optional dependency for some C annotations. |
3 | 8 | ||
4 | Upstream-Status: Inappropriate | 9 | Upstream-Status: Inappropriate |
5 | Signed-off-by: Ross Burton <ross.burton@arm.com> | 10 | Signed-off-by: Ross Burton <ross.burton@arm.com> |
11 | --- | ||
12 | tests/testdrv.c | 1 - | ||
13 | 1 file changed, 1 deletion(-) | ||
6 | 14 | ||
7 | diff --git a/tests/testdrv.c b/tests/testdrv.c | 15 | diff --git a/tests/testdrv.c b/tests/testdrv.c |
8 | index 0ccde326..6d6abd57 100644 | 16 | index bfca4c2..634b718 100644 |
9 | --- a/tests/testdrv.c | 17 | --- a/tests/testdrv.c |
10 | +++ b/tests/testdrv.c | 18 | +++ b/tests/testdrv.c |
11 | @@ -32,7 +32,6 @@ | 19 | @@ -32,7 +32,6 @@ |
diff --git a/meta/recipes-support/libgcrypt/libgcrypt_1.11.0.bb b/meta/recipes-support/libgcrypt/libgcrypt_1.11.1.bb index ea1f34e8ce..e51a20e5bf 100644 --- a/meta/recipes-support/libgcrypt/libgcrypt_1.11.0.bb +++ b/meta/recipes-support/libgcrypt/libgcrypt_1.11.1.bb | |||
@@ -20,13 +20,12 @@ DEPENDS = "libgpg-error" | |||
20 | UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" | 20 | UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" |
21 | SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \ | 21 | SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \ |
22 | file://0001-libgcrypt-fix-m4-file-for-oe-core.patch \ | 22 | file://0001-libgcrypt-fix-m4-file-for-oe-core.patch \ |
23 | file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \ | ||
24 | file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \ | 23 | file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \ |
25 | file://no-native-gpg-error.patch \ | 24 | file://no-native-gpg-error.patch \ |
26 | file://no-bench-slope.patch \ | 25 | file://no-bench-slope.patch \ |
27 | file://run-ptest \ | 26 | file://run-ptest \ |
28 | " | 27 | " |
29 | SRC_URI[sha256sum] = "09120c9867ce7f2081d6aaa1775386b98c2f2f246135761aae47d81f58685b9c" | 28 | SRC_URI[sha256sum] = "24e91c9123a46c54e8371f3a3a2502f1198f2893fbfbf59af95bc1c21499b00e" |
30 | 29 | ||
31 | BINCONFIG = "${bindir}/libgcrypt-config" | 30 | BINCONFIG = "${bindir}/libgcrypt-config" |
32 | 31 | ||
diff --git a/meta/recipes-support/libunwind/libunwind_1.8.1.bb b/meta/recipes-support/libunwind/libunwind_1.8.1.bb index 68d7a98ee4..10714ea247 100644 --- a/meta/recipes-support/libunwind/libunwind_1.8.1.bb +++ b/meta/recipes-support/libunwind/libunwind_1.8.1.bb | |||
@@ -28,7 +28,7 @@ PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,xz" | |||
28 | PACKAGECONFIG[zlib] = "--enable-zlibdebuginfo,--disable-zlibdebuginfo,zlib" | 28 | PACKAGECONFIG[zlib] = "--enable-zlibdebuginfo,--disable-zlibdebuginfo,zlib" |
29 | PACKAGECONFIG[latexdocs] = "--enable-documentation, --disable-documentation, latex2man-native" | 29 | PACKAGECONFIG[latexdocs] = "--enable-documentation, --disable-documentation, latex2man-native" |
30 | 30 | ||
31 | EXTRA_OECONF = "--enable-static" | 31 | EXTRA_OECONF = "--enable-static --disable-tests" |
32 | 32 | ||
33 | # http://errors.yoctoproject.org/Errors/Details/20487/ | 33 | # http://errors.yoctoproject.org/Errors/Details/20487/ |
34 | ARM_INSTRUCTION_SET:armv4 = "arm" | 34 | ARM_INSTRUCTION_SET:armv4 = "arm" |