浏览代码

shadowsocksr-libev: fix build with GCC12/13

coolsnowwolf 1 年之前
父节点
当前提交
24c4890aa8
共有 1 个文件被更改,包括 8 次插入0 次删除
  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))) \
 )