SOURCES: lsvpd-gcc4.patch (NEW) - build fixes.

pluto pluto at pld-linux.org
Wed Sep 20 17:31:22 CEST 2006


Author: pluto                        Date: Wed Sep 20 15:31:22 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- build fixes.

---- Files affected:
SOURCES:
   lsvpd-gcc4.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/lsvpd-gcc4.patch
diff -u /dev/null SOURCES/lsvpd-gcc4.patch:1.1
--- /dev/null	Wed Sep 20 17:31:22 2006
+++ SOURCES/lsvpd-gcc4.patch	Wed Sep 20 17:31:17 2006
@@ -0,0 +1,38 @@
+--- lsvpd-0.16.0/src/device_scsi.c.orig	2006-09-20 15:11:49.000000000 +0000
++++ lsvpd-0.16.0/src/device_scsi.c	2006-09-20 15:14:08.596244500 +0000
+@@ -382,7 +382,7 @@
+ 	s.supertype = DEVICE_TYPE_SCSI;
+ 	i = 0;
+ 	while (NULL != (x = device_scsi_ds_prefixes[i].type)) {
+-		if (DEVICE_TYPE_SCSI != x) {
++		if (strcmp(DEVICE_TYPE_SCSI, x)) {
+ 			s.type = x;
+ 			node_type_register(&s);
+ 		}
+--- lsvpd-0.16.0/src/init.h.orig	2006-09-13 23:58:24.000000000 +0000
++++ lsvpd-0.16.0/src/init.h	2006-09-20 15:29:28.845091000 +0000
+@@ -57,23 +57,10 @@
+  *
+  * Thanks to Rusty Russell, Jeremy Kerr and David Gibson for hints on
+  * all of this.
+- *
+- * Building with -funit-at-a-time will result in a link failure, since
+- * it optimises away pretty much everything to do with this code.
+- * This means that building with -O2 will fail, since it implies the
+- * above optimisation.  However, it is possible to build with -O2 by
+- * adding -fno-unit-at-a-time.  Thanks to Olaf Hering <olh at suse.de>
+- * for working this out.
+  */
+- 
+- /*
+-  * When building for GCC 4.1.0 ( perhaps 4.0.X and/or >4.1.0) the -O
+-  * option will optimise all this away, so you need to include the 
+-  * -fno-unit-at-a-time option.
+-  */
+ 
+ #define INIT(fn) static initcall_t __initcall_##fn \
+-__attribute__((__unused__)) \
++__attribute__((__used__)) \
+ __attribute__((__section__("init_call"))) = &fn
+ 
+ static inline void call_inits (void)
================================================================


More information about the pld-cvs-commit mailing list