From a95f3d56c87c8269df61d6f2bff0c6539379b14f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Sat, 5 Sep 2020 19:20:08 -0300 Subject: [PATCH] lib/Makefile: fix linking for libxbps.so. Both CFLAGS and LDFLAGS need to be passed during linkage as CFLAGS may contain things that influence linkage (e.g. ssp_nonshared may be necessary to link when using strong stack protector). Pointed out by q66. Closes: #330 [via git-merge-pr] --- lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Makefile b/lib/Makefile index 9636d668..822b9d74 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -81,7 +81,7 @@ $(OBJS): %.o: %.c libxbps.so: $(LIBFETCH_OBJS) $(LIBPROP_OBJS) $(OBJS) @printf " [CCLD]\t\t$@\n" - ${SILENT}$(CC) $^ $(LDFLAGS) -o $(LIBXBPS_SHLIB) + ${SILENT}$(CC) $^ $(CFLAGS) $(LDFLAGS) -o $(LIBXBPS_SHLIB) @-ln -sf $(LIBXBPS_SHLIB) libxbps.so.$(LIBXBPS_MAJOR) @-ln -sf $(LIBXBPS_SHLIB) libxbps.so