Browse Source

shadowsocksr-libev: fix build with GCC12/13

coolsnowwolf 1 year ago
parent
commit
24c4890aa8
1 changed files with 8 additions and 0 deletions
  1. 8 0
      shadowsocksr-libev/Makefile

+ 8 - 0
shadowsocksr-libev/Makefile

@@ -60,6 +60,14 @@ CONFIGURE_ARGS += \
 TARGET_CFLAGS += -flto
 TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
 
+ifeq ($(GCC_MAJOR_VERSION),12)
+	TARGET_CFLAGS += -Wno-error=use-after-free
+endif
+
+ifeq ($(GCC_MAJOR_VERSION),13)
+	TARGET_CFLAGS += -Wno-error=use-after-free
+endif
+
 $(foreach component,$(SHADOWSOCKSR_COMPONENTS), \
   $(eval $(call BuildPackage,shadowsocksr-libev-ssr-$(component))) \
 )