aboutsummaryrefslogtreecommitdiffstats
path: root/translate/grt
diff options
context:
space:
mode:
authorgingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7>2006-02-14 10:48:56 +0000
committergingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7>2006-02-14 10:48:56 +0000
commit750ed35d4bbec0015e2e7e1f4f3543c7217bbcb2 (patch)
tree07bbdc41b0c1c9257966d807171e9bc926298ecf /translate/grt
parent517a3edcd4d7d97cdfe3301e362859eb816aeb29 (diff)
downloadghdl-750ed35d4bbec0015e2e7e1f4f3543c7217bbcb2.tar.gz
ghdl-750ed35d4bbec0015e2e7e1f4f3543c7217bbcb2.tar.bz2
ghdl-750ed35d4bbec0015e2e7e1f4f3543c7217bbcb2.zip
bugs fixes
Diffstat (limited to 'translate/grt')
-rw-r--r--translate/grt/Makefile.inc3
-rw-r--r--translate/grt/config/linux.c7
2 files changed, 8 insertions, 2 deletions
diff --git a/translate/grt/Makefile.inc b/translate/grt/Makefile.inc
index 4df527501..584ed55de 100644
--- a/translate/grt/Makefile.inc
+++ b/translate/grt/Makefile.inc
@@ -81,6 +81,7 @@ GRT_ADD_OBJS:=$(GRT_TARGET_OBJS) grt-cbinding.o grt-cvpi.o
#GRT_USE_PTHREADS=y
ifeq ($(GRT_USE_PTHREADS),y)
+ GRT_CFLAGS+=-DUSE_THREADS
GRT_ADD_OBJS+=grt-cthreads.o
GRT_EXTRA_LIB+=-lpthread
endif
@@ -128,7 +129,7 @@ amd64.o: $(GRTSRCDIR)/config/amd64.S
$(CC) -c $(GRT_FLAGS) -o $@ $<
linux.o: $(GRTSRCDIR)/config/linux.c
- $(CC) -c $(GRT_FLAGS) -o $@ $<
+ $(CC) -c $(GRT_FLAGS) $(GRT_CFLAGS) -o $@ $<
win32.o: $(GRTSRCDIR)/config/win32.c
$(CC) -c $(GRT_FLAGS) -o $@ $<
diff --git a/translate/grt/config/linux.c b/translate/grt/config/linux.c
index ab999c0a3..2fe92c0fa 100644
--- a/translate/grt/config/linux.c
+++ b/translate/grt/config/linux.c
@@ -189,7 +189,12 @@ static void grt_signal_setup (void)
#endif
/* Context for the main stack. */
-static __thread struct stack_context main_stack_context;
+#ifdef USE_THREADS
+#define THREAD __thread
+#else
+#define THREAD
+#endif
+static THREAD struct stack_context main_stack_context;
extern void grt_set_main_stack (struct stack_context *stack);