File 0019-Fix-build-with-Wl-as-needed.patch of Package fcoe-utils

From 9869390ff1a6ecca1e6599e37128a07d237655e6 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 6 Dec 2013 19:51:52 +0000
Subject: build: Fix build with '-Wl,--as-needed'

The libraries need to be specified correctly to get '--as-needed'
to work.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Robert Love <robert.w.love@intel.com>
---
 Makefile.am | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index e93aa8f..ba08924 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,21 +9,18 @@ AM_CFLAGS = -Wall -Wformat=2 -Werror -Wmissing-prototypes -Wstrict-prototypes
 
 ## rules for building fcoeadm
 fcoeadm_SOURCES = fcoeadm.c fcoeadm_display.c
-fcoeadm_LDADD = lib/libutil.a libopenfcoe.a
+fcoeadm_LDADD = lib/libutil.a libopenfcoe.a $(HBAAPI_LIBS)
 fcoeadm_CFLAGS = $(AM_CFLAGS) $(HBAAPI_CFLAGS)
-fcoeadm_LDFLAGS = $(AM_LDFLAGS) $(HBAAPI_LIBS)
 
 ## rules for building fcoemon
 fcoemon_SOURCES = fcoemon.c
-fcoemon_LDADD = lib/libutil.a
+fcoemon_LDADD = lib/libutil.a -lrt
 fcoemon_CFLAGS = $(AM_CFLAGS) $(DCBD_CFLAGS)
-fcoemon_LDFLAGS = $(AM_LDFLAGS) -lrt
 
 ## rules for building fcping
 fcping_SOURCES = fcping.c
-fcping_LDADD = lib/libutil.a
+fcping_LDADD = lib/libutil.a $(HBAAPI_LIBS) -lrt
 fcping_CFLAGS = $(AM_CFLAGS) $(HBAAPI_CFLAGS)
-fcping_LDFLAGS = $(AM_LDFLAGS) $(HBAAPI_LIBS) -lrt
 
 ## rules for building fipvlan
 fipvlan_SOURCES = fipvlan.c
-- 
1.8.1.4
openSUSE Build Service is sponsored by