From d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Mon, 11 Dec 2023 02:45:28 +0000 Subject: [PATCH] add boot partition size --- kernel/tools/build/feature/Makefile | 67 +++++++++++++++++++++++++++++---- 1 files changed, 58 insertions(+), 9 deletions(-) diff --git a/kernel/tools/build/feature/Makefile b/kernel/tools/build/feature/Makefile index 6696a4b..2212509 100644 --- a/kernel/tools/build/feature/Makefile +++ b/kernel/tools/build/feature/Makefile @@ -15,21 +15,24 @@ test-hello.bin \ test-libaudit.bin \ test-libbfd.bin \ + test-libbfd-buildid.bin \ test-disassembler-four-args.bin \ test-reallocarray.bin \ test-libbfd-liberty.bin \ test-libbfd-liberty-z.bin \ test-cplus-demangle.bin \ + test-libcap.bin \ test-libelf.bin \ test-libelf-getphdrnum.bin \ test-libelf-gelf_getnote.bin \ test-libelf-getshdrstrndx.bin \ - test-libelf-mmap.bin \ + test-libdebuginfod.bin \ test-libnuma.bin \ test-numa_num_possible_cpus.bin \ test-libperl.bin \ test-libpython.bin \ test-libslang.bin \ + test-libslang-include-subdir.bin \ test-libcrypto.bin \ test-libunwind.bin \ test-libunwind-debug-frame.bin \ @@ -50,22 +53,30 @@ test-zlib.bin \ test-lzma.bin \ test-bpf.bin \ + test-libbpf.bin \ test-get_cpuid.bin \ test-sdt.bin \ test-cxx.bin \ test-gettid.bin \ test-jvmti.bin \ + test-jvmti-cmlr.bin \ test-sched_getcpu.bin \ test-setns.bin \ test-libopencsd.bin \ test-clang.bin \ test-llvm.bin \ - test-llvm-version.bin + test-llvm-version.bin \ + test-libaio.bin \ + test-libzstd.bin \ + test-clang-bpf-co-re.bin \ + test-file-handle.bin \ + test-libpfm4.bin FILES := $(addprefix $(OUTPUT),$(FILES)) PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config LLVM_CONFIG ?= llvm-config +CLANG ?= clang all: $(FILES) @@ -78,7 +89,7 @@ ############################### $(OUTPUT)test-all.bin: - $(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma + $(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -I/usr/include/slang -lslang $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma -lzstd -lcap $(OUTPUT)test-hello.bin: $(BUILD) @@ -97,6 +108,9 @@ $(OUTPUT)test-bionic.bin: $(BUILD) + +$(OUTPUT)test-libcap.bin: + $(BUILD) -lcap $(OUTPUT)test-libelf.bin: $(BUILD) -lelf @@ -131,9 +145,6 @@ $(OUTPUT)test-dwarf_getlocations.bin: $(BUILD) $(DWARFLIBS) -$(OUTPUT)test-libelf-mmap.bin: - $(BUILD) -lelf - $(OUTPUT)test-libelf-getphdrnum.bin: $(BUILD) -lelf @@ -142,6 +153,9 @@ $(OUTPUT)test-libelf-getshdrstrndx.bin: $(BUILD) -lelf + +$(OUTPUT)test-libdebuginfod.bin: + $(BUILD) -ldebuginfod $(OUTPUT)test-libnuma.bin: $(BUILD) -lnuma @@ -176,13 +190,16 @@ $(BUILD) -laudit $(OUTPUT)test-libslang.bin: - $(BUILD) -I/usr/include/slang -lslang + $(BUILD) -lslang + +$(OUTPUT)test-libslang-include-subdir.bin: + $(BUILD) -lslang $(OUTPUT)test-libcrypto.bin: $(BUILD) -lcrypto $(OUTPUT)test-gtk2.bin: - $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) + $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) -Wno-deprecated-declarations $(OUTPUT)test-gtk2-infobar.bin: $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) @@ -193,8 +210,15 @@ PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null) PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS)) PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS)) -PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null` +PERL_EMBED_CCOPTS = $(shell perl -MExtUtils::Embed -e ccopts 2>/dev/null) FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS) + +ifeq ($(CC_NO_CLANG), 0) + PERL_EMBED_LDOPTS := $(filter-out -specs=%,$(PERL_EMBED_LDOPTS)) + PERL_EMBED_CCOPTS := $(filter-out -flto=auto -ffat-lto-objects, $(PERL_EMBED_CCOPTS)) + PERL_EMBED_CCOPTS := $(filter-out -specs=%,$(PERL_EMBED_CCOPTS)) + FLAGS_PERL_EMBED += -Wno-compound-token-split-by-macro +endif $(OUTPUT)test-libperl.bin: $(BUILD) $(FLAGS_PERL_EMBED) @@ -203,6 +227,9 @@ $(BUILD) $(FLAGS_PYTHON_EMBED) $(OUTPUT)test-libbfd.bin: + $(BUILD) -DPACKAGE='"perf"' -lbfd -ldl + +$(OUTPUT)test-libbfd-buildid.bin: $(BUILD) -DPACKAGE='"perf"' -lbfd -ldl $(OUTPUT)test-disassembler-four-args.bin: @@ -253,6 +280,9 @@ $(OUTPUT)test-bpf.bin: $(BUILD) +$(OUTPUT)test-libbpf.bin: + $(BUILD) -lbpf + $(OUTPUT)test-sdt.bin: $(BUILD) @@ -263,6 +293,9 @@ $(BUILD) $(OUTPUT)test-jvmti.bin: + $(BUILD) + +$(OUTPUT)test-jvmti-cmlr.bin: $(BUILD) $(OUTPUT)test-llvm.bin: @@ -291,6 +324,22 @@ -include $(OUTPUT)*.d +$(OUTPUT)test-libaio.bin: + $(BUILD) -lrt + +$(OUTPUT)test-libzstd.bin: + $(BUILD) -lzstd + +$(OUTPUT)test-clang-bpf-co-re.bin: + $(CLANG) -S -g -target bpf -o - $(patsubst %.bin,%.c,$(@F)) | \ + grep BTF_KIND_VAR + +$(OUTPUT)test-file-handle.bin: + $(BUILD) + +$(OUTPUT)test-libpfm4.bin: + $(BUILD) -lpfm + ############################### clean: -- Gitblit v1.6.2