All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] fio: a couple build fixes
@ 2022-01-25 18:55 Eric Sandeen
  2022-01-25 18:57 ` [PATCH 1/2] t/io_uring: link with libaio when necessary Eric Sandeen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Eric Sandeen @ 2022-01-25 18:55 UTC (permalink / raw)
  To: fio; +Cc: Jens Axboe

Maybe it's just me, but t/io_uring.c doesn't link for me without -laio when CONFIG_LIBAIO
is set.

I also got a report that dynamic engines aren't properly picking up LDFLAGS set by the
build system (in this case, -Wl,-z,now).

So these two patches try to resolve those issues.


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

* [PATCH 1/2] t/io_uring: link with libaio when necessary
  2022-01-25 18:55 [PATCH 0/2] fio: a couple build fixes Eric Sandeen
@ 2022-01-25 18:57 ` Eric Sandeen
  2022-01-25 19:00 ` [PATCH 2/2] fio: use LDFLAGS when linking dynamic engines Eric Sandeen
  2022-01-26 20:13 ` [PATCH 0/2] fio: a couple build fixes Jens Axboe
  2 siblings, 0 replies; 5+ messages in thread
From: Eric Sandeen @ 2022-01-25 18:57 UTC (permalink / raw)
  To: fio; +Cc: Jens Axboe

When CONFIG_LIBAIO is enabled, we need t/io_uring to link with it.
(libaio_LIBS only affects the aio engine, AFAICT.)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/Makefile b/Makefile
index 5d17bca..00e7953 100644
--- a/Makefile
+++ b/Makefile
@@ -99,6 +99,7 @@ endif
  ifdef CONFIG_LIBAIO
    libaio_SRCS = engines/libaio.c
    cmdprio_SRCS = engines/cmdprio.c
+  LIBS += -laio
    libaio_LIBS = -laio
    ENGINES += libaio
  endif


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

* [PATCH 2/2] fio: use LDFLAGS when linking dynamic engines
  2022-01-25 18:55 [PATCH 0/2] fio: a couple build fixes Eric Sandeen
  2022-01-25 18:57 ` [PATCH 1/2] t/io_uring: link with libaio when necessary Eric Sandeen
@ 2022-01-25 19:00 ` Eric Sandeen
  2022-01-26 14:49   ` [PATCH 2/2 V2] " Eric Sandeen
  2022-01-26 20:13 ` [PATCH 0/2] fio: a couple build fixes Jens Axboe
  2 siblings, 1 reply; 5+ messages in thread
From: Eric Sandeen @ 2022-01-25 19:00 UTC (permalink / raw)
  To: fio; +Cc: Jens Axboe

Without this, locally defined LDFLAGS won't be applied when
linking the dynamically loaded IO engines.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/Makefile b/Makefile
index 5d17bca..00e7953 100644
@@ -294,7 +295,7 @@ define engine_template =
  $(1)_OBJS := $$($(1)_SRCS:.c=.o)
  $$($(1)_OBJS): CFLAGS := -fPIC $$($(1)_CFLAGS) $(CFLAGS)
  engines/fio-$(1).so: $$($(1)_OBJS)
-	$$(QUIET_LINK)$(CC) -shared -rdynamic -fPIC -Wl,-soname,fio-$(1).so.1 -o $$@ $$< $$($(1)_LIBS)
+	$$(QUIET_LINK)$(CC) $(LDFLAGS) -shared -rdynamic -fPIC -Wl,-soname,fio-$(1).so.1 -o $$@ $$< $$($(1)_LIBS)
  ENGS_OBJS += engines/fio-$(1).so
  endef
  else # !CONFIG_DYNAMIC_ENGINES


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

* [PATCH 2/2 V2] fio: use LDFLAGS when linking dynamic engines
  2022-01-25 19:00 ` [PATCH 2/2] fio: use LDFLAGS when linking dynamic engines Eric Sandeen
@ 2022-01-26 14:49   ` Eric Sandeen
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Sandeen @ 2022-01-26 14:49 UTC (permalink / raw)
  To: fio; +Cc: Jens Axboe

Without this, locally defined LDFLAGS won't be applied when
linking the dynamically loaded IO engines.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

V2: Seems like V1 inexplicably got whitespace damaged, sorry,
let's try again :/

diff --git a/Makefile b/Makefile
index 5d17bca..00e7953 100644
@@ -294,7 +295,7 @@ define engine_template =
  $(1)_OBJS := $$($(1)_SRCS:.c=.o)
  $$($(1)_OBJS): CFLAGS := -fPIC $$($(1)_CFLAGS) $(CFLAGS)
  engines/fio-$(1).so: $$($(1)_OBJS)
-	$$(QUIET_LINK)$(CC) -shared -rdynamic -fPIC -Wl,-soname,fio-$(1).so.1 -o $$@ $$< $$($(1)_LIBS)
+	$$(QUIET_LINK)$(CC) $(DYNAMIC) -shared -rdynamic -fPIC -Wl,-soname,fio-$(1).so.1 -o $$@ $$< $$($(1)_LIBS)
  ENGS_OBJS += engines/fio-$(1).so
  endef
  else # !CONFIG_DYNAMIC_ENGINES


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

* Re: [PATCH 0/2] fio: a couple build fixes
  2022-01-25 18:55 [PATCH 0/2] fio: a couple build fixes Eric Sandeen
  2022-01-25 18:57 ` [PATCH 1/2] t/io_uring: link with libaio when necessary Eric Sandeen
  2022-01-25 19:00 ` [PATCH 2/2] fio: use LDFLAGS when linking dynamic engines Eric Sandeen
@ 2022-01-26 20:13 ` Jens Axboe
  2 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2022-01-26 20:13 UTC (permalink / raw)
  To: Eric Sandeen, fio

On 1/25/22 11:55 AM, Eric Sandeen wrote:
> Maybe it's just me, but t/io_uring.c doesn't link for me without -laio when CONFIG_LIBAIO
> is set.
> 
> I also got a report that dynamic engines aren't properly picking up LDFLAGS set by the
> build system (in this case, -Wl,-z,now).
> 
> So these two patches try to resolve those issues.

Applied, thanks Eric. On the patches, looks like format=flowed is set, which
may explain why it ends up being borken.

-- 
Jens Axboe


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

end of thread, other threads:[~2022-01-26 20:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-25 18:55 [PATCH 0/2] fio: a couple build fixes Eric Sandeen
2022-01-25 18:57 ` [PATCH 1/2] t/io_uring: link with libaio when necessary Eric Sandeen
2022-01-25 19:00 ` [PATCH 2/2] fio: use LDFLAGS when linking dynamic engines Eric Sandeen
2022-01-26 14:49   ` [PATCH 2/2 V2] " Eric Sandeen
2022-01-26 20:13 ` [PATCH 0/2] fio: a couple build fixes Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.