Makefile: ensure that external libs are linked properly with dynamic engine
authorJens Axboe <axboe@kernel.dk>
Mon, 9 Nov 2020 17:05:11 +0000 (10:05 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 9 Nov 2020 17:05:11 +0000 (10:05 -0700)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Makefile

index ca454318f71538bd1b5102420751c49b42f955c1..0d3c877ed8493e744094291fc78d51529ae9a024 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -252,7 +252,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 $$($(1)_LIBS) -o $$@ $$<
+       $$(QUIET_LINK)$(CC) -shared -rdynamic -fPIC -Wl,-soname,fio-$(1).so.1 -o $$@ $$< $$($(1)_LIBS)
 ENGS_OBJS += engines/fio-$(1).so
 endef
 else # !CONFIG_DYNAMIC_ENGINES