xbps: use both cflags and ldflags to link libxbps.so
Ref: https://github.com/void-linux/void-packages/pull/22644
This commit is contained in:
parent
3d0fac050c
commit
88717e09e1
1 changed files with 17 additions and 0 deletions
17
srcpkgs/xbps/patches/cflags.patch
Normal file
17
srcpkgs/xbps/patches/cflags.patch
Normal file
|
@ -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
|
||||
|
Loading…
Reference in a new issue