[PATCH] build gr-iqbal w/ clang

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-sdr@lists.osmocom.org/.

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