Files
poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
Ross Burton 795934f307 blktrace: refresh patches
The patch tool will apply patches by default with "fuzz", which is where if the
hunk context isn't present but what is there is close enough, it will force the
patch in.

Whilst this is useful when there's just whitespace changes, when applied to
source it is possible for a patch applied with fuzz to produce broken code which
still compiles (see #10450).  This is obviously bad.

We'd like to eventually have do_patch() rejecting any fuzz on these grounds. For
that to be realistic the existing patches with fuzz need to be rebased and
reviewed.

(From OE-Core rev: 0666146a9f12c90e2b5f9fd3b03b21429fb9327c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-11 06:27:01 -07:00

115 lines
3.4 KiB
Diff

blktrace: obey LDFLAGS
Upstream-Status: Pending
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
the patch was imported from meta-mentor layer on yoctoproject git server
http://git.yoctoproject.org/cgit/cgit.cgi/meta-mentor as of commit id
aed463414e2e2bf8ca44ba54ee5973e7ed599e57
Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
Index: git/Makefile
===================================================================
--- git.orig/Makefile
+++ git/Makefile
@@ -1,5 +1,6 @@
CC = gcc
CFLAGS = -Wall -O2 -g -W
+LDFLAGS =
ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
PROGS = blkparse blktrace verify_blkparse blkrawverify blkiomon
LIBS = -lpthread
@@ -26,19 +27,19 @@ btreplay/btreplay:
$(CC) -o $*.o -c $(ALL_CFLAGS) $<
blkparse: blkparse.o blkparse_fmt.o rbtree.o act_mask.o
- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
+ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS)
blktrace: blktrace.o act_mask.o
- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) $(LDFLAGS)
verify_blkparse: verify_blkparse.o
- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
+ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS)
blkrawverify: blkrawverify.o
- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
+ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS)
blkiomon: blkiomon.o rbtree.o
- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt
+ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt $(LDFLAGS)
$(PROGS): | depend
Index: git/btreplay/Makefile
===================================================================
--- git.orig/btreplay/Makefile
+++ git/btreplay/Makefile
@@ -7,6 +7,7 @@
CC = gcc
CFLAGS = -Wall -W -O2 -g
+LDFLAGS =
INCS = -I. -I.. -I../btt
OCFLAGS = -UCOUNT_IOS -UDEBUG -DNDEBUG
XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
@@ -32,10 +33,10 @@ clean: docsclean
$(CC) $(CFLAGS) -c -o $*.o $<
btrecord: btrecord.o
- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^)
+ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS)
btreplay: btreplay.o
- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) $(LDFLAGS)
depend:
@$(CC) -MM $(CFLAGS) *.c 1> .depend
Index: git/btt/Makefile
===================================================================
--- git.orig/btt/Makefile
+++ git/btt/Makefile
@@ -7,6 +7,7 @@
CC = gcc
CFLAGS = -Wall -W -O2 -g
+LDFLAGS =
INCS = -I. -I..
XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
override CFLAGS += $(INCS) $(XCFLAGS)
@@ -38,7 +39,7 @@ clean: docsclean
$(CC) $(CFLAGS) -c -o $*.o $<
btt: $(OBJS)
- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) $(LDFLAGS)
ifneq ($(wildcard .depend),)
include .depend
Index: git/iowatcher/Makefile
===================================================================
--- git.orig/iowatcher/Makefile
+++ git/iowatcher/Makefile
@@ -1,5 +1,6 @@
CC = gcc
CFLAGS = -Wall -O2 -g -W -Wunused-result
+LDFLAGS =
ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
PROGS = iowatcher
@@ -19,7 +20,7 @@ all: $(ALL)
$(CC) -o $*.o -c $(ALL_CFLAGS) $<
iowatcher: blkparse.o plot.o main.o tracers.o mpstat.o fio.o
- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm -lrt
+ $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm $(LDFLAGS) -lrt
depend:
@$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend