summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/psm-arch.patch13
-rw-r--r--gnu/packages/patches/psm-ldflags.patch13
-rw-r--r--gnu/packages/patches/psm-repro.patch14
3 files changed, 40 insertions, 0 deletions
diff --git a/gnu/packages/patches/psm-arch.patch b/gnu/packages/patches/psm-arch.patch
new file mode 100644
index 0000000000..3d95c28595
--- /dev/null
+++ b/gnu/packages/patches/psm-arch.patch
@@ -0,0 +1,13 @@
+Use 'uname -m', which in practice returns the processor architecture.
+
+--- psm-3.3/buildflags.mak~	2014-08-20 21:00:18.000000000 +0100
++++ psm-3.3/buildflags.mak	2017-10-22 12:02:12.855291447 +0100
+@@ -38,7 +38,7 @@
+ endif
+ 
+ export os ?= $(shell uname -s | tr '[A-Z]' '[a-z]')
+-export arch := $(shell uname -p | sed -e 's,\(i[456]86\|athlon$$\),i386,')
++export arch := $(shell uname -m | sed -e 's,\(i[456]86\|athlon$$\),i386,')
+ 
+ CC ?= gcc
+ 
diff --git a/gnu/packages/patches/psm-ldflags.patch b/gnu/packages/patches/psm-ldflags.patch
new file mode 100644
index 0000000000..d761a3114a
--- /dev/null
+++ b/gnu/packages/patches/psm-ldflags.patch
@@ -0,0 +1,13 @@
+Add missing flags.
+
+--- psm-3.3/ipath/Makefile~	1970-01-01 01:00:00.000000000 +0100
++++ psm-3.3/ipath/Makefile	2017-10-22 15:10:10.269177711 +0100
+@@ -73,7 +73,7 @@
+ ${TARGLIB}.so.${MAJOR}.${MINOR}: ${${TARGLIB}-objs}
+ 	date +'static __attribute__ ((unused)) char __psc_infinipath_revision[] ="$$""Date: %F %R ${rpm_extra_description}InfiniPath $$";' > _revision.c
+ 	$(CC) -c $(BASECFLAGS) $(INCLUDES) _revision.c -o _revision.o
+-	$(CC) -o $@ -Wl,-soname=${TARGLIB}.so.${MAJOR} -shared \
++	$(CC) -o $@ -Wl,-soname=${TARGLIB}.so.${MAJOR} $(LDFLAGS) -shared \
+ 		-Wl,--unique='*fastpath*' \
+ 		${${TARGLIB}-objs} _revision.o $(LDFLAGS) $(if $(MIC:0=),$(SCIF_LINK_FLAGS))
+ 
diff --git a/gnu/packages/patches/psm-repro.patch b/gnu/packages/patches/psm-repro.patch
new file mode 100644
index 0000000000..772801260e
--- /dev/null
+++ b/gnu/packages/patches/psm-repro.patch
@@ -0,0 +1,14 @@
+Remove timestamp to support reproducible builds.
+
+--- psm-3.3/Makefile~	1970-01-01 01:00:00.000000000 +0100
++++ psm-3.3/Makefile	2017-10-22 15:32:11.736949002 +0100
+@@ -326,7 +326,7 @@
+ # file around.  Generate it such that the ident command can find it
+ # and strings -a | grep InfiniPath does a reasonable job as well.
+ ${TARGLIB}.so.${MAJOR}.${MINOR}: ${${TARGLIB}-objs}
+-	date +'char psmi_infinipath_revision[] ="$$""Date: %F %R ${rpm_extra_description}InfiniPath $$";' > ${lib_build_dir}/_revision.c
++	echo 'char psmi_infinipath_revision[] ="$$""Date: 1970-01-01 00:00 ${rpm_extra_description}InfiniPath $$";' > ${lib_build_dir}/_revision.c
+ 	$(CC) -c $(BASECFLAGS) $(INCLUDES) _revision.c -o _revision.o
+ 	$(CC) $(LDFLAGS) -o $@ -Wl,-soname=${TARGLIB}.so.${MAJOR} -shared -Wl,--unique='*fastpath*' \
+ 		${${TARGLIB}-objs} _revision.o -L$(build_dir)/ipath $(LDLIBS)
+