From: Gerhard Sittig Date: Sat, 26 Feb 2022 10:27:44 +0000 (+0100) Subject: sigrok-cross-mingw: patch for boost numeric literals issue in MXE builds X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=754b6dffe1c47007abc6f06f8cd99b329aca6b9b;p=sigrok-util.git sigrok-cross-mingw: patch for boost numeric literals issue in MXE builds Patch the pulseview cmake instructions within sigrok-util until the pulseview.git repository builds out of the box. General applicability of the compiler switch on all platforms is yet to get determined. --- diff --git a/cross-compile/mingw/pulseview-boost-numeric-literals.patch b/cross-compile/mingw/pulseview-boost-numeric-literals.patch new file mode 100644 index 0000000..254cdaf --- /dev/null +++ b/cross-compile/mingw/pulseview-boost-numeric-literals.patch @@ -0,0 +1,25 @@ +Newer boost versions phrase numeric literals in ways that are not +supported out of the box. Pass a compiler switch which unbreaks the +Pulseview build with current MXE (as of 2022-02). See bug 1771. + +TODO It is yet to get determined whether the CMakeLists.txt change is +universally applicable to all supported platforms and compiler versions +that are used with Pulseview (after all non-default compiler behaviour +is enabled). When the pulseview.git repository contains the change, +then this patch becomes obsolete. + + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7791b1b138da..d43681c195cf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -488,6 +488,7 @@ add_definitions(-D__STDC_LIMIT_MACROS) + add_definitions(-Wall -Wextra) + add_definitions(-std=c++11) + add_definitions(-DBOOST_MATH_DISABLE_FLOAT128=1) ++add_definitions(-fext-numeric-literals) + if(WIN32) + add_definitions(-Wa,-mbig-obj -O3) + endif() diff --git a/cross-compile/mingw/sigrok-cross-mingw b/cross-compile/mingw/sigrok-cross-mingw index a26fc5e..12c68ec 100755 --- a/cross-compile/mingw/sigrok-cross-mingw +++ b/cross-compile/mingw/sigrok-cross-mingw @@ -250,6 +250,7 @@ cd .. $ECHO "component pulseview ..." $GIT_CLONE $REPO_BASE/pulseview cd pulseview +patch -p1 < ../../pulseview-boost-numeric-literals.patch patch -p1 < ../../pulseview-manual-pdf-hack.patch cp ../../FileAssociation.nsh contrib $CMAKE \