summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/pciutils/files/pciutils-2.2.0-shared-lib.patch')
-rw-r--r--sys-apps/pciutils/files/pciutils-2.2.0-shared-lib.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/sys-apps/pciutils/files/pciutils-2.2.0-shared-lib.patch b/sys-apps/pciutils/files/pciutils-2.2.0-shared-lib.patch
new file mode 100644
index 000000000000..d146b536f999
--- /dev/null
+++ b/sys-apps/pciutils/files/pciutils-2.2.0-shared-lib.patch
@@ -0,0 +1,27 @@
+--- pciutils/lib/Makefile
++++ pciutils/lib/Makefile
+@@ -7,6 +7,7 @@
+ INCL=internal.h pci.h config.h header.h sysdep.h types.h
+
+ PCILIB=libpci.a
++PCISHLIB=libpci.so
+
+ ifdef PCI_HAVE_PM_LINUX_SYSFS
+ OBJS += sysfs.o
+@@ -45,7 +46,15 @@
+ PCILIB=libpciutils.a
+ endif
+
+-all: $(PCILIB)
++all: $(PCILIB) $(PCISHLIB)
++
++SHOBJS = $(OBJS:.o=.lo)
++
++%.lo: %.c
++ $(CC) $(CFLAGS) -fPIC -c -o $@ $^
++
++$(PCISHLIB): $(SHOBJS)
++ $(CC) -shared $(CFLAGS) $(LDFLAGS) -o $@ $^ -fPIC
+
+ $(PCILIB): $(OBJS)
+ rm -f $@