diff --git a/srcpkgs/xbps/patches/cflags.patch b/srcpkgs/xbps/patches/cflags.patch new file mode 100644 index 00000000000..8e576f2a887 --- /dev/null +++ b/srcpkgs/xbps/patches/cflags.patch @@ -0,0 +1,17 @@ +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) + +diff --git lib/Makefile lib/Makefile +index 65342ef..847bfdd 100644 +--- lib/Makefile ++++ lib/Makefile +@@ -78,7 +78,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 +