Browse Source

fix 'cannot allocate memory in static TLS block' runtime error (Linux)

pull/1639/head
bsp2 6 years ago
parent
commit
b45c379d5b
2 changed files with 6 additions and 3 deletions
  1. +5
    -3
      dep/yac/sharedlib_linux.mk
  2. +1
    -0
      dep/yac/yac.h

+ 5
- 3
dep/yac/sharedlib_linux.mk View File

@@ -11,8 +11,10 @@ ifeq ("$(TARGET)","")
TARGET=$(TARGET_BASENAME).so
endif

CPPFLAGS += -fPIC -I"$(VSVR_BASE_DIR)/dep/yac" $(EXTRAFLAGS)
CFLAGS += -fPIC -I"$(VSVR_BASE_DIR)/dep/yac" $(EXTRAFLAGS)
CPPFLAGS += -I"$(VSVR_BASE_DIR)/dep/yac" $(EXTRAFLAGS)
#CPPFLAGS+= -fPIC
CFLAGS += -I"$(VSVR_BASE_DIR)/dep/yac" $(EXTRAFLAGS)
#CFLAGS+= -fPIC
EXTRALIBS += -L$(CROSS_ROOT)/usr/lib -lm -lpthread

###########include sharedlib_common_gcc.mk
@@ -28,7 +30,7 @@ CFLAGS += -Wall -I$(CROSS_ROOT)/usr/include
# Build plugin library
#
bin: $(BIN_RULES) $(ALL_OBJ)
$(CPP) -shared -o "$(TARGET)" -Wl,-soname,$(TARGET) $(ALL_OBJ) $(EXTRALIBS)
$(CPP) -shared -o "$(TARGET)" -Wl,-soname,$(TARGET) -mtls-dialect=gnu2 $(ALL_OBJ) $(EXTRALIBS)
ifneq ($(DEBUG),y)
$(STRIP) "$(TARGET)"
endif


+ 1
- 0
dep/yac/yac.h View File

@@ -52,6 +52,7 @@

/// Define in the project/makefile to disable the use of thread local storage
/* #define YAC_FORCE_NO_TLS defined */
#define YAC_FORCE_NO_PRINTF_TLS defined // avoid huge 128k TLS printf buffer

// ----
// ---- Version number


Loading…
Cancel
Save