On Wed, Oct 04, 2017 at 07:45:25PM +0200, Enrico Forestieri wrote:
> On Tue, Oct 03, 2017 at 10:19:52PM +0200, Jean-Marc Lasgouttes wrote:
> > I get:
> > 
> > ../../stable/src/Paragraph.cpp: In member function ‘void
> > lyx::Paragraph::latex(const lyx::BufferParams&, const lyx::Font&,
> > lyx::otexstream&, const lyx::OutputParams&, int, int, bool) const’:
> > ../../stable/src/Paragraph.cpp:2378: error: thread-local storage not
> > supported for this target
> > 
> > 
> > It seems that the nice ifdef that try to define thread-local types are not
> > correct for this old os version.
> 
> I would be surprised if this is true. The code would be miscompiled in
> several other places, then.
> 
> The other possibility is that the error is real, while the info at
> http://forum.dlang.org/post/mailman.3439.1452269142.22025.digitalmars-d-b...@puremagic.com
> is wrong.

Sorry. I didn't notice that you were talking about 2.2.x. Yes, you are
probably right.

Richard, is the attached patch Ok?

-- 
Enrico
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 48d0e1737f..4ced96ff0f 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -69,8 +69,8 @@
 using namespace std;
 using namespace lyx::support;
 
-// gcc < 4.8.0 and msvc < 2015 do not support C++11 thread_local
-#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ < 8) || __cplusplus 
< 201103L)
+// OSX clang, gcc < 4.8.0, and msvc < 2015 do not support C++11 thread_local
+#if defined(__APPLE__) || (defined(__GNUC__) && ((__GNUC__ == 4 && 
__GNUC_MINOR__ < 8) || __cplusplus < 201103L))
 #define THREAD_LOCAL_STATIC static __thread
 #elif defined(_MSC_VER) && ((_MSC_VER < 1900) || __cplusplus < 201103L)
 #define THREAD_LOCAL_STATIC static __declspec(thread)

Reply via email to