Reorder final multipathd linking command to satisfy --as-needed ld flag
authorChristophe Varoqui <christophe.varoqui@opensvc.com>
Sun, 18 Jul 2010 22:31:02 +0000 (00:31 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sun, 18 Jul 2010 22:31:02 +0000 (00:31 +0200)
Some distributions use --as-needed by default, which make the linker
complain about unresolved dependencies if the libs are positioned
before the object files using their symbols.

Reported by ptchinster (at) archlinux (dot) us

multipathd/Makefile

index 32d9ef5..51208c3 100644 (file)
@@ -28,7 +28,7 @@ OBJS = main.o pidfile.o uxlsnr.o uxclnt.o cli.o cli_handlers.o
 all : $(EXEC)
 
 $(EXEC): $(OBJS)
-       $(CC) $(CFLAGS) $(LDFLAGS) -o $(EXEC) $(OBJS)
+       $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(EXEC)
        $(GZIP) $(EXEC).8 > $(EXEC).8.gz
 
 install: