Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
39
tools/libdeflate/Makefile
Normal file
39
tools/libdeflate/Makefile
Normal file
@@ -0,0 +1,39 @@
|
||||
#
|
||||
# Copyright (C) 2022 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libdeflate
|
||||
PKG_VERSION:=1.20
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/ebiggers/libdeflate/releases/download/v$(PKG_VERSION)
|
||||
PKG_HASH:=c52cf0239fd644d71c9e88613dd7431a5306ebee1280c5791c71ca264869250a
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
DECOMPRESS_CMD:=$(STAGING_DIR_HOST)/bin/gzip -dc $(DL_DIR)/$(PKG_SOURCE) |
|
||||
|
||||
define Host/Compile
|
||||
$(HOSTCC_NOCACHE) $(HOST_CFLAGS) $(HOST_LDFLAGS) \
|
||||
$(HOST_BUILD_DIR)/lib/*{,/*}.c \
|
||||
$(HOST_BUILD_DIR)/programs/{gzip,prog_util,tgetopt}.c \
|
||||
-o $(HOST_BUILD_DIR)/libdeflate-gzip
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/libdeflate-gzip $(STAGING_DIR_HOST)/bin/
|
||||
$(LN) libdeflate-gzip $(STAGING_DIR_HOST)/bin/libdeflate-gunzip
|
||||
endef
|
||||
|
||||
define Host/Uninstall
|
||||
$(RM) $(STAGING_DIR_HOST)/bin/libdeflate-gzip
|
||||
$(RM) $(STAGING_DIR_HOST)/bin/libdeflate-gunzip
|
||||
$(call Host/Uninstall/Default)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
@@ -0,0 +1,32 @@
|
||||
From e522b1d09d3536ddc15459b4259150f4a53ee65a Mon Sep 17 00:00:00 2001
|
||||
From: Eric Biggers <ebiggers@google.com>
|
||||
Date: Thu, 4 Apr 2024 20:16:33 -0400
|
||||
Subject: [PATCH] lib/x86: increase AVX-VNNI gcc prerequisite to 12.1
|
||||
|
||||
Although gcc 11.1 supports AVX-VNNI, a popular distro pairs it with a
|
||||
binutils version that does not. Require gcc 12 instead.
|
||||
|
||||
Resolves https://github.com/ebiggers/libdeflate/issues/365
|
||||
---
|
||||
lib/x86/adler32_impl.h | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/lib/x86/adler32_impl.h
|
||||
+++ b/lib/x86/adler32_impl.h
|
||||
@@ -52,8 +52,15 @@
|
||||
/*
|
||||
* AVX-VNNI implementation. This is used on CPUs that have AVX2 and AVX-VNNI
|
||||
* but don't have AVX-512, for example Intel Alder Lake.
|
||||
+ *
|
||||
+ * Unusually for a new CPU feature, gcc added support for the AVX-VNNI
|
||||
+ * intrinsics (in gcc 11.1) slightly before binutils added support for
|
||||
+ * assembling AVX-VNNI instructions (in binutils 2.36). Distros can reasonably
|
||||
+ * have gcc 11 with binutils 2.35. Because of this issue, we check for gcc 12
|
||||
+ * instead of gcc 11. (libdeflate supports direct compilation without a
|
||||
+ * configure step, so checking the binutils version is not always an option.)
|
||||
*/
|
||||
-#if GCC_PREREQ(11, 1) || CLANG_PREREQ(12, 0, 13000000) || MSVC_PREREQ(1930)
|
||||
+#if GCC_PREREQ(12, 1) || CLANG_PREREQ(12, 0, 13000000) || MSVC_PREREQ(1930)
|
||||
# define adler32_x86_avx2_vnni adler32_x86_avx2_vnni
|
||||
# define SUFFIX _avx2_vnni
|
||||
# define ATTRIBUTES _target_attribute("avx2,avxvnni")
|
||||
Reference in New Issue
Block a user