Since -shared only takes effect when linking, only specify it when linking. This patch fixes the following clang warning: clang-10.0: warning: argument unused during compilation: '-shared' [-Wunused-command-line-argument] Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> --- src/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 3099f7cd51ec..44a95ad78afa 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,7 +6,7 @@ libdevdir ?= $(prefix)/lib CFLAGS ?= -g -fomit-frame-pointer -O2 override CFLAGS += -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare\ -Iinclude/ -include ../config-host.h -SO_CFLAGS=-shared -fPIC $(CFLAGS) +SO_CFLAGS=-fPIC $(CFLAGS) L_CFLAGS=$(CFLAGS) LINK_FLAGS= LINK_FLAGS+=$(LDFLAGS) @@ -51,7 +51,7 @@ liburing.a: $(liburing_objs) $(QUIET_RANLIB)$(RANLIB) liburing.a $(libname): $(liburing_sobjs) liburing.map - $(QUIET_CC)$(CC) $(SO_CFLAGS) -Wl,--version-script=liburing.map -Wl,-soname=$(soname) -o $@ $(liburing_sobjs) $(LINK_FLAGS) + $(QUIET_CC)$(CC) $(SO_CFLAGS) -shared -Wl,--version-script=liburing.map -Wl,-soname=$(soname) -o $@ $(liburing_sobjs) $(LINK_FLAGS) install: $(all_targets) install -D -m 644 include/liburing/io_uring.h $(includedir)/liburing/io_uring.h