mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: psm2: Compile init constructor without AVX flags.
* gnu/packages/linux.scm (psm2)[source]<origin>{patches}: New field. Add patch to it. * gnu/packages/patches/psm2-compile-ctor-without-avx.patch: Add file. * gnu/local.mk (dist_patch_DATA): Register it. Fixes: guix/guix#1446 Change-Id: I150ddc86c2948063e6e13f11014c42e96b553b75 Signed-off-by: Andreas Enge <andreas@enge.fr>
This commit is contained in:
parent
bcd9c41ac2
commit
eadf133bb0
3 changed files with 47 additions and 0 deletions
|
@ -71,6 +71,7 @@
|
||||||
# Copyright © 2024 Runciter <runciter@whispers-vpn.org>
|
# Copyright © 2024 Runciter <runciter@whispers-vpn.org>
|
||||||
# Copyright © 2024 Ashvith Shetty <ashvithshetty10@gmail.com>
|
# Copyright © 2024 Ashvith Shetty <ashvithshetty10@gmail.com>
|
||||||
# Copyright © 2024 James Smith <jsubuntuxp@disroot.org>
|
# Copyright © 2024 James Smith <jsubuntuxp@disroot.org>
|
||||||
|
# Copyright © 2025 Nigko Yerden <nigko.yerden@gmail.com>
|
||||||
#
|
#
|
||||||
# This file is part of GNU Guix.
|
# This file is part of GNU Guix.
|
||||||
#
|
#
|
||||||
|
@ -2131,6 +2132,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/proot-add-clone3.patch \
|
%D%/packages/patches/proot-add-clone3.patch \
|
||||||
%D%/packages/patches/proot-add-missing-include.patch \
|
%D%/packages/patches/proot-add-missing-include.patch \
|
||||||
%D%/packages/patches/protobuf-fix-build-on-32bit.patch \
|
%D%/packages/patches/protobuf-fix-build-on-32bit.patch \
|
||||||
|
%D%/packages/patches/psm2-compile-ctor-without-avx.patch \
|
||||||
%D%/packages/patches/psm-arch.patch \
|
%D%/packages/patches/psm-arch.patch \
|
||||||
%D%/packages/patches/psm-disable-memory-stats.patch \
|
%D%/packages/patches/psm-disable-memory-stats.patch \
|
||||||
%D%/packages/patches/psm-ldflags.patch \
|
%D%/packages/patches/psm-ldflags.patch \
|
||||||
|
|
|
@ -82,6 +82,7 @@
|
||||||
;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com>
|
;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com>
|
||||||
;;; Copyright © 2024 Arun Isaac <arunisaac@systemreboot.net>
|
;;; Copyright © 2024 Arun Isaac <arunisaac@systemreboot.net>
|
||||||
;;; Copyright © 2024, 2025 Ashish SHUKLA <ashish.is@lostca.se>
|
;;; Copyright © 2024, 2025 Ashish SHUKLA <ashish.is@lostca.se>
|
||||||
|
;;; Copyright © 2025 Nigko Yerden <nigko.yerden@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -10276,6 +10277,9 @@ privileges.")
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"04nar65ac11qqx41vkfs7iip8kfiah0zms7l4rmsxncpiz2iqfik"))
|
"04nar65ac11qqx41vkfs7iip8kfiah0zms7l4rmsxncpiz2iqfik"))
|
||||||
|
(patches
|
||||||
|
(search-patches
|
||||||
|
"psm2-compile-ctor-without-avx.patch"))
|
||||||
(modules '((guix build utils)))
|
(modules '((guix build utils)))
|
||||||
(snippet
|
(snippet
|
||||||
;; That file declares its own 'strlcat' as static. To avoid a
|
;; That file declares its own 'strlcat' as static. To avoid a
|
||||||
|
|
41
gnu/packages/patches/psm2-compile-ctor-without-avx.patch
Normal file
41
gnu/packages/patches/psm2-compile-ctor-without-avx.patch
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
Subject: Fix issue https://codeberg.org/guix/guix/issues/1446
|
||||||
|
Author: Nigko Yerden <nigko.yerden@gmail.com>
|
||||||
|
Date: 2025-07-25
|
||||||
|
License: gpl3+
|
||||||
|
|
||||||
|
diff --git a/opa/Makefile b/opa/Makefile
|
||||||
|
index 2692886..368973b 100644
|
||||||
|
--- a/opa/Makefile
|
||||||
|
+++ b/opa/Makefile
|
||||||
|
@@ -74,6 +74,7 @@ ${TARGLIB}-objs := opa_debug.o opa_time.o \
|
||||||
|
|
||||||
|
${TARGLIB}-objs := $(patsubst %.o, $(OUTDIR)/%.o, ${${TARGLIB}-objs})
|
||||||
|
DEPS := $(${TARGLIB}-objs:.o=.d)
|
||||||
|
+BASECFLAGS_NO_AVX := $(filter-out -mavx -mavx2 -mavx512f, $(BASECFLAGS))
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
IGNORE_DEP_TARGETS = clean
|
||||||
|
@@ -84,13 +85,21 @@ install: all
|
||||||
|
@echo "Nothing to do for install."
|
||||||
|
|
||||||
|
$(OUTDIR)/%.d: $(this_srcdir)/%.c
|
||||||
|
- $(CC) $(CFLAGS) $(BASECFLAGS) $(INCLUDES) $< -MM -MF $@ -MQ $(@:.d=.o)
|
||||||
|
+ if [ "$<" = "$(this_srcdir)/opa_debug.c" ] || [ "$<" = "$(this_srcdir)/opa_time.c" ]; then \
|
||||||
|
+ $(CC) $(CFLAGS) $(BASECFLAGS_NO_AVX) $(INCLUDES) $< -MM -MF $@ -MQ $(@:.d=.o); \
|
||||||
|
+ else \
|
||||||
|
+ $(CC) $(CFLAGS) $(BASECFLAGS) $(INCLUDES) $< -MM -MF $@ -MQ $(@:.d=.o); \
|
||||||
|
+ fi
|
||||||
|
|
||||||
|
$(OUTDIR)/%.d: $(this_srcdir)/%.S
|
||||||
|
$(CC) $(CFLAGS) $(BASECFLAGS) $(INCLUDES) $< -MM -MF $@ -MQ $(@:.d=.o)
|
||||||
|
|
||||||
|
$(OUTDIR)/%.o: $(this_srcdir)/%.c | ${DEPS}
|
||||||
|
- $(CC) $(CFLAGS) $(BASECFLAGS) $(INCLUDES) -c $< -o $@
|
||||||
|
+ if [ "$<" = "$(this_srcdir)/opa_debug.c" ] || [ "$<" = "$(this_srcdir)/opa_time.c" ]; then \
|
||||||
|
+ $(CC) $(CFLAGS) $(BASECFLAGS_NO_AVX) $(INCLUDES) -c $< -o $@; \
|
||||||
|
+ else \
|
||||||
|
+ $(CC) $(CFLAGS) $(BASECFLAGS) $(INCLUDES) -c $< -o $@; \
|
||||||
|
+ fi
|
||||||
|
|
||||||
|
$(OUTDIR)/%.o: $(this_srcdir)/%.S | ${DEPS}
|
||||||
|
$(CC) $(ASFLAGS) -c $< -o $@
|
Loading…
Add table
Add a link
Reference in a new issue