0fb0bad82b94c016d63ef7c3ae33939f3ffeff3e
[deb_dpdk.git] / debian / patches / mk-sort-source-files-before-passing-them-to-the-comp.patch
1 Description: mk: sort source files before passing them to the compiler
2
3 In order to achieve reproducible builds, always use the same
4 order when listing files for compilation.
5
6 Origin: http://dpdk.org/dev/patchwork/patch/25678/
7 Forwarded: yes
8 Author: Luca Boccassi <luca.boccassi@gmail.com>
9 Last-Update: 2017-06-24
10 ---
11  drivers/net/cxgbe/Makefile    | 2 +-
12  drivers/net/e1000/Makefile    | 2 +-
13  drivers/net/fm10k/Makefile    | 2 +-
14  drivers/net/i40e/Makefile     | 2 +-
15  drivers/net/ixgbe/Makefile    | 2 +-
16  drivers/net/qede/Makefile     | 2 +-
17  drivers/net/sfc/Makefile      | 2 +-
18  drivers/net/thunderx/Makefile | 2 +-
19  8 files changed, 8 insertions(+), 8 deletions(-)
20
21 diff --git a/drivers/net/cxgbe/Makefile b/drivers/net/cxgbe/Makefile
22 index 7cef6279c..b4666b5af 100644
23 --- a/drivers/net/cxgbe/Makefile
24 +++ b/drivers/net/cxgbe/Makefile
25 @@ -67,7 +67,7 @@ endif
26  # Add extra flags for base driver files (also known as shared code)
27  # to disable warnings in them
28  #
29 -BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
30 +BASE_DRIVER_OBJS=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))))
31  $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
32  
33  VPATH += $(SRCDIR)/base
34 diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile
35 index ffdf36d37..59d96bca1 100644
36 --- a/drivers/net/e1000/Makefile
37 +++ b/drivers/net/e1000/Makefile
38 @@ -68,7 +68,7 @@ endif
39  # Add extra flags for base driver files (also known as shared code)
40  # to disable warnings in them
41  #
42 -BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
43 +BASE_DRIVER_OBJS=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))))
44  $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
45  
46  VPATH += $(SRCDIR)/base
47 diff --git a/drivers/net/fm10k/Makefile b/drivers/net/fm10k/Makefile
48 index e0024f052..0bc124eb1 100644
49 --- a/drivers/net/fm10k/Makefile
50 +++ b/drivers/net/fm10k/Makefile
51 @@ -80,7 +80,7 @@ endif
52  #
53  # Add extra flags for base driver source files to disable warnings in them
54  #
55 -BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
56 +BASE_DRIVER_OBJS=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))))
57  $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
58  
59  VPATH += $(SRCDIR)/base
60 diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile
61 index 56f210d6d..06eedc592 100644
62 --- a/drivers/net/i40e/Makefile
63 +++ b/drivers/net/i40e/Makefile
64 @@ -78,7 +78,7 @@ endif
65  
66  CFLAGS_i40e_lan_hmc.o += -Wno-error
67  endif
68 -OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
69 +OBJS_BASE_DRIVER=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))))
70  $(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
71  
72  VPATH += $(SRCDIR)/base
73 diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile
74 index 6a651b923..f5c370ce5 100644
75 --- a/drivers/net/ixgbe/Makefile
76 +++ b/drivers/net/ixgbe/Makefile
77 @@ -87,7 +87,7 @@ endif
78  # Add extra flags for base driver files (also known as shared code)
79  # to disable warnings in them
80  #
81 -BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
82 +BASE_DRIVER_OBJS=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))))
83  $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
84  
85  VPATH += $(SRCDIR)/base
86 diff --git a/drivers/net/qede/Makefile b/drivers/net/qede/Makefile
87 index f03441d9a..83ff95474 100644
88 --- a/drivers/net/qede/Makefile
89 +++ b/drivers/net/qede/Makefile
90 @@ -78,7 +78,7 @@ endif
91  # to disable warnings in them
92  #
93  #
94 -BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
95 +BASE_DRIVER_OBJS=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))))
96  $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
97  
98  VPATH += $(SRCDIR)/base
99 diff --git a/drivers/net/sfc/Makefile b/drivers/net/sfc/Makefile
100 index 57aa963ba..8cfd14d45 100644
101 --- a/drivers/net/sfc/Makefile
102 +++ b/drivers/net/sfc/Makefile
103 @@ -71,7 +71,7 @@ endif
104  # List of base driver object files for which
105  # special CFLAGS above should be applied
106  #
107 -BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
108 +BASE_DRIVER_OBJS=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))))
109  $(foreach obj, $(BASE_DRIVER_OBJS), \
110    $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
111  
112 diff --git a/drivers/net/thunderx/Makefile b/drivers/net/thunderx/Makefile
113 index 706250b8b..ac384a624 100644
114 --- a/drivers/net/thunderx/Makefile
115 +++ b/drivers/net/thunderx/Makefile
116 @@ -45,7 +45,7 @@ EXPORT_MAP := rte_pmd_thunderx_nicvf_version.map
117  
118  LIBABIVER := 1
119  
120 -OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
121 +OBJS_BASE_DRIVER=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))))
122  $(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
123  
124  VPATH += $(SRCDIR)/base
125 -- 
126 2.11.0
127