]> sigrok.org Git - sigrok-util.git/commitdiff
sigrok-cross-mingw: patch for boost numeric literals issue in MXE builds
authorGerhard Sittig <redacted>
Sat, 26 Feb 2022 10:27:44 +0000 (11:27 +0100)
committerGerhard Sittig <redacted>
Sat, 26 Feb 2022 10:55:39 +0000 (11:55 +0100)
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.

cross-compile/mingw/pulseview-boost-numeric-literals.patch [new file with mode: 0644]
cross-compile/mingw/sigrok-cross-mingw

diff --git a/cross-compile/mingw/pulseview-boost-numeric-literals.patch b/cross-compile/mingw/pulseview-boost-numeric-literals.patch
new file mode 100644 (file)
index 0000000..254cdaf
--- /dev/null
@@ -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()
index a26fc5e89c5688717349ca8eb4f4070cda81e379..12c68ec1bacc5b1cac754f56fc297af2b785601c 100755 (executable)
@@ -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 \