summaryrefslogtreecommitdiff
path: root/sys-block/open-iscsi/files/open-iscsi-2.1.6-Makefiles.patch
blob: a25acc0c85db4525e12f7f721f5fee9703ee0ae9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
https://github.com/open-iscsi/open-iscsi/pull/333

It's not the full series from that PR yet because
our previous patch handles some of it (the most important bits)
and some layout changed upstream pre-next release.

From 96667e0e06a65c94fd875db048776aad29eea829 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sun, 3 Apr 2022 03:22:32 +0100
Subject: [PATCH] iscsiuio: don't clobber LDFLAGS in configure.ac

The systemd check currently clobbers LDFLAGS from the environment
rather than appending to it.

But we actually want LIBS here anyway, rather than LDFLAGS.

Signed-off-by: Sam James <sam@gentoo.org>
--- a/iscsiuio/configure.ac
+++ b/iscsiuio/configure.ac
@@ -72,7 +72,7 @@ AC_ARG_WITH([systemd],
      *)   AC_MSG_ERROR([bad value $withval for --with-systemd]) ;;
      esac],[with_libsystemd=auto])
 AS_IF([test "$with_libsystemd" != no],[
-    PKG_CHECK_MODULES([LIBSYSTEMD],[libsystemd],[LDFLAGS=$LIBSYSTEMD_LIBS],[
+    PKG_CHECK_MODULES([LIBSYSTEMD],[libsystemd],[LIBS="${LIBS} $LIBSYSTEMD_LIBS"],[
         if test "$with_libsystemd" = yes; then
             AC_MSG_ERROR([could not find libsystemd using pkg-config])
 	else
From 9fbd6009cd917f1152a367fa7e5ae3993133c1e4 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sun, 3 Apr 2022 03:23:28 +0100
Subject: [PATCH] iscsiuio: respect LDFLAGS fully

Use LIBS rather than LDFLAGS which ensures automake gets the ordering
right (some LDFLAGS values won't work correctly if not placed exactly before
libraries).

This should functionally work the same as before, just improve compatibility
with bits like -Wl,--as-needed.

Signed-off-by: Sam James <sam@gentoo.org>
--- a/iscsiuio/src/unix/Makefile.am
+++ b/iscsiuio/src/unix/Makefile.am
@@ -27,13 +27,14 @@ iscsiuio_CFLAGS = 	$(AM_CFLAGS)		\
 			$(LIBNL_CFLAGS)		\
 			-DBYTE_ORDER=@ENDIAN@
 
-iscsiuio_LDFLAGS= 	$(AM_LDADD)		\
+iscsiuio_LIBS = 	$(AM_LIBS)		\
 			-ldl			\
 			-rdynamic		\
 			$(LIBNL_LIBS)		\
 			-lpthread
 
-iscsiuio_LDADD  = 	${top_srcdir}/src/uip/lib_iscsi_uip.a	\
+iscsiuio_LDADD  = 	$(AM_LDADD) \
+			${top_srcdir}/src/uip/lib_iscsi_uip.a	\
 			${top_srcdir}/src/apps/dhcpc/lib_apps_dhcpc.a\
 			${top_srcdir}/src/apps/brcm-iscsi/lib_apps_brcm_iscsi.a \
 			${top_srcdir}/src/unix/libs/lib_iscsiuio_hw_cnic.a
From 980b1d36e1f5f38c6b33fe3b68a2cb89e4a77b90 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sun, 3 Apr 2022 03:34:48 +0100
Subject: [PATCH] libopeniscsiusr: fix version in installed pkgconfig (.pc)
 file

Looks like a typo from libnvme. Previously, the installed
.pc file had a blank Version field.

Signed-off-by: Sam James <sam@gentoo.org>
--- a/libopeniscsiusr/Makefile
+++ b/libopeniscsiusr/Makefile
@@ -89,7 +89,7 @@ install: $(LIBS) $(LIBS_MAJOR)
 	ln -sf $(LIBS) $(DESTDIR)/$(LIB_DIR)/$(LIBS_MAJOR)
 	$(INSTALL) $(HEADERS) $(DESTDIR)$(INCLUDE_DIR)/
 	$(INSTALL) -m 644 -D $(PKGFILE).in $(DESTDIR)$(PKGCONF_DIR)/$(PKGFILE)
-	perl -i -pe 's|__VERSION__|$(LIBNVME_VERSION)|g' \
+	perl -i -pe 's|__VERSION__|$(LIBISCSI_USR_VERSION)|g' \
 		$(DESTDIR)$(PKGCONF_DIR)/$(PKGFILE)
 	perl -i -pe 's|__LIB_DIR__|$(LIB_DIR)|g' \
 		$(DESTDIR)$(PKGCONF_DIR)/$(PKGFILE)