Flexible I/O Tester development
 help / color / mirror / Atom feed
* [PATCH] Fix linking of fio executable.
@ 2011-03-21 14:59 Diego Elio Pettenò
  0 siblings, 0 replies; 3+ messages in thread
From: Diego Elio Pettenò @ 2011-03-21 14:59 UTC (permalink / raw)
  To: fio; +Cc: Diego Elio Pettenò

First of all make sure that $(LDFLAGS) are used during linking so that the
user can set the linker's flags.

Then also make sure that libraries are listed after the objects, so that
GNU ld's --as-needed option will not cause fio linking to fail.
---
 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 07e011e..1d81562 100644
--- a/Makefile
+++ b/Makefile
@@ -70,9 +70,9 @@ mandir = $(prefix)/man
 
 .c.o:
 	$(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(CPPFLAGS) $<
-	
+
 fio: $(OBJS)
-	$(QUIET_CC)$(CC) $(CFLAGS) -o $@ $(LIBS) $(OBJS)
+	$(QUIET_CC)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
 
 depend:
 	$(QUIET_DEP)$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SOURCE) 1> .depend
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] Fix linking of fio executable.
@ 2011-03-21 15:36 Diego Elio Pettenò
  2011-03-21 19:14 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Diego Elio Pettenò @ 2011-03-21 15:36 UTC (permalink / raw)
  To: fio; +Cc: Diego Elio Pettenò, Robin H. Johnson

First of all make sure that $(LDFLAGS) are used during linking so that the
user can set the linker's flags.

Then also make sure that libraries are listed after the objects, so that
GNU ld's --as-needed option will not cause fio linking to fail.

Cc: Robin H. Johnson <robbat2@gentoo.org>
---
 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 07e011e..1d81562 100644
--- a/Makefile
+++ b/Makefile
@@ -70,9 +70,9 @@ mandir = $(prefix)/man
 
 .c.o:
 	$(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(CPPFLAGS) $<
-	
+
 fio: $(OBJS)
-	$(QUIET_CC)$(CC) $(CFLAGS) -o $@ $(LIBS) $(OBJS)
+	$(QUIET_CC)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
 
 depend:
 	$(QUIET_DEP)$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SOURCE) 1> .depend
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix linking of fio executable.
  2011-03-21 15:36 [PATCH] Fix linking of fio executable Diego Elio Pettenò
@ 2011-03-21 19:14 ` Jens Axboe
  0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2011-03-21 19:14 UTC (permalink / raw)
  To: Diego Elio Pettenò; +Cc: fio, Robin H. Johnson

On 2011-03-21 16:36, Diego Elio Petten� wrote:
> First of all make sure that $(LDFLAGS) are used during linking so that the
> user can set the linker's flags.
> 
> Then also make sure that libraries are listed after the objects, so that
> GNU ld's --as-needed option will not cause fio linking to fail.

Thanks, applied.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-21 19:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-21 15:36 [PATCH] Fix linking of fio executable Diego Elio Pettenò
2011-03-21 19:14 ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2011-03-21 14:59 Diego Elio Pettenò

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox