blob: ab905cf0da3fa8c6680cf3136c4872e8db77151a [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001blktrace: obey LDFLAGS
2
3Upstream-Status: Pending
4
5Signed-off-by: Christopher Larson <chris_larson@mentor.com>
6
7the patch was imported from meta-mentor layer on yoctoproject git server
8http://git.yoctoproject.org/cgit/cgit.cgi/meta-mentor as of commit id
9aed463414e2e2bf8ca44ba54ee5973e7ed599e57
10
11Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012
Brad Bishop316dfdd2018-06-25 12:45:53 -040013Index: git/Makefile
14===================================================================
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015--- git.orig/Makefile
16+++ git/Makefile
17@@ -1,5 +1,6 @@
18 CC = gcc
19 CFLAGS = -Wall -O2 -g -W
20+LDFLAGS =
21 ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
22 PROGS = blkparse blktrace verify_blkparse blkrawverify blkiomon
23 LIBS = -lpthread
Brad Bishop316dfdd2018-06-25 12:45:53 -040024@@ -26,19 +27,19 @@ btreplay/btreplay:
Patrick Williamsc124f4f2015-09-15 14:41:29 -050025 $(CC) -o $*.o -c $(ALL_CFLAGS) $<
26
27 blkparse: blkparse.o blkparse_fmt.o rbtree.o act_mask.o
28- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
29+ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS)
30
31 blktrace: blktrace.o act_mask.o
32- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
33+ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) $(LDFLAGS)
34
35 verify_blkparse: verify_blkparse.o
36- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
37+ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS)
38
39 blkrawverify: blkrawverify.o
40- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
41+ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS)
42
43 blkiomon: blkiomon.o rbtree.o
44- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt
45+ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt $(LDFLAGS)
46
47 $(PROGS): | depend
48
Brad Bishop316dfdd2018-06-25 12:45:53 -040049Index: git/btreplay/Makefile
50===================================================================
Patrick Williamsc124f4f2015-09-15 14:41:29 -050051--- git.orig/btreplay/Makefile
52+++ git/btreplay/Makefile
53@@ -7,6 +7,7 @@
54
55 CC = gcc
56 CFLAGS = -Wall -W -O2 -g
57+LDFLAGS =
58 INCS = -I. -I.. -I../btt
59 OCFLAGS = -UCOUNT_IOS -UDEBUG -DNDEBUG
60 XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
61@@ -32,10 +33,10 @@ clean: docsclean
Brad Bishop316dfdd2018-06-25 12:45:53 -040062 $(CC) $(CFLAGS) -c -o $*.o $<
63
Patrick Williamsc124f4f2015-09-15 14:41:29 -050064 btrecord: btrecord.o
65- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^)
66+ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS)
67
68 btreplay: btreplay.o
69- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
70+ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) $(LDFLAGS)
71
72 depend:
73 @$(CC) -MM $(CFLAGS) *.c 1> .depend
Brad Bishop316dfdd2018-06-25 12:45:53 -040074Index: git/btt/Makefile
75===================================================================
Patrick Williamsc124f4f2015-09-15 14:41:29 -050076--- git.orig/btt/Makefile
77+++ git/btt/Makefile
78@@ -7,6 +7,7 @@
79
80 CC = gcc
81 CFLAGS = -Wall -W -O2 -g
82+LDFLAGS =
83 INCS = -I. -I..
84 XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
85 override CFLAGS += $(INCS) $(XCFLAGS)
86@@ -38,7 +39,7 @@ clean: docsclean
87 $(CC) $(CFLAGS) -c -o $*.o $<
88
89 btt: $(OBJS)
90- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
91+ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) $(LDFLAGS)
92
93 ifneq ($(wildcard .depend),)
94 include .depend
Brad Bishop316dfdd2018-06-25 12:45:53 -040095Index: git/iowatcher/Makefile
96===================================================================
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050097--- git.orig/iowatcher/Makefile
98+++ git/iowatcher/Makefile
99@@ -1,5 +1,6 @@
Brad Bishop316dfdd2018-06-25 12:45:53 -0400100 CC = gcc
101 CFLAGS = -Wall -O2 -g -W -Wunused-result
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500102+LDFLAGS =
103 ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
104
105 PROGS = iowatcher
106@@ -19,7 +20,7 @@ all: $(ALL)
107 $(CC) -o $*.o -c $(ALL_CFLAGS) $<
108
109 iowatcher: blkparse.o plot.o main.o tracers.o mpstat.o fio.o
Brad Bishop316dfdd2018-06-25 12:45:53 -0400110- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm -lrt
111+ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm $(LDFLAGS) -lrt
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500112
113 depend:
114 @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend