mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
* gnu/packages/patches/psm2-compile-ctor-without-avx.patch: Restore the default compilation flags for the "opa/opa_debug.c" file from the package source. Change-Id: Ic1afa49a91d029bcd3bd59f7840b1d428043a7b1 Signed-off-by: Andreas Enge <andreas@enge.fr>
41 lines
No EOL
1.5 KiB
Diff
41 lines
No EOL
1.5 KiB
Diff
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..11a92cb 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,12 +85,20 @@ 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_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_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 $@
|