git » libtracefs.git » main » tree

[main] / libtracefs-1.6.1-ldflags.patch

diff -ruN a/scripts/utils.mk b/scripts/utils.mk
--- a/scripts/utils.mk	2022-11-16 18:06:45.000000000 +0100
+++ b/scripts/utils.mk	2022-11-16 23:48:04.354761155 +0100
@@ -101,11 +101,11 @@
 
 do_sample_build =							\
 	$(Q)($(print_sample_build)					\
-	$(CC) -o $1 $2 $(CFLAGS) $(LIBTRACEFS_STATIC) $(LIBTRACEEVENT_LIBS) -lpthread)
+	$(CC) -o $1 $2 $(CFLAGS) $(LIBTRACEFS_STATIC) $(LIBTRACEEVENT_LIBS) -lpthread $(LDFLAGS))
 
 do_sample_obj =									\
 	$(Q)($(print_sample_obj)						\
-	$(CC) -g -Wall -c $(CFLAGS) -o $1 $2 -I../include/ $(LIBTRACEEVENT_INCLUDES))
+	$(CC) -g -Wall -c $(CFLAGS) -o $1 $2 -I../include/ $(LIBTRACEEVENT_INCLUDES) $(LDFLAGS))
 
 ifneq ($(findstring $(MAKEFLAGS), w),w)
 PRINT_DIR = --no-print-directory