1 |
commit: b69c9598000651b6a87b8e15e5765725f4001a2f |
2 |
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Sep 3 23:04:38 2021 +0000 |
4 |
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
5 |
CommitDate: Fri Sep 3 23:05:07 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b69c9598 |
7 |
|
8 |
sys-apps/intel-cmt-cat: respect flags, don't strip |
9 |
|
10 |
Closes: https://bugs.gentoo.org/810736 |
11 |
Closes: https://bugs.gentoo.org/810733 |
12 |
Package-Manager: Portage-3.0.22, Repoman-3.0.3 |
13 |
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
14 |
|
15 |
.../files/intel-cmt-cat-do-not-strip.patch | 32 ++++ |
16 |
.../files/intel-cmt-cat-respect-flags.patch | 212 +++++++++++++++++++++ |
17 |
...2.0-r1.ebuild => intel-cmt-cat-4.2.0-r2.ebuild} | 6 +- |
18 |
3 files changed, 249 insertions(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/sys-apps/intel-cmt-cat/files/intel-cmt-cat-do-not-strip.patch b/sys-apps/intel-cmt-cat/files/intel-cmt-cat-do-not-strip.patch |
21 |
new file mode 100644 |
22 |
index 000000000..44ea45617 |
23 |
--- /dev/null |
24 |
+++ b/sys-apps/intel-cmt-cat/files/intel-cmt-cat-do-not-strip.patch |
25 |
@@ -0,0 +1,32 @@ |
26 |
+--- a/pqos/Makefile |
27 |
++++ b/pqos/Makefile |
28 |
+@@ -108,12 +108,12 @@ |
29 |
+ ifeq ($(shell uname), FreeBSD) |
30 |
+ install -d $(BIN_DIR) |
31 |
+ install -d $(MAN_DIR) |
32 |
+- install -s $(APP) $(BIN_DIR) |
33 |
++ install $(APP) $(BIN_DIR) |
34 |
+ install $(APP)-msr $(BIN_DIR) |
35 |
+ install -m 0444 $(MAN) $(MAN_DIR) |
36 |
+ ln -f -s $(MAN) $(MAN_DIR)/$(APP)-msr.8 |
37 |
+ else |
38 |
+- install -D -s $(APP) $(BIN_DIR)/$(APP) |
39 |
++ install -D $(APP) $(BIN_DIR)/$(APP) |
40 |
+ install -D $(APP)-msr $(BIN_DIR)/$(APP)-msr |
41 |
+ install -D $(APP)-os $(BIN_DIR)/$(APP)-os |
42 |
+ install -m 0444 $(MAN) -D $(MAN_DIR)/$(MAN) |
43 |
+--- a/rdtset/Makefile |
44 |
++++ b/rdtset/Makefile |
45 |
+@@ -115,10 +115,10 @@ |
46 |
+ ifeq ($(shell uname), FreeBSD) |
47 |
+ install -d $(BIN_DIR) |
48 |
+ install -d $(MAN_DIR) |
49 |
+- install -s $(APP) $(BIN_DIR) |
50 |
++ install $(APP) $(BIN_DIR) |
51 |
+ install -m 0444 $(MAN) $(MAN_DIR) |
52 |
+ else |
53 |
+- install -D -s $(APP) $(BIN_DIR)/$(APP) |
54 |
++ install -D $(APP) $(BIN_DIR)/$(APP) |
55 |
+ install -m 0444 $(MAN) -D $(MAN_DIR)/$(MAN) |
56 |
+ endif |
57 |
+ |
58 |
|
59 |
diff --git a/sys-apps/intel-cmt-cat/files/intel-cmt-cat-respect-flags.patch b/sys-apps/intel-cmt-cat/files/intel-cmt-cat-respect-flags.patch |
60 |
new file mode 100644 |
61 |
index 000000000..81b591060 |
62 |
--- /dev/null |
63 |
+++ b/sys-apps/intel-cmt-cat/files/intel-cmt-cat-respect-flags.patch |
64 |
@@ -0,0 +1,212 @@ |
65 |
+--- a/examples/c/CAT_MBA/Makefile |
66 |
++++ b/examples/c/CAT_MBA/Makefile |
67 |
+@@ -35,17 +35,17 @@ |
68 |
+ ############################################################################### |
69 |
+ |
70 |
+ LIBDIR ?= ../../../lib |
71 |
+-CFLAGS =-I$(LIBDIR) \ |
72 |
++CFLAGS += -I$(LIBDIR) \ |
73 |
+ -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \ |
74 |
+ -Wmissing-declarations -Wold-style-definition -Wpointer-arith \ |
75 |
+ -Wcast-qual -Wundef -Wwrite-strings \ |
76 |
+- -Wformat -Wformat-security -fstack-protector -fPIE -D_FORTIFY_SOURCE=2 \ |
77 |
+- -Wunreachable-code -Wsign-compare -Wno-endif-labels \ |
78 |
+- -g -O2 |
79 |
++ -Wformat -Wformat-security -fPIE \ |
80 |
++ -Wunreachable-code -Wsign-compare -Wno-endif-labels |
81 |
++ |
82 |
+ ifneq ($(EXTRA_CFLAGS),) |
83 |
+ CFLAGS += $(EXTRA_CFLAGS) |
84 |
+ endif |
85 |
+-LDFLAGS=-L$(LIBDIR) -pie -z noexecstack -z relro -z now |
86 |
++LDFLAGS += -L$(LIBDIR) -pie -z noexecstack -z relro -z now |
87 |
+ LDLIBS=-lpqos -lpthread |
88 |
+ |
89 |
+ # ICC and GCC options |
90 |
+--- a/examples/c/CMT_MBM/Makefile |
91 |
++++ b/examples/c/CMT_MBM/Makefile |
92 |
+@@ -35,17 +35,17 @@ |
93 |
+ ############################################################################### |
94 |
+ |
95 |
+ LIBDIR ?= ../../../lib |
96 |
+-CFLAGS =-I$(LIBDIR) -pthread \ |
97 |
++CFLAGS += -I$(LIBDIR) -pthread \ |
98 |
+ -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \ |
99 |
+ -Wmissing-declarations -Wold-style-definition -Wpointer-arith \ |
100 |
+ -Wcast-qual -Wundef -Wwrite-strings \ |
101 |
+- -Wformat -Wformat-security -fstack-protector -fPIE -D_FORTIFY_SOURCE=2 \ |
102 |
+- -Wunreachable-code -Wsign-compare -Wno-endif-labels \ |
103 |
+- -g -O2 |
104 |
++ -Wformat -Wformat-security -fPIE \ |
105 |
++ -Wunreachable-code -Wsign-compare -Wno-endif-labels |
106 |
++ |
107 |
+ ifneq ($(EXTRA_CFLAGS),) |
108 |
+ CFLAGS += $(EXTRA_CFLAGS) |
109 |
+ endif |
110 |
+-LDFLAGS=-L$(LIBDIR) -pie -z noexecstack -z relro -z now |
111 |
++LDFLAGS += -L$(LIBDIR) -pie -z noexecstack -z relro -z now |
112 |
+ LDLIBS=-lpqos -lpthread |
113 |
+ |
114 |
+ # ICC and GCC options |
115 |
+--- a/examples/c/PSEUDO_LOCK/Makefile |
116 |
++++ b/examples/c/PSEUDO_LOCK/Makefile |
117 |
+@@ -35,15 +35,15 @@ |
118 |
+ ############################################################################### |
119 |
+ |
120 |
+ LIBDIR ?= ../../../lib |
121 |
+-LDFLAGS = -L$(LIBDIR) -pie -z noexecstack -z relro -z now |
122 |
++LDFLAGS += -L$(LIBDIR) -pie -z noexecstack -z relro -z now |
123 |
+ LDLIBS = -lpqos -lrt -lpthread |
124 |
+-CFLAGS = -I$(LIBDIR) \ |
125 |
++CFLAGS += -I$(LIBDIR) \ |
126 |
+ -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \ |
127 |
+ -Wmissing-declarations -Wold-style-definition -Wpointer-arith \ |
128 |
+ -Wcast-qual -Wundef -Wwrite-strings \ |
129 |
+- -Wformat -Wformat-security -fstack-protector -fPIE -D_FORTIFY_SOURCE=2 \ |
130 |
+- -Wunreachable-code -Wsign-compare -Wno-endif-labels \ |
131 |
+- -g -O2 |
132 |
++ -Wformat -Wformat-security -fPIE \ |
133 |
++ -Wunreachable-code -Wsign-compare -Wno-endif-labels |
134 |
++ |
135 |
+ ifneq ($(EXTRA_CFLAGS),) |
136 |
+ CFLAGS += $(EXTRA_CFLAGS) |
137 |
+ endif |
138 |
+--- a/lib/Makefile |
139 |
++++ b/lib/Makefile |
140 |
+@@ -37,12 +37,12 @@ |
141 |
+ VERSION = 4.2.0 |
142 |
+ SO_VERSION = 4 |
143 |
+ SHARED ?= y |
144 |
+-LDFLAGS = -L. -lpthread -z noexecstack -z relro -z now |
145 |
+-CFLAGS = -pthread -I./ -D_GNU_SOURCE \ |
146 |
++LDFLAGS += -L. -lpthread -z noexecstack -z relro -z now |
147 |
++CFLAGS += -pthread -I./ -D_GNU_SOURCE \ |
148 |
+ -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \ |
149 |
+ -Wmissing-declarations -Wold-style-definition -Wpointer-arith \ |
150 |
+ -Wcast-qual -Wundef -Wwrite-strings \ |
151 |
+- -Wformat -Wformat-security -fstack-protector \ |
152 |
++ -Wformat -Wformat-security \ |
153 |
+ -Wunreachable-code -Wsign-compare -Wno-endif-labels |
154 |
+ ifneq ($(EXTRA_CFLAGS),) |
155 |
+ CFLAGS += $(EXTRA_CFLAGS) |
156 |
+@@ -83,9 +83,7 @@ |
157 |
+ |
158 |
+ # DEBUG build |
159 |
+ ifeq ($(DEBUG),y) |
160 |
+-CFLAGS += -g -ggdb -O0 -DDEBUG |
161 |
+-else |
162 |
+-CFLAGS += -g -O2 -D_FORTIFY_SOURCE=2 |
163 |
++CFLAGS += -DDEBUG |
164 |
+ endif |
165 |
+ |
166 |
+ # RMID CUSTOM |
167 |
+--- a/pqos/Makefile |
168 |
++++ b/pqos/Makefile |
169 |
+@@ -35,13 +35,13 @@ |
170 |
+ ############################################################################### |
171 |
+ |
172 |
+ LIBDIR ?= ../lib |
173 |
+-LDFLAGS = -L$(LIBDIR) -pie -z noexecstack -z relro -z now |
174 |
++LDFLAGS += -L$(LIBDIR) -pie -z noexecstack -z relro -z now |
175 |
+ LDLIBS = -lpqos -lpthread |
176 |
+-CFLAGS = -I$(LIBDIR) \ |
177 |
++CFLAGS += -I$(LIBDIR) \ |
178 |
+ -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \ |
179 |
+ -Wmissing-declarations -Wold-style-definition -Wpointer-arith \ |
180 |
+ -Wcast-qual -Wundef -Wwrite-strings \ |
181 |
+- -Wformat -Wformat-security -fstack-protector -fPIE \ |
182 |
++ -Wformat -Wformat-security -fPIE \ |
183 |
+ -Wunreachable-code -Wsign-compare -Wno-endif-labels |
184 |
+ ifneq ($(EXTRA_CFLAGS),) |
185 |
+ CFLAGS += $(EXTRA_CFLAGS) |
186 |
+@@ -68,9 +68,7 @@ |
187 |
+ |
188 |
+ # DEBUG build |
189 |
+ ifeq ($(DEBUG),y) |
190 |
+-CFLAGS += -g -ggdb -O0 -DDEBUG |
191 |
+-else |
192 |
+-CFLAGS += -g -O2 -D_FORTIFY_SOURCE=2 |
193 |
++CFLAGS += -DDEBUG |
194 |
+ endif |
195 |
+ |
196 |
+ # RMID CUSTOM |
197 |
+--- a/rdtset/Makefile |
198 |
++++ b/rdtset/Makefile |
199 |
+@@ -35,13 +35,13 @@ |
200 |
+ ############################################################################### |
201 |
+ |
202 |
+ LIBDIR ?= ../lib |
203 |
+-LDFLAGS = -L$(LIBDIR) -pie -z noexecstack -z relro -z now |
204 |
++LDFLAGS += -L$(LIBDIR) -pie -z noexecstack -z relro -z now |
205 |
+ LDLIBS = -lpqos -lpthread |
206 |
+-CFLAGS = -I$(LIBDIR) \ |
207 |
++CFLAGS += -I$(LIBDIR) \ |
208 |
+ -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \ |
209 |
+ -Wmissing-declarations -Wold-style-definition -Wpointer-arith \ |
210 |
+ -Wcast-qual -Wundef -Wwrite-strings \ |
211 |
+- -Wformat -Wformat-security -fstack-protector -fPIE \ |
212 |
++ -Wformat -Wformat-security -fPIE \ |
213 |
+ -Wunreachable-code -Wsign-compare -Wno-endif-labels \ |
214 |
+ -D_GNU_SOURCE |
215 |
+ ifneq ($(EXTRA_CFLAGS),) |
216 |
+@@ -69,9 +69,7 @@ |
217 |
+ |
218 |
+ # DEBUG build |
219 |
+ ifeq ($(DEBUG),y) |
220 |
+-CFLAGS += -g -ggdb -O0 -DDEBUG |
221 |
+-else |
222 |
+-CFLAGS += -g -O2 -D_FORTIFY_SOURCE=2 |
223 |
++CFLAGS += -DDEBUG |
224 |
+ endif |
225 |
+ |
226 |
+ # RMID CUSTOM |
227 |
+--- a/tools/membw/Makefile |
228 |
++++ b/tools/membw/Makefile |
229 |
+@@ -36,17 +36,15 @@ |
230 |
+ |
231 |
+ APP = membw |
232 |
+ |
233 |
+-CFLAGS=-W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \ |
234 |
++CFLAGS += -W -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes \ |
235 |
+ -Wmissing-declarations -Wold-style-definition -Wpointer-arith \ |
236 |
+ -Wcast-qual -Wundef -Wwrite-strings \ |
237 |
+- -Wformat -Wformat-security -fstack-protector -fPIE \ |
238 |
++ -Wformat -Wformat-security -fPIE \ |
239 |
+ -Wunreachable-code -Wsign-compare -Wno-endif-labels \ |
240 |
+- -Winline -msse4.2 |
241 |
++ -Winline |
242 |
+ |
243 |
+ ifeq ($(DEBUG),y) |
244 |
+-CFLAGS += -O0 -g -DDEBUG |
245 |
+-else |
246 |
+-CFLAGS += -O3 -g -D_FORTIFY_SOURCE=2 |
247 |
++CFLAGS += -DDEBUG |
248 |
+ endif |
249 |
+ |
250 |
+ HAS_AVX512 := $(shell $(CC) -mavx512f -dM -E - < /dev/null 2> /dev/null | grep -c "AVX512F") |
251 |
+--- a/unit-test/lib/Makefile |
252 |
++++ b/unit-test/lib/Makefile |
253 |
+@@ -15,13 +15,13 @@ |
254 |
+ TESTS = $(TESTS_SRCS:%.c=$(BIN_DIR)/%) |
255 |
+ |
256 |
+ |
257 |
+-LDFLAGS = -L$(MOCK_DIR) -lpthread -lcmocka -lpqosmock -z noexecstack -z relro -z now |
258 |
+-CFLAGS = -pthread -I$(LIB_DIR) -I$(MOCK_DIR) \ |
259 |
++LDFLAGS += -L$(MOCK_DIR) -lpthread -lcmocka -lpqosmock -z noexecstack -z relro -z now |
260 |
++CFLAGS += -pthread -I$(LIB_DIR) -I$(MOCK_DIR) \ |
261 |
+ -D_GNU_SOURCE \ |
262 |
+ -W -Wall -Wextra -Wstrict-prototypes \ |
263 |
+ -Wold-style-definition -Wpointer-arith \ |
264 |
+ -Wcast-qual -Wundef -Wwrite-strings \ |
265 |
+- -Wformat -Wformat-security -fstack-protector \ |
266 |
++ -Wformat -Wformat-security \ |
267 |
+ -Wunreachable-code -Wsign-compare -Wno-endif-labels \ |
268 |
+ -D'PQOS_LOCAL=' -D'PQOS_API=' |
269 |
+ |
270 |
+@@ -527,4 +527,4 @@ |
271 |
+ |
272 |
+ clean: |
273 |
+ rm -rf $(BIN_DIR) |
274 |
+- rm -rf $(OBJ_DIR) |
275 |
+\ Manca newline alla fine del file |
276 |
++ rm -rf $(OBJ_DIR) |
277 |
|
278 |
diff --git a/sys-apps/intel-cmt-cat/intel-cmt-cat-4.2.0-r1.ebuild b/sys-apps/intel-cmt-cat/intel-cmt-cat-4.2.0-r2.ebuild |
279 |
similarity index 95% |
280 |
rename from sys-apps/intel-cmt-cat/intel-cmt-cat-4.2.0-r1.ebuild |
281 |
rename to sys-apps/intel-cmt-cat/intel-cmt-cat-4.2.0-r2.ebuild |
282 |
index f4c6de5e7..aee2b7962 100644 |
283 |
--- a/sys-apps/intel-cmt-cat/intel-cmt-cat-4.2.0-r1.ebuild |
284 |
+++ b/sys-apps/intel-cmt-cat/intel-cmt-cat-4.2.0-r2.ebuild |
285 |
@@ -38,7 +38,11 @@ DEPEND=" |
286 |
" |
287 |
|
288 |
REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
289 |
-PATCHES=( "${FILESDIR}/${PN}-perl-makefile.patch" ) |
290 |
+PATCHES=( |
291 |
+ "${FILESDIR}/${PN}-perl-makefile.patch" |
292 |
+ "${FILESDIR}/${PN}-do-not-strip.patch" |
293 |
+ "${FILESDIR}/${PN}-respect-flags.patch" |
294 |
+) |
295 |
|
296 |
distutils_enable_tests unittest |
297 |
distutils_enable_tests pytest |