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:
55
tools/util-linux/Makefile
Normal file
55
tools/util-linux/Makefile
Normal file
@@ -0,0 +1,55 @@
|
||||
#
|
||||
# Copyright (C) 2006-2015 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:=util-linux
|
||||
PKG_VERSION:=2.40.1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.40
|
||||
PKG_HASH:=8e396eececae2b3b68db232c33b8810faa7c31f6df19f98f512739293d5829b7
|
||||
PKG_CPE_ID:=cpe:/a:kernel:util-linux
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
HOST_CONFIGURE_ARGS += \
|
||||
--with-pic \
|
||||
--disable-shared \
|
||||
--disable-nls \
|
||||
--disable-all-programs \
|
||||
--enable-hexdump \
|
||||
--enable-libuuid \
|
||||
--without-util \
|
||||
--without-selinux \
|
||||
--without-audit \
|
||||
--without-udev \
|
||||
--without-ncursesw \
|
||||
--without-ncurses \
|
||||
--without-slang \
|
||||
--without-tinfo \
|
||||
--without-readline \
|
||||
--without-utempter \
|
||||
--without-cap-ng \
|
||||
--without-libz \
|
||||
--without-libmagic \
|
||||
--without-user \
|
||||
--without-btrfs \
|
||||
--without-systemd \
|
||||
--without-smack \
|
||||
--without-econf \
|
||||
--without-python \
|
||||
--without-cryptsetup
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
@@ -0,0 +1,28 @@
|
||||
From 37641f246ee9df7289b4e3054b3ded3912773722 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Tue, 25 Jun 2024 17:32:08 +0200
|
||||
Subject: [PATCH] hexdump: allow enabling with --disable-all-programs
|
||||
|
||||
Currently, if --disable-all-programs is used hexdump cannot be built
|
||||
as --enable-hexdump is not recognized, so lets add support for it.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
configure.ac | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2237,7 +2237,11 @@ UL_BUILD_INIT([column], [check])
|
||||
UL_REQUIRES_BUILD([column], [libsmartcols])
|
||||
AM_CONDITIONAL([BUILD_COLUMN], [test "x$build_column" = xyes])
|
||||
|
||||
-UL_BUILD_INIT([hexdump], [yes])
|
||||
+AC_ARG_ENABLE([hexdump],
|
||||
+ AS_HELP_STRING([--disable-hexdump], [do not build hexdump]),
|
||||
+ [], [UL_DEFAULT_ENABLE([hexdump], [check])]
|
||||
+)
|
||||
+UL_BUILD_INIT([hexdump])
|
||||
AM_CONDITIONAL([BUILD_HEXDUMP], [test "x$build_hexdump" = xyes])
|
||||
|
||||
UL_BUILD_INIT([rev], [yes])
|
||||
26
tools/util-linux/patches/101-macos-weak-aliases.patch
Normal file
26
tools/util-linux/patches/101-macos-weak-aliases.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
From 9445f477cfcfb3615ffde8f93b1b98c809ee4eca Mon Sep 17 00:00:00 2001
|
||||
From: Eugene Gershnik <gershnik@users.noreply.github.com>
|
||||
Date: Mon, 6 May 2024 09:29:39 -0700
|
||||
Subject: [PATCH] This re-enables build on macOS.
|
||||
|
||||
Weak aliases are not supported by clang on Darwin.
|
||||
Instead this fix uses inline asm to make `_uuid_time` and alias to `___uuid_time`
|
||||
|
||||
Fixes util-linux/util-linux#2873
|
||||
---
|
||||
libuuid/src/uuid_time.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/libuuid/src/uuid_time.c
|
||||
+++ b/libuuid/src/uuid_time.c
|
||||
@@ -85,6 +85,10 @@ time_t __uuid_time(const uuid_t uu, stru
|
||||
}
|
||||
#if defined(__USE_TIME_BITS64) && defined(__GLIBC__)
|
||||
extern time_t uuid_time64(const uuid_t uu, struct timeval *ret_tv) __attribute__((weak, alias("__uuid_time")));
|
||||
+#elif defined(__clang__) && defined(__APPLE__)
|
||||
+__asm__(".globl _uuid_time");
|
||||
+__asm__(".set _uuid_time, ___uuid_time");
|
||||
+extern time_t uuid_time(const uuid_t uu, struct timeval *ret_tv);
|
||||
#else
|
||||
extern time_t uuid_time(const uuid_t uu, struct timeval *ret_tv) __attribute__((weak, alias("__uuid_time")));
|
||||
#endif
|
||||
Reference in New Issue
Block a user