From 6a9ed97fe1b5c9f6dfc006d61431b9993f1cb411 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 1 Dec 2022 15:48:42 -0800 Subject: fwts: Upgrade to 22.11.00 Forward port 0003-Remove-Werror-from-build.patch Add a patch to fix parallel build race condition Signed-off-by: Khem Raj --- ...-Disable-parallel-builds-of-lex-bison-fil.patch | 68 ++++++++++++++++++++++ .../fwts/fwts/0003-Remove-Werror-from-build.patch | 8 +-- meta-oe/recipes-test/fwts/fwts_22.01.00.bb | 34 ----------- meta-oe/recipes-test/fwts/fwts_22.11.00.bb | 35 +++++++++++ 4 files changed, 107 insertions(+), 38 deletions(-) create mode 100644 meta-oe/recipes-test/fwts/fwts/0001-libfwtsiasl-Disable-parallel-builds-of-lex-bison-fil.patch delete mode 100644 meta-oe/recipes-test/fwts/fwts_22.01.00.bb create mode 100644 meta-oe/recipes-test/fwts/fwts_22.11.00.bb diff --git a/meta-oe/recipes-test/fwts/fwts/0001-libfwtsiasl-Disable-parallel-builds-of-lex-bison-fil.patch b/meta-oe/recipes-test/fwts/fwts/0001-libfwtsiasl-Disable-parallel-builds-of-lex-bison-fil.patch new file mode 100644 index 0000000000..90bee3e722 --- /dev/null +++ b/meta-oe/recipes-test/fwts/fwts/0001-libfwtsiasl-Disable-parallel-builds-of-lex-bison-fil.patch @@ -0,0 +1,68 @@ +From 6135a318dd48787f1b6e1296c755d67575f44dc1 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 1 Dec 2022 15:18:55 -0800 +Subject: [PATCH] libfwtsiasl: Disable parallel builds of lex/bison files + +Since they are using mv cmds they maybe conflicting with each other in +highly parallelized build resulting in errors like + +| mv dtcompilerparser.tab.c dtcompilerparser.c +| mv dtcompilerparser.tab.c dtcompilerparser.c +| cp dtcompilerparser.tab.h dtcompilerparser.y.h +| mv dtcompilerparser.tab.c dtcompilerparser.c +| mv: cannot stat 'dtcompilerparser.tab.c': No such file or directory +| make[3]: *** [Makefile:4196: dtcompilerparser.c] Error 1 +| make[3]: *** Waiting for unfinished jobs.... +| mv: cannot stat 'dtcompilerparser.tab.c': No such file or directory +| make[3]: *** [Makefile:4194: dtcompilerparser.y.h] Error 1 + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + src/libfwtsiasl/Makefile.am | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/src/libfwtsiasl/Makefile.am ++++ b/src/libfwtsiasl/Makefile.am +@@ -58,32 +58,24 @@ aslcompiler.y: $(ASL_PARSER) + aslcompilerlex.c: $(ASL_LEXER) + ${LEX} ${AM_LFLAGS} -PAslCompiler -o$@ $(top_srcdir)/src/acpica/source/compiler/aslcompiler.l + +-.NOTPARALLEL: aslcompiler.c ++.NOTPARALLEL: aslcompiler.c aslcompiler.y.h + aslcompiler.c aslcompiler.y.h: aslcompiler.y +- ${YACC} ${AM_YFLAGS} -d -baslcompiler -pAslCompiler $^ +- mv aslcompiler.tab.c aslcompiler.c +- cp aslcompiler.tab.h aslcompiler.y.h ++ ${YACC} ${AM_YFLAGS} -d -baslcompiler -pAslCompiler --header=aslcompiler.y.h --output=aslcompiler.c $^ + +-.NOTPARALLEL: dtcompilerparserlex.c ++.NOTPARALLEL: dtcompilerparserlex.c dtcompilerparser.c dtcompilerparser.y.h + dtcompilerparserlex.c dtcompilerparser.c dtcompilerparser.y.h: $(top_srcdir)/src/acpica/source/compiler/dtcompilerparser.l $(top_srcdir)/src/acpica/source/compiler/dtcompilerparser.y + ${LEX} ${AM_LFLAGS} -PDtCompilerParser -odtcompilerparserlex.c $< +- ${YACC} ${AM_YFLAGS} -bdtcompilerparser -pDtCompilerParser $(top_srcdir)/src/acpica/source/compiler/dtcompilerparser.y +- mv dtcompilerparser.tab.c dtcompilerparser.c +- cp dtcompilerparser.tab.h dtcompilerparser.y.h ++ ${YACC} ${AM_YFLAGS} -bdtcompilerparser -pDtCompilerParser --header=dtcompilerparser.y.h --output=dtcompilerparser.c $(top_srcdir)/src/acpica/source/compiler/dtcompilerparser.y + +-.NOTPARALLEL: dtparserlex.c ++.NOTPARALLEL: dtparserlex.c dtparser.c dtparser.y.h + dtparserlex.c dtparser.c dtparser.y.h: $(top_srcdir)/src/acpica/source/compiler/dtparser.l $(top_srcdir)/src/acpica/source/compiler/dtparser.y + ${LEX} ${AM_LFLAGS} -PDtParser -odtparserlex.c $< +- ${YACC} ${AM_YFLAGS} -bdtparser -pDtParser $(top_srcdir)/src/acpica/source/compiler/dtparser.y +- mv dtparser.tab.c dtparser.c +- cp dtparser.tab.h dtparser.y.h ++ ${YACC} ${AM_YFLAGS} -bdtparser -pDtParser --header=dtparser.y.h --output=dtparser.c $(top_srcdir)/src/acpica/source/compiler/dtparser.y + +-.NOTPARALLEL: prparserlex.c ++.NOTPARALLEL: prparserlex.c prparser.c prparser.y.h + prparserlex.c prparser.c prparser.y.h: $(top_srcdir)/src/acpica/source/compiler/prparser.l $(top_srcdir)/src/acpica/source/compiler/prparser.y + ${LEX} ${AM_LFLAGS} -PPrParser -oprparserlex.c $< +- ${YACC} ${AM_YFLAGS} -bprparser -pPrParser $(top_srcdir)/src/acpica/source/compiler/prparser.y +- mv prparser.tab.c prparser.c +- cp prparser.tab.h prparser.y.h ++ ${YACC} ${AM_YFLAGS} -bprparser -pPrParser --header=prparser.y.h --output=prparser.c $(top_srcdir)/src/acpica/source/compiler/prparser.y + + pkglib_LTLIBRARIES = libfwtsiasl.la + diff --git a/meta-oe/recipes-test/fwts/fwts/0003-Remove-Werror-from-build.patch b/meta-oe/recipes-test/fwts/fwts/0003-Remove-Werror-from-build.patch index 6dc45ba84b..610113e6fe 100644 --- a/meta-oe/recipes-test/fwts/fwts/0003-Remove-Werror-from-build.patch +++ b/meta-oe/recipes-test/fwts/fwts/0003-Remove-Werror-from-build.patch @@ -15,7 +15,7 @@ Upstream-Status: Pending @@ -13,7 +13,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/efi_runtime \ -I$(top_srcdir)/smccc_test \ - -pthread `pkg-config --cflags glib-2.0 gio-2.0` \ + -pthread \ - -Wall -Werror -Wextra \ + -Wall -Wextra \ -Wno-address-of-packed-member \ @@ -23,9 +23,9 @@ Upstream-Status: Pending -Wno-long-long -Wredundant-decls -Wshadow \ --- a/src/lib/src/Makefile.am +++ b/src/lib/src/Makefile.am -@@ -25,7 +25,7 @@ AM_CPPFLAGS = \ - `pkg-config --silence-errors --cflags json-c` \ - `pkg-config --cflags glib-2.0 gio-2.0` \ +@@ -22,7 +22,7 @@ AM_CPPFLAGS = \ + -I$(top_srcdir)/src/acpica/source/include \ + -I$(top_srcdir)/src/acpica/source/compiler \ -DDATAROOTDIR=\"$(datarootdir)\" \ - -Wall -Werror -Wextra \ + -Wall -Wextra \ diff --git a/meta-oe/recipes-test/fwts/fwts_22.01.00.bb b/meta-oe/recipes-test/fwts/fwts_22.01.00.bb deleted file mode 100644 index 1f2d3e0521..0000000000 --- a/meta-oe/recipes-test/fwts/fwts_22.01.00.bb +++ /dev/null @@ -1,34 +0,0 @@ -SUMMARY = "Firmware testsuite" -DESCRIPTION = "The tool fwts comprises of over fifty tests that are designed to exercise and test different aspects of a machine's firmware. Many of these tests need super user access to read BIOS data and ACPI tables, so the tool requires running with super user privileges (e.g. with sudo)." -HOMEPAGE = "https://wiki.ubuntu.com/Kernel/Reference/fwts" - -LICENSE = "GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://src/main.c;beginline=1;endline=16;md5=31da590f3e9f3bd34dcdb9e4db568519" - -SRC_URI = "http://fwts.ubuntu.com/release/fwts-V${PV}.tar.gz;subdir=${BP} \ - file://0001-Add-correct-printf-qualifier-for-off_t.patch \ - file://0003-Remove-Werror-from-build.patch \ - file://0004-Define-__SWORD_TYPE-if-not-defined-by-libc.patch \ - file://0005-Undefine-PAGE_SIZE.patch \ - file://0006-use-intptr_t-to-fix-pointer-to-int-cast-issues.patch \ - " -SRC_URI[sha256sum] = "45045a095d9933d9ff39712372ab1f3078ca8e29c007b3f97b810cdb8c27b5c3" - -COMPATIBLE_HOST = "(i.86|x86_64|aarch64|powerpc64).*-linux" - -DEPENDS = "libpcre glib-2.0 dtc bison-native libbsd" -DEPENDS:append:libc-musl = " libexecinfo" - -inherit autotools bash-completion pkgconfig - -LDFLAGS:append:libc-musl = " -lexecinfo" - -# We end up linker barfing with undefined symbols on ppc64 but not on other arches -# surprisingly -ASNEEDED:powerpc64le = "" - -FILES:${PN} += "${libdir}/fwts/lib*${SOLIBS}" -FILES:${PN}-dev += "${libdir}/fwts/lib*${SOLIBSDEV} ${libdir}/fwts/lib*.la" -FILES:${PN}-staticdev += "${libdir}/fwts/lib*a" - -RDEPENDS:${PN} += "dtc" diff --git a/meta-oe/recipes-test/fwts/fwts_22.11.00.bb b/meta-oe/recipes-test/fwts/fwts_22.11.00.bb new file mode 100644 index 0000000000..f1028074d7 --- /dev/null +++ b/meta-oe/recipes-test/fwts/fwts_22.11.00.bb @@ -0,0 +1,35 @@ +SUMMARY = "Firmware testsuite" +DESCRIPTION = "The tool fwts comprises of over fifty tests that are designed to exercise and test different aspects of a machine's firmware. Many of these tests need super user access to read BIOS data and ACPI tables, so the tool requires running with super user privileges (e.g. with sudo)." +HOMEPAGE = "https://wiki.ubuntu.com/Kernel/Reference/fwts" + +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://src/main.c;beginline=1;endline=16;md5=31da590f3e9f3bd34dcdb9e4db568519" + +SRC_URI = "http://fwts.ubuntu.com/release/fwts-V${PV}.tar.gz;subdir=${BP} \ + file://0001-Add-correct-printf-qualifier-for-off_t.patch \ + file://0003-Remove-Werror-from-build.patch \ + file://0004-Define-__SWORD_TYPE-if-not-defined-by-libc.patch \ + file://0005-Undefine-PAGE_SIZE.patch \ + file://0006-use-intptr_t-to-fix-pointer-to-int-cast-issues.patch \ + file://0001-libfwtsiasl-Disable-parallel-builds-of-lex-bison-fil.patch \ + " +SRC_URI[sha256sum] = "4af4e1e0f1ae9313297af722d744ba47a81c81bc5bdeab3f4f40837a39e4b808" + +COMPATIBLE_HOST = "(i.86|x86_64|aarch64|powerpc64).*-linux" + +DEPENDS = "libpcre glib-2.0 dtc bison-native flex-native libbsd" +DEPENDS:append:libc-musl = " libexecinfo" + +inherit autotools bash-completion pkgconfig + +LDFLAGS:append:libc-musl = " -lexecinfo" + +# We end up linker barfing with undefined symbols on ppc64 but not on other arches +# surprisingly +ASNEEDED:powerpc64le = "" + +FILES:${PN} += "${libdir}/fwts/lib*${SOLIBS}" +FILES:${PN}-dev += "${libdir}/fwts/lib*${SOLIBSDEV} ${libdir}/fwts/lib*.la" +FILES:${PN}-staticdev += "${libdir}/fwts/lib*a" + +RDEPENDS:${PN} += "dtc" -- cgit 1.2.3-korg