Blame SOURCES/jitterentropy-rh-makefile.patch

bf43d9
diff -up Makefile.orig Makefile
bf43d9
--- Makefile	2021-07-13 17:23:42.954652287 +0200
bf43d9
+++ Makefile	2021-07-13 17:27:27.958549833 +0200
bf43d9
@@ -3,7 +3,7 @@
bf43d9
 CC ?= gcc
bf43d9
 #Hardening
bf43d9
 CFLAGS ?= -fwrapv --param ssp-buffer-size=4 -fvisibility=hidden -fPIE -Wcast-align -Wmissing-field-initializers -Wshadow -Wswitch-enum
bf43d9
-CFLAGS +=-Wextra -Wall -pedantic -fPIC -O0 -fwrapv -Wconversion
bf43d9
+CFLAGS +=-Wp,-U_FORTIFY_SOURCE -Wextra -Wall -pedantic -fPIC -O0 -fwrapv -Wconversion
bf43d9
 LDFLAGS +=-Wl,-z,relro,-z,now -lpthread
bf43d9
 
bf43d9
 GCCVERSIONFORMAT := $(shell echo `$(CC) -dumpversion | sed 's/\./\n/g' | wc -l`)
bf43d9
@@ -28,7 +28,7 @@ LIBDIR := lib
bf43d9
 INCDIR := include
bf43d9
 SRCDIR := src
bf43d9
 
bf43d9
-INSTALL_STRIP ?= install -s
bf43d9
+INSTALL ?= install
bf43d9
 
bf43d9
 NAME := jitterentropy
bf43d9
 LIBMAJOR=$(shell cat $(SRCDIR)/jitterentropy-base.c | grep define | grep MAJVERSION | awk '{print $$3}')
bf43d9
@@ -73,25 +73,25 @@ cppcheck:
bf43d9
 install: install-man install-shared install-includes
bf43d9
 
bf43d9
 install-man:
bf43d9
-	install -d -m 0755 $(DESTDIR)$(PREFIX)/share/man/man3
bf43d9
-	install -m 644 doc/$(NAME).3 $(DESTDIR)$(PREFIX)/share/man/man3/
bf43d9
+	$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/share/man/man3
bf43d9
+	$(INSTALL) -m 644 doc/$(NAME).3 $(DESTDIR)$(PREFIX)/share/man/man3/
bf43d9
 	gzip -n -f -9 $(DESTDIR)$(PREFIX)/share/man/man3/$(NAME).3
bf43d9
 
bf43d9
 install-shared:
bf43d9
-	install -d -m 0755 $(DESTDIR)$(PREFIX)/$(LIBDIR)
bf43d9
-	$(INSTALL_STRIP) -m 0755 lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/
bf43d9
+	$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/$(LIBDIR)
bf43d9
+	$(INSTALL) -m 0755 lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/
bf43d9
 	$(RM) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR)
bf43d9
 	ln -sf lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR)
bf43d9
 	ln -sf lib$(NAME).so.$(LIBMAJOR) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so
bf43d9
 
bf43d9
 install-includes:
bf43d9
-	install -d -m 0755 $(DESTDIR)$(PREFIX)/$(INCDIR)
bf43d9
-	install -m 0644 jitterentropy.h $(DESTDIR)$(PREFIX)/$(INCDIR)/
bf43d9
-	install -m 0644 jitterentropy-base-user.h $(DESTDIR)$(PREFIX)/$(INCDIR)/
bf43d9
+	$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/$(INCDIR)
bf43d9
+	$(INSTALL) -m 0644 jitterentropy.h $(DESTDIR)$(PREFIX)/$(INCDIR)/
bf43d9
+	$(INSTALL) -m 0644 jitterentropy-base-user.h $(DESTDIR)$(PREFIX)/$(INCDIR)/
bf43d9
 
bf43d9
 install-static:
bf43d9
-	install -d -m 0755 $(DESTDIR)$(PREFIX)/$(LIBDIR)
bf43d9
-	install -m 0755 lib$(NAME).a $(DESTDIR)$(PREFIX)/$(LIBDIR)/
bf43d9
+	$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/$(LIBDIR)
bf43d9
+	$(INSTALL) -m 0755 lib$(NAME).a $(DESTDIR)$(PREFIX)/$(LIBDIR)/
bf43d9
 
bf43d9
 clean:
bf43d9
 	@- $(RM) $(NAME)