From c10b1859335189d55aae4d2ec4d55ff20b03e829 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Wed, 13 Aug 2025 22:39:43 +0200 Subject: [PATCH] gnu: rapidjson: Fix build on x86-32. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/web.scm (rapidjson)[#:configure-flags]: Add “-Wno-error=array-bounds” and “-Wno-error=stringop-overflow” on x86-32. [#:phases]: Add ‘skip-failing-tests’ on x86-32. --- gnu/packages/web.scm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index efa091ae8cb2f1aa86ec49c2b6673da75b3e2003..60f53d6e336fdacf19d9d184d7c2937d06fff9ab 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -1712,13 +1712,28 @@ current version of any major web browser.") (build-system cmake-build-system) (arguments (list - #:configure-flags #~(list "-DCMAKE_CXX_FLAGS=-Wno-free-nonheap-object") + #:configure-flags + (if (target-x86-32?) + #~(list (string-append "-DCMAKE_CXX_FLAGS=-Wno-free-nonheap-object" + " -Wno-error=array-bounds" + " -Wno-error=stringop-overflow")) + #~(list "-DCMAKE_CXX_FLAGS=-Wno-free-nonheap-object")) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'fix-march=native (lambda _ (substitute* "CMakeLists.txt" (("-m[^-]*=native") "")))) + #$@(if (target-x86-32?) + #~((add-after 'unpack 'skip-failing-tests + (lambda _ + (substitute* "test/unittest/schematest.cpp" + (("\"multipleOf\\.json\"," all) + (string-append "/*" all "*/"))) + ;; XXX: Re-enable once valgrind/pinned >= 3.25. + (substitute* "test/unittest/CMakeLists.txt" + (("COMMAND valgrind") "COMMAND true valgrind"))))) + #~()) (add-after 'fix-march=native 'skip-deleted-tests (lambda _ (substitute* "test/unittest/CMakeLists.txt"