public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: app-misc/cpufetch/files/
@ 2022-03-08 23:25 Alessandro Barbieri
  0 siblings, 0 replies; only message in thread
From: Alessandro Barbieri @ 2022-03-08 23:25 UTC (permalink / raw
  To: gentoo-commits

commit:     6448e836d5c2d077ebcee7e3f8a0b51a3de3e03a
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Tue Mar  8 23:24:09 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Tue Mar  8 23:25:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6448e836

app-misc/cpufetch/files: fix patch

Closes: https://bugs.gentoo.org/834743
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 .../cpufetch/files/cpufetch-0.98-makefile.patch    | 30 ------------
 .../cpufetch/files/cpufetch-1.01-makefile.patch    | 57 ++++++++++++++++++++++
 2 files changed, 57 insertions(+), 30 deletions(-)

diff --git a/app-misc/cpufetch/files/cpufetch-0.98-makefile.patch b/app-misc/cpufetch/files/cpufetch-0.98-makefile.patch
deleted file mode 100644
index 16180c59e..000000000
--- a/app-misc/cpufetch/files/cpufetch-0.98-makefile.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -1,6 +1,4 @@
--CC ?= gcc
--
--CFLAGS+=-Wall -Wextra -pedantic -fstack-protector-all -pedantic -std=c99
-+CFLAGS+=-Wall -Wextra -pedantic -std=c99
- SANITY_FLAGS=-Wfloat-equal -Wshadow -Wpointer-arith
- 
- PREFIX ?= /usr
-@@ -35,17 +33,15 @@
- 	OUTPUT=cpufetch.exe
- endif
- 
--all: CFLAGS += -O3
- all: $(OUTPUT)
- 
--debug: CFLAGS += -g -O0
- debug: $(OUTPUT)
- 
--static: CFLAGS += -static -O3
-+static: CFLAGS += -static
- static: $(OUTPUT)
- 
- $(OUTPUT): Makefile $(SOURCE) $(HEADERS)
--	$(CC) $(CFLAGS) $(SANITY_FLAGS) $(SOURCE) -o $(OUTPUT)
-+	$(CC) $(CFLAGS) $(LDFLAGS) $(SANITY_FLAGS) $(SOURCE) -o $(OUTPUT)
- 
- run: $(OUTPUT)
- 	./$(OUTPUT)

diff --git a/app-misc/cpufetch/files/cpufetch-1.01-makefile.patch b/app-misc/cpufetch/files/cpufetch-1.01-makefile.patch
new file mode 100644
index 000000000..214920d8d
--- /dev/null
+++ b/app-misc/cpufetch/files/cpufetch-1.01-makefile.patch
@@ -0,0 +1,57 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,3 @@
+-CC ?= gcc
+-
+ CFLAGS+=-Wall -Wextra -pedantic
+ SANITY_FLAGS=-Wfloat-equal -Wshadow -Wpointer-arith
+ 
+@@ -23,17 +21,17 @@
+ 			HEADERS += $(SRC_DIR)freq/freq.h
+ 			CFLAGS += -pthread
+                 endif
+-		CFLAGS += -DARCH_X86 -std=c99 -fstack-protector-all
++		CFLAGS += -DARCH_X86 -std=c99
+ 	else ifeq ($(arch), $(filter $(arch), ppc64le ppc64 ppcle ppc))
+ 		SRC_DIR=src/ppc/
+ 		SOURCE += $(COMMON_SRC) $(SRC_DIR)ppc.c $(SRC_DIR)uarch.c $(SRC_DIR)udev.c
+ 		HEADERS += $(COMMON_HDR) $(SRC_DIR)ppc.h $(SRC_DIR)uarch.h  $(SRC_DIR)udev.c
+-		CFLAGS += -DARCH_PPC -std=gnu99 -fstack-protector-all
++		CFLAGS += -DARCH_PPC -std=gnu99
+ 	else ifeq ($(arch), $(filter $(arch), arm aarch64_be aarch64 arm64 armv8b armv8l armv7l armv6l))
+ 		SRC_DIR=src/arm/
+ 		SOURCE += $(COMMON_SRC) $(SRC_DIR)midr.c $(SRC_DIR)uarch.c $(SRC_DIR)soc.c $(SRC_DIR)udev.c
+ 		HEADERS += $(COMMON_HDR) $(SRC_DIR)midr.h $(SRC_DIR)uarch.h  $(SRC_DIR)soc.h $(SRC_DIR)udev.c $(SRC_DIR)socs.h
+-		CFLAGS += -DARCH_ARM -Wno-unused-parameter -std=c99 -fstack-protector-all
++		CFLAGS += -DARCH_ARM -Wno-unused-parameter -std=c99
+ 
+ 		os := $(shell uname -s)
+ 		ifeq ($(os), Darwin)
+@@ -58,18 +56,8 @@
+ 	OUTPUT=cpufetch.exe
+ endif
+ 
+-all: CFLAGS += -O2
+ all: $(OUTPUT)
+ 
+-debug: CFLAGS += -g -O0
+-debug: $(OUTPUT)
+-
+-static: CFLAGS += -static -O2
+-static: $(OUTPUT)
+-
+-strict: CFLAGS += -O2 -Werror -fsanitize=undefined -D_FORTIFY_SOURCE=2
+-strict: $(OUTPUT)
+-
+ freq_nov.o: Makefile $(SRC_DIR)freq/freq_nov.c $(SRC_DIR)freq/freq_nov.h
+ 	$(CC) $(CFLAGS) $(SANITY_FLAGS) -c -pthread $(SRC_DIR)freq/freq_nov.c -o $@
+ 
+@@ -80,7 +68,7 @@
+ 	$(CC) $(CFLAGS) $(SANITY_FLAGS) -c -mavx512f -mfma -pthread $(SRC_DIR)freq/freq_avx512.c -o $@
+ 
+ $(OUTPUT): Makefile $(SOURCE) $(HEADERS)
+-	$(CC) $(CFLAGS) $(SANITY_FLAGS) $(SOURCE) -o $(OUTPUT)
++	$(CC) $(CFLAGS) $(LDFLAGS) $(SANITY_FLAGS) $(SOURCE) -o $(OUTPUT)
+ 
+ run: $(OUTPUT)
+ 	./$(OUTPUT)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-08 23:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-08 23:25 [gentoo-commits] repo/proj/guru:dev commit in: app-misc/cpufetch/files/ Alessandro Barbieri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox