From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server-vie001.gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_DBL_BLOCKED_OPENDNS, URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=new2025; t=1753760851; bh=hE1q1AXIxwdXjvaos5AtSuw39R7ZVB0bfuY9REZqOcA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Message-ID:Date:From: Reply-To:Subject:To:Cc:In-Reply-To:References:Resent-Date: Resent-From:Resent-To:Resent-Cc:User-Agent:Content-Type: Content-Transfer-Encoding; b=cXb1XUl5CwXInlM7FpxBB63ZN7qJ6hU63stb2du+JCSnXsR09xqfJHMK+BwEcnbGa Peind+CnW3W+mogdUEv9+/G8/4+W5/UAJwOwGAHCkXTw1Fxegxs7mo5I6qNh2ywP45 1K1nvxyIcfXLZ/AjJYev0GnUW/L0rDyQqQSRyAxFDqRW3cD2XgF3d9IbZ+NlLkQxuz O7ugkl8tc5/ZURzYkorpEZvNtvBYUk/OhTbW4Qyr7y/6r0vUkzomE09+Hq/wtb4qOF meAlmu+1YhmU835I4PGYGPaouZrDogql7oEWiWTbKFVjSHdenI+aEQ0nW3pcnm6t2L e9fKGkzwp9LkA== Received: from zero (unknown [182.253.228.104]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id 47EE83126ECB; Tue, 29 Jul 2025 03:47:30 +0000 (UTC) From: Ahmad Gani To: ammarfaizi2@gnuweeb.org Cc: gwml@vger.gnuweeb.org, reyuki@gnuweeb.org Subject: [PATCH gwproxy v2 1/3] io_uring: Add liburing to the code base Date: Tue, 29 Jul 2025 10:47:17 +0700 Message-ID: <20250729034719.190563-2-reyuki@gnuweeb.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250729034719.190563-1-reyuki@gnuweeb.org> References: <20250729034719.190563-1-reyuki@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Make the build process easier. Some people may not have had liburing installed on their system. Signed-off-by: Ahmad Gani --- .gitmodules | 4 ++++ Makefile | 10 ++++++++-- src/liburing | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .gitmodules create mode 160000 src/liburing diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000000..d49ed8e6e06f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "src/liburing"] + path = src/liburing + url = https://github.com/axboe/liburing + branch = master diff --git a/Makefile b/Makefile index 0fea43c9fce7..e5e0f756936a 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ LIBS = -lpthread DEPFLAGS = -MMD -MP -MF $@.d LDFLAGS_SHARED = $(LDFLAGS) -shared -fpic -fPIC GWPROXY_DIR = ./src/gwproxy +LIBURING_DIR = ./src/liburing/src ifeq ($(SANITIZE),1) CFLAGS += -fsanitize=address -fsanitize=undefined @@ -30,6 +31,8 @@ ifeq ($(STATIC),1) LDFLAGS += -static endif +LIBURING_TARGET = $(LIBURING_DIR)/liburing.a + GWPROXY_TARGET = gwproxy GWPROXY_CC_SOURCES = \ $(GWPROXY_DIR)/gwproxy.c \ @@ -39,7 +42,7 @@ GWPROXY_CC_SOURCES = \ ifeq ($(CONFIG_IO_URING),1) CFLAGS += -DCONFIG_IO_URING - LIBS += /usr/lib/liburing.a + LIBS += $(LIBURING_TARGET) GWPROXY_CC_SOURCES += $(GWPROXY_DIR)/ev/io_uring.c endif @@ -66,7 +69,10 @@ ALL_DEPFILES = $(ALL_OBJECTS:.o=.o.d) ALL_GWPROXY_OBJECTS = $(GWPROXY_OBJECTS) $(LIBGWPSOCKS5_OBJECTS) $(LIBGWDNS_OBJECTS) -all: $(GWPROXY_TARGET) $(LIBGWPSOCKS5_TARGET) $(LIBGWDNS_TARGET) +all: $(GWPROXY_TARGET) $(LIBGWPSOCKS5_TARGET) $(LIBGWDNS_TARGET) $(LIBURING_TARGET) + +$(LIBURING_TARGET): $(LIBURING_DIR) + @$(MAKE) -C $^ $(GWPROXY_TARGET): $(ALL_GWPROXY_OBJECTS) $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) diff --git a/src/liburing b/src/liburing new file mode 160000 index 000000000000..f2b6fb85b79b --- /dev/null +++ b/src/liburing @@ -0,0 +1 @@ +Subproject commit f2b6fb85b79baf17f2c0ea24a357c652caa2d7ba -- Ahmad Gani