Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | blktrace: obey LDFLAGS |
| 2 | |
| 3 | Upstream-Status: Pending |
| 4 | |
| 5 | Signed-off-by: Christopher Larson <chris_larson@mentor.com> |
| 6 | |
| 7 | the patch was imported from meta-mentor layer on yoctoproject git server |
| 8 | http://git.yoctoproject.org/cgit/cgit.cgi/meta-mentor as of commit id |
| 9 | aed463414e2e2bf8ca44ba54ee5973e7ed599e57 |
| 10 | |
| 11 | Signed-off-by: Fahad Usman <fahad_usman@mentor.com> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 13 | Index: git/Makefile |
| 14 | =================================================================== |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 15 | --- 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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 24 | @@ -26,19 +27,19 @@ btreplay/btreplay: |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 25 | $(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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 49 | Index: git/btreplay/Makefile |
| 50 | =================================================================== |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 51 | --- 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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 62 | $(CC) $(CFLAGS) -c -o $*.o $< |
| 63 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 64 | 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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 74 | Index: git/btt/Makefile |
| 75 | =================================================================== |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 76 | --- 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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 95 | Index: git/iowatcher/Makefile |
| 96 | =================================================================== |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 97 | --- git.orig/iowatcher/Makefile |
| 98 | +++ git/iowatcher/Makefile |
| 99 | @@ -1,5 +1,6 @@ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 100 | CC = gcc |
| 101 | CFLAGS = -Wall -O2 -g -W -Wunused-result |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 102 | +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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 110 | - $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm -lrt |
| 111 | + $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm $(LDFLAGS) -lrt |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 112 | |
| 113 | depend: |
| 114 | @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend |