[PATCH] build gr-iqbal w/ clang

Brian Waters brian at brianmwaters.net
Mon Nov 11 06:16:11 UTC 2019


Clang doesn't automatically define the "complex" keyword like old versions of GCC apparently used to. Appending this little check enabled compiling gr-iqbal w/ Clang, which is now the default compiler on OpenBSD and I think FreeBSD too.

diff --git a/lib/optimize_c.cc b/lib/optimize_c.cc
index 2cad998..6c8b706 100644
--- a/lib/optimize_c.cc
+++ b/lib/optimize_c.cc
@@ -31,7 +31,7 @@
                __GNUC_PATCHLEVEL__     \
        )

-#if GCC_VERSION >= 40800
+#if GCC_VERSION >= 40800 || defined(__clang__)
 # define complex _Complex
 # undef _GLIBCXX_HAVE_COMPLEX_H
 #endif


-- 
Brian M. Waters
brian at brianmwaters.net


More information about the osmocom-sdr mailing list