pengqianheng / rpms / kernel

Forked from rpms/kernel a year ago
Clone
Michel Alexandre Salim d0cfe2
Support building with pahole >= 1.24, see
Michel Alexandre Salim d0cfe2
Stefan Roesch's post here https://devkernel.io/posts/pahole-error/
Michel Alexandre Salim d0cfe2
--- a/scripts/link-vmlinux.sh
Michel Alexandre Salim d0cfe2
+++ b/scripts/link-vmlinux.sh
Michel Alexandre Salim d0cfe2
@@ -240,6 +240,11 @@ gen_btf()
Michel Alexandre Salim d0cfe2
 	if [ "${pahole_ver}" -ge "121" ]; then
Michel Alexandre Salim d0cfe2
 		extra_paholeopt="${extra_paholeopt} --btf_gen_floats"
Michel Alexandre Salim d0cfe2
 	fi
Michel Alexandre Salim d0cfe2
+	if [ "${pahole_ver}" -ge "124" ]; then
Michel Alexandre Salim d0cfe2
+		# pahole 1.24 and above generate BTF_KIND_ENUM64 which is
Michel Alexandre Salim d0cfe2
+		# not supported by this kernel
Michel Alexandre Salim d0cfe2
+		extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_enum64"
Michel Alexandre Salim d0cfe2
+	fi
Michel Alexandre Salim d0cfe2
 
Michel Alexandre Salim d0cfe2
 	info "BTF" ${2}
Michel Alexandre Salim d0cfe2
 	LLVM_OBJCOPY="${OBJCOPY}" ${PAHOLE} -J ${extra_paholeopt} ${1}