From 86794adf4fbd0433f57e54ca39a772fd08a50ddc Mon Sep 17 00:00:00 2001
From: chenziyang <chenziyang4@huawei.com>
Date: Wed, 24 May 2023 18:04:25 +0800
Subject: [PATCH] hugepageedit: static-link build

---
 elf/Makefile | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/elf/Makefile b/elf/Makefile
index b5de4dd4..2b395a6f 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -209,10 +209,13 @@ endif
 
 ifeq (yes,$(enable-hugepage-shared-library))
 others += hugepageedit
-others-pie += hugepageedit
+others-static += hugepageedit
 install-bin += hugepageedit
 
-$(objpfx)hugepageedit: $(objpfx)hugepageedit.o
+hugepageedit-modules   := static-stubs
+extra-objs  += $(hugepageedit-modules:=.o)
+
+$(objpfx)hugepageedit: $(hugepageedit-modules:%=$(objpfx)%.o)
 
 ifeq ($(run-built-tests),yes)
 tests-special += $(objpfx)tst-hugepageedit1.out $(objpfx)tst-ld-hugepage-env.out	\
-- 
2.27.0

