Blame SOURCES/jitterentropy-rh-makefile.patch

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