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]
This commit is contained in:
Érico Rolim 2020-09-05 19:20:08 -03:00 committed by Duncan Overbruck
parent 9c5443d134
commit a95f3d56c8
No known key found for this signature in database
GPG Key ID: 335C1D17EC3D6E35

View File

@ -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