Compilation upo to Util-linux on x86_64

This commit is contained in:
Nathan Fisher 2023-01-10 00:56:05 -05:00
parent b0a683e4fb
commit fd4713eb1e
8 changed files with 37 additions and 13 deletions

View File

@ -31,7 +31,7 @@ ifeq ($(filter armv6 armv7l aarch64, $(arch)), $(arch))
else
tgt = $(arch)-hitchhiker-linux-musl
endif
bld = $(shell gcc -dumpmachine)
bld = $(shell gcc -dumpmachine)
exec_prefix ?= ${DESTDIR}${install_prefix}
bindir ?= ${exec_prefix}/bin

View File

@ -3,11 +3,12 @@
#
distname = gcc
include toolchain.mk
objdir = $(global_objdir)/gcc-pass2
ifeq ($(build_fortran), 1)
fortran = ',fortran'
objdir = $(global_objdir)/gcc-pass2
config_opts += --target=$(tgt)
config_opts += --with-sysroot=$(build)
config_opts += --with-glibc-version=2.11
config_opts += --enable-languages=c,c++
config_opts += --enable-languages=c,c++${fortran}
config_opts += --disable-multilib
config_opts += --disable-bootstrap
# For musl

View File

@ -8,12 +8,10 @@ installdirs += $(local_docdir)
docsrc = $(objdir)/doc/$(distname).html
docfile = $(local_docdir)/$(distname).html
define post_install
$(MAKE) -C $(objdir) html
install -d $(local_docdir)
install -m644 $(docsrc) $(docfile)
endef
include targets.mk
$(objdir)/doc/$(distname).html:
cd $(objdir) && $(MAKE) html
$(docfile): $(docsrc) | $(local_docdir)
install -m644 $(docsrc) $@
install: $(docfile)

View File

@ -6,6 +6,7 @@ include world.mk
export CFLAGS = --sysroot=$(DESTDIR)
config_opts += --host=$(tgt)
config_opts += --build=$(bld)
config_opts += --bindir=/bin
config_opts += --with-root-prefix=""
config_opts += --enable-elf-shlibs

View File

@ -54,3 +54,11 @@ $(libexecdir)/exrecover: $(objdir)/exrecover.o $(objdir)/compat.o $(objdir)/mapm
$(libexecdir):
install -d $@
libsclean:
$(MAKE) -C libuxre clean
$(MAKE) -C libterm clean
clean: libsclean
.PHONY: libsclean

View File

@ -2,8 +2,9 @@
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
#
distname = util-linux
#patches += util-linux-musl.patch
patches += util-linux-musl.patch
patches += util-linux-makefile.patch
patches += util-linux-sigsetjmp.patch
include world.mk
uldocdir = $(install_prefix)/share/doc/util-linux/$(util-linux_version)

View File

@ -35,5 +35,6 @@ config_opts += --disable-static
config_opts += --without-python
config_opts += --without-systemd
config_opts += --without-systemdsystemunitdir
config_opts += --without-libmagic
config_opts += ADJTIME_PATH=/var/lib/hwclock/adjtime
config_opts += runstatedir=/run

View File

@ -0,0 +1,14 @@
diff -Naur util-linux-2.36.1.orig/sys-utils/lscpu.c util-linux-2.36.1/sys-utils/lscpu.c
--- util-linux-2.36.1.orig/sys-utils/lscpu.c 2023-01-04 01:31:32.544009151 -0500
+++ util-linux-2.36.1/sys-utils/lscpu.c 2023-01-04 01:51:51.679673180 -0500
@@ -876,8 +876,8 @@
* the signal. All this magic is needed because lscpu
* isn't supposed to require root privileges.
*/
- if (sigsetjmp(segv_handler_env, 1))
- return 0;
+ //if (sigsetjmp(segv_handler_env, 1))
+ // return 0;
memset(&act, 0, sizeof(act));
act.sa_sigaction = segv_handler;