packaging: bump up version to 13.1.0
[platform/upstream/gcc-contrib.git] / packaging / gcc-contrib.spec
1 #
2 # spec file for package gcc-contrib
3 #
4 # Copyright (c) 2017 Tizen
5 # Please submit bugfixes or comments via http://bugs.tizen.org/
6 #
7 # we use %%{?macro: ... } as it is more compact
8
9 %define quadmath_arch %ix86 x86_64 ia64
10 %define tsan_arch x86_64 aarch64
11 %define asan_arch x86_64 %ix86 ppc ppc64 %sparc %arm aarch64
12 %define hwasan_arch aarch64
13 %define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc aarch64
14 %define atomic_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x %sparc m68k
15 %define lsan_arch x86_64 %ix86 armv7l aarch64
16 %define ubsan_arch x86_64 %ix86 ppc ppc64 %arm aarch64 riscv64
17 %define cilkrts_arch x86_64 %ix86
18
19 %ifarch armv7l
20 %define ARCH armv7l
21 %define ABI eabi
22 %endif
23 %ifarch %ix86
24 %define ARCH i586
25 %endif
26 %ifarch x86_64
27 %define ARCH x86_64
28 %endif
29 %ifarch aarch64
30 %define ARCH aarch64
31 %endif
32 %ifarch riscv64
33 %define ARCH riscv64
34 %endif
35 %define host_arch %{ARCH}-tizen-linux-gnu%{?ABI}
36
37 %define target_cpu %{?cross}%{!?cross:%{ARCH}}
38 %define target_abi %{?cross:%{?armv7l:eabi}}%{!?cross:%{?ABI}}
39
40 %define target_arch %{target_cpu}-tizen-linux-gnu%{?target_abi}
41 %define libdir %{!?cross:%{_libdir}}%{?cross:%{_prefix}/lib%{?aarch64:64}}
42 %define libsubdir %{libdir}/gcc/%{target_arch}/%{version}
43
44 %ifarch armv7l
45 %define asan_force_options -fsanitize-recover=address -fsanitize=address -mthumb -Wa,-mimplicit-it=thumb -fno-omit-frame-pointer -Wp,-U_FORTIFY_SOURCE -Wl,--as-needed -ldl -lpthread
46 %define lsan_force_options -fsanitize=leak -mthumb -Wa,-mimplicit-it=thumb -fno-omit-frame-pointer -Wp,-U_FORTIFY_SOURCE -Wl,--as-needed -ldl -lpthread
47 %else
48 %define asan_force_options -fsanitize-recover=address -fsanitize=address -fno-omit-frame-pointer -Wp,-U_FORTIFY_SOURCE -Wl,--as-needed -ldl -lpthread
49 %define lsan_force_options -fsanitize=leak -fno-omit-frame-pointer -Wp,-U_FORTIFY_SOURCE -Wl,--as-needed -ldl -lpthread
50 %endif
51 %define ubsan_force_options -fsanitize=undefined,bounds-strict,float-divide-by-zero,float-cast-overflow
52 %define tsan_force_options -fsanitize=thread -fno-omit-frame-pointer -Wp,-U_FORTIFY_SOURCE -Wl,--as-needed -ldl -lpthread
53 %define gcov_force_options -fprofile-arcs -ftest-coverage
54 %define asan_runtime_options halt_on_error=false:start_deactivated=true:print_cmdline=true:quarantine_size_mb=1:detect_leaks=0:full_address_space=true:handle_segv=0:log_path=/tmp/asan.log:log_exe_name=1:fast_unwind_on_fatal=1:allocator_may_return_null=1:exitcode=0
55 %define ubsan_runtime_options print_cmdline=true:log_path=/tmp/ubsan.log
56 %define lsan_runtime_options print_cmdline=true:detect_leaks=1:log_path=/tmp/lsan.log:log_exe_name=1:fast_unwind_on_malloc=false:malloc_context_size=5:suppressions=/lsan.supp:print_suppressions=false
57 %define tsan_runtime_options print_cmdline=true:log_path=/tmp/tsan.log:detect_deadlocks=1:second_deadlock_stack=1
58 %define hwasan_force_options -fsanitize=hwaddress -fsanitize-recover=hwaddress -Wp,-U_FORTIFY_SOURCE -Wl,--as-needed -ldl -lpthread
59 %define hwasan_runtime_options halt_on_error=false:print_cmdline=true:handle_segv=0:log_path=/tmp/hwasan.log:log_exe_name=1:exitcode=0
60
61 Name:         gcc-contrib%{?cross:-%{cross}}
62 # With generated files in src we could drop the following
63 ## until here, but at least renaming and patching info files breaks this
64 %{?cross:BuildRequires: binutils-%{cross}}
65 # here we use %%if because OBS spec parser cannot expand
66 # %%{?macro:...} correctly
67 Version:       13.1.0
68 Release:       0
69 Source15: gcc-force-options
70 Source16: gcc-unforce-options
71 Source17: asan_symbolize.py
72 Source18: gcc-contrib.manifest
73 Source19: macros.ubsan
74 Source20: extract-ubsan-logs
75 Source21: lsan.supp
76 Source22: macros.asan
77 Source23: cc1
78 Source24: macros.gcc_warning
79 Source25: extract-gcc-warning-logs
80 Source26: macros.gcov
81 Source27: extract-gcov-info
82 Source28: asansictl
83 Source29: hwasan_stub.c
84 Group:         Development/Building
85 Summary:       GCC related scripts
86 License:       MIT
87 %{?cross:ExcludeArch: %{cross}}
88 %description
89 GCC related scripts
90
91 %package -n asan-force-options
92 Summary:    Scripts to enable automatic package sanitization
93 Group:      System Environment
94 Requires:   gcc rpm
95 Requires:   libasan
96
97 %description -n asan-force-options
98 Scripts for ASan instrumentation
99
100 %post -n asan-force-options
101 # Change mode to allow all users to run gcc-force/unforce-options
102 chmod a+w /usr/bin
103 chmod a+w %{libsubdir}
104 /usr/bin/gcc-force-options %asan_force_options -fno-common
105 # Add ASan-related macros
106 cat >> /usr/lib/rpm/tizen_macros << EOF
107
108 %%asan_force_options %{asan_force_options}
109 %%gcc_unforce_options %%{lua: rpm.define("asan_unforced 1"); print("/usr/bin/gcc-unforce-options")}
110 %%gcc_force_options /usr/bin/gcc-force-options
111 %%gcc_force_default_options %%gcc_force_options %%asan_force_options -fno-common
112 %%restore_fcommon \\
113   %%gcc_unforce_options \\
114   %%gcc_force_options %%asan_force_options -fcommon
115 EOF
116
117 # Add ASan's blacklist macro to tizen_macros
118 cat %{_rpmconfigdir}/macros.asan >> %{_rpmconfigdir}/tizen_macros
119
120 # ASan needs a whole shadow address space
121 # Using ulimit can only set the value for current user so we need to set /etc/security/limits.conf directly.
122 [ -e /etc/security/limits.conf ] && \
123     sed '/End of file/i\abuild\tsoft\tas\t-1\nabuild\thard\tas\t-1' -i /etc/security/limits.conf
124
125 %preun -n asan-force-options
126 # Restore read-only mode
127 chmod a-w /usr/bin
128 chmod a-w %{libsubdir}
129 /usr/bin/gcc-unforce-options
130 # Restore limit configurations set for ASan
131 [ -e /etc/security/limits.conf ] && \
132     sed '/abuild/d' -i /etc/security/limits.conf
133
134 # Remove additional macros from config
135 sed -e '\|^\# /etc/rpm/macros.asan$|,\|^\# /etc/rpm/macros.asan ends here|d' -i /usr/lib/rpm/tizen_macros
136
137 %package -n libhwasan-stub
138 Summary:    HWASan stub library to enable cross build
139 Group:      System Environment
140 Requires:   rpm
141
142 %description -n libhwasan-stub
143 HWASan stub library for cross build
144
145 %package -n hwasan-force-options
146 Summary:    Scripts to enable automatic package sanitization
147 Group:      System Environment
148 Requires:   gcc rpm
149 Requires:   libhwasan
150
151 %description -n hwasan-force-options
152 Scripts for HWASan instrumentation
153
154 %post -n hwasan-force-options
155 # Change mode to allow all users to run gcc-force/unforce-options
156 chmod a+w /usr/bin
157 chmod a+w %{libsubdir}
158 /usr/bin/gcc-force-options %hwasan_force_options -fno-common
159 # Add ASan-related macros
160 cat >> /usr/lib/rpm/tizen_macros << EOF
161
162 %%hwasan_force_options %{hwasan_force_options}
163 %%gcc_unforce_options %%{lua: rpm.define("hwasan_unforced 1"); print("/usr/bin/gcc-unforce-options")}
164 %%gcc_force_options /usr/bin/gcc-force-options
165 %%gcc_force_default_options %%gcc_force_options %%hwasan_force_options -fno-common
166 %%restore_fcommon \\
167   %%gcc_unforce_options \\
168   %%gcc_force_options %%hwasan_force_options -fcommon
169 EOF
170
171 # HWASan needs a whole shadow address space
172 # Using ulimit can only set the value for current user so we need to set /etc/security/limits.conf directly.
173 [ -e /etc/security/limits.conf ] && \
174     sed '/End of file/i\abuild\tsoft\tas\t-1\nabuild\thard\tas\t-1' -i /etc/security/limits.conf
175
176 %preun -n hwasan-force-options
177 # Restore read-only mode
178 chmod a-w /usr/bin
179 chmod a-w %{libsubdir}
180 /usr/bin/gcc-unforce-options
181 # Restore limit configurations set for HWASan
182 [ -e /etc/security/limits.conf ] && \
183     sed '/abuild/d' -i /etc/security/limits.conf
184
185 %package -n ubsan-force-options
186 Summary:    Scripts to enable automatic package sanitization
187 Group:      System Environment
188 Requires:   gcc
189 Requires:   libubsan
190
191 %description -n ubsan-force-options
192 Scripts for UBSan instrumentation
193
194 %post -n ubsan-force-options
195 # Change mode to allow all users to run gcc-force/unforce-options
196 chmod a+w /usr/bin
197 chmod a+w %{libsubdir}
198 /usr/bin/gcc-force-options %ubsan_force_options
199 # Add UBSan-related macros
200 cat >> /usr/lib/rpm/tizen_macros << EOF
201
202 %%ubsan_force_options %{ubsan_force_options}
203 %%gcc_unforce_options %%{lua: rpm.define("ubsan_unforced 1"); print("/usr/bin/gcc-unforce-options")}
204 %%gcc_force_options /usr/bin/gcc-force-options
205 %%gcc_force_default_options %%gcc_force_options %%ubsan_force_options
206 EOF
207
208 %preun -n ubsan-force-options
209 # Restore read-only mode
210 chmod a-w /usr/bin
211 chmod a-w %{libsubdir}
212 /usr/bin/gcc-unforce-options
213 # Remove additional macros from config
214 sed -e '\|^\# /etc/rpm/macros.ubsan$|,\|^\# /etc/rpm/macros.ubsan ends here|d' -i /usr/lib/rpm/tizen_macros
215
216 %package -n ubsan-build-env
217 Summary:    UBSan build environment
218 Group:      System Environment
219 Requires:   gcc
220 Requires:   libubsan rpm
221
222 %description -n ubsan-build-env
223 UBSan build environment support files and scripts
224
225 %post -n ubsan-build-env
226 cat %{_rpmconfigdir}/macros.ubsan >> %{_rpmconfigdir}/tizen_macros
227
228 %package -n lsan-force-options
229 Summary:    Scripts to enable automatic package sanitization
230 Group:      System Environment
231 Requires:   gcc
232 Requires:   liblsan
233
234 %description -n lsan-force-options
235 Scripts for LSan instrumentation
236
237 %post -n lsan-force-options
238 # Change mode to allow all users to run gcc-force/unforce-options
239 chmod a+w /usr/bin
240 chmod a+w %{libsubdir}
241 /usr/bin/gcc-force-options %lsan_force_options
242 # Add LSan-related macros
243 cat >> /usr/lib/rpm/tizen_macros << EOF
244
245 %%lsan_force_options %{lsan_force_options}
246 %%gcc_unforce_options /usr/bin/gcc-unforce-options
247 %%gcc_force_options /usr/bin/gcc-force-options
248 %%gcc_force_default_options %%gcc_force_options %%lsan_force_options
249 EOF
250
251 %preun -n lsan-force-options
252 # Restore read-only mode
253 chmod a-w /usr/bin
254 chmod a-w %{libsubdir}
255 /usr/bin/gcc-unforce-options
256
257 %package -n gcov-force-options
258 Summary:    Scripts to enable automatic package coverage instrumentation
259 Group:      System Environment
260 Requires:   gcc
261
262 %description -n gcov-force-options
263 Scripts for gcov instrumentation
264
265 %post -n gcov-force-options
266 # Change mode to allow all users to run gcc-force/unforce-options
267 chmod a+w /usr/bin
268 chmod a+w %{libsubdir}
269 /usr/bin/gcc-force-options %gcov_force_options
270 # Add gcov-related macros
271 cat >> /usr/lib/rpm/tizen_macros << EOF
272
273 %%gcov_force_options %{gcov_force_options}
274 %%gcc_unforce_options /usr/bin/gcc-unforce-options
275 %%gcc_force_options /usr/bin/gcc-force-options
276 %%gcc_force_default_options %%gcc_force_options %%gcov_force_options
277 EOF
278
279 %preun -n gcov-force-options
280 # Restore read-only mode
281 chmod a-w /usr/bin
282 chmod a-w %{libsubdir}
283 /usr/bin/gcc-unforce-options
284
285 %package -n gcov-build-env
286 Summary:    Gcov build environment
287 Group:      System Environment
288 Requires:   gcc
289 Requires:   rpm
290
291 %description -n gcov-build-env
292 Gcov build environment support files and scripts
293
294 %post -n gcov-build-env
295 cat %{_rpmconfigdir}/macros.gcov >> %{_rpmconfigdir}/tizen_macros
296
297 %package -n tsan-force-options
298 Summary:    Scripts to enable automatic package sanitization
299 Group:      System Environment
300 Requires:   gcc
301 Requires:   libtsan
302
303 %description -n tsan-force-options
304 Scripts for TSan instrumentation
305
306 %post -n tsan-force-options
307 # Change mode to allow all users to run gcc-force/unforce-options
308 chmod a+w /usr/bin
309 chmod a+w %{libsubdir}
310 /usr/bin/gcc-force-options %tsan_force_options
311 # Add TSan-related macros
312 cat >> /usr/lib/rpm/tizen_macros << EOF
313
314 %%tsan_force_options %{tsan_force_options}
315 %%gcc_unforce_options /usr/bin/gcc-unforce-options
316 %%gcc_force_options /usr/bin/gcc-force-options
317 %%gcc_force_default_options %%gcc_force_options %%tsan_force_options
318 EOF
319
320 %preun -n tsan-force-options
321 # Restore read-only mode
322 chmod a-w /usr/bin
323 chmod a-w %{libsubdir}
324 /usr/bin/gcc-unforce-options
325
326 %package -n tsan-runtime-env
327 Summary:    TSan runtime environment
328 Group:      Development/Libraries
329 Requires:   libtsan
330 Requires(post): smack
331
332 %description -n tsan-runtime-env
333 TSan runtime environment
334
335 %post -n tsan-runtime-env
336 echo "%{tsan_runtime_options}" > /TSAN_OPTIONS
337 chsmack -a "_" /TSAN_OPTIONS
338
339 %package -n tsan-build-env
340 Summary:    TSan build environment
341 Group:      Development/Libraries
342 Requires:   libtsan
343
344 %description -n tsan-build-env
345 TSan build environment
346
347 %post -n tsan-build-env
348 echo "%{tsan_runtime_options}" > /TSAN_OPTIONS
349 %ifarch aarch64
350 echo ":run_under_qemu=1" >> /TSAN_OPTIONS
351 %endif
352 chsmack -a "_" /TSAN_OPTIONS
353
354 %package -n asan-build-env
355 Summary:    Asan build environment
356 Group:      Development/Libraries
357 Requires:   libasan
358
359 %description -n asan-build-env
360 Asan build environment
361
362 %post -n asan-build-env
363 # Add /usr/lib/libasan.so to /etc/ld.so.preload
364 [ -f /etc/ld.so.preload ] && mv -v /etc/ld.so.preload /etc/ld.so.preload.orig
365 echo "libasan.so" > /etc/ld.so.preload
366 echo "libcrypt.so.1" >> /etc/ld.so.preload
367 [ -f /etc/ld.so.preload.orig ] && cat /etc/ld.so.preload.orig >> /etc/ld.so.preload
368
369 %preun -n asan-build-env
370 # Restore /etc/ld.so.preload
371 [ -f /etc/ld.so.preload.orig ] && mv -v /etc/ld.so.preload.orig /etc/ld.so.preload
372
373 %package -n hwasan-build-env
374 Summary:    HWAsan build environment
375 Group:      Development/Libraries
376
377 %description -n hwasan-build-env
378 HWAsan build environment
379
380 %package -n lsan-runtime-env
381 Summary:    LSan runtime environment
382 Group:      Development/Libraries
383 Requires:   liblsan
384 Requires(post): smack
385
386 %description -n lsan-runtime-env
387 LSan runtime environment
388
389 %post -n lsan-runtime-env
390 # Add /usr/lib64/liblsan.so to /etc/ld.so.preload
391 [ -f /etc/ld.so.preload ] && mv -v /etc/ld.so.preload /etc/ld.so.preload.orig
392 echo "%{libdir}/liblsan.so" > /etc/ld.so.preload
393 [ -f /etc/ld.so.preload.orig ] && cat /etc/ld.so.preload.orig >> /etc/ld.so.preload
394 echo "%{lsan_runtime_options}" > /LSAN_OPTIONS
395 chsmack -a "_" /etc/ld.so.preload /LSAN_OPTIONS /lsan.supp
396
397 %preun -n lsan-runtime-env
398 # Restore /etc/ld.so.preload
399 [ -f /etc/ld.so.preload.orig ] && mv -v /etc/ld.so.preload.orig /etc/ld.so.preload
400
401 %package -n sanitizer-devel
402 Summary:    Sanitizer platform-independent tools
403 License:       MIT
404 Group:      Development/Tools
405 BuildArch:  noarch
406 Requires:   binutils python
407 Requires(post): smack
408
409 %description -n sanitizer-devel
410 The package contatins platform-independent tools for sanitization:
411 - asan_symbolize.py: script for offline symbolization of asan logs
412
413 %package -n asan-runtime-env
414 Summary:    Asan runtime environment for target device
415 Group:      Development/Libraries
416 Requires:   libasan
417
418 %description -n asan-runtime-env
419 Asan runtime environment
420
421 %package -n asansi-runtime-env
422 Summary:    ASanSI runtime for target device
423 Group:      Development/Libraries
424 Requires:   asan-runtime-env
425
426 %description -n asansi-runtime-env
427 Tool for switching interceptors state of libasan
428
429 %package -n hwasan-runtime-env
430 Summary:    HWAsan runtime environment for target device
431 Group:      Development/Libraries
432
433 %description -n hwasan-runtime-env
434 HWAsan runtime environment
435
436 %package -n ubsan-runtime-env
437 Summary:    UBSan runtime environment for target device
438 Group:      Development/Libraries
439 Requires:   libubsan
440
441 %description -n ubsan-runtime-env
442 UBSan runtime environment
443
444 %post -n ubsan-runtime-env
445 echo "%{ubsan_runtime_options}" > /UBSAN_OPTIONS
446
447 %package -n sanitizer-sources
448 Summary:    Sanitizer family tools sources
449 License:       MIT
450 Group:      Development/Tools
451 BuildArch:  noarch
452
453 %description -n sanitizer-sources
454 Sanitizer family tools sources for external tools.
455
456 %package -n gcc-warning-build-env
457 Summary:    GCC warning build environment
458 Group:      System Environment
459 BuildArch:  noarch
460 Requires:   gcc rpm
461
462 %description -n gcc-warning-build-env
463 GCC warning build environment support files and scripts
464
465 %post -n gcc-warning-build-env
466 cat %{_rpmconfigdir}/macros.gcc_warning >> %{_rpmconfigdir}/tizen_macros
467
468 %package -n gcc-log-wrapper
469 Summary:    GCC wrapper for logs saving
470 Group:      Development/Tools
471 BuildArch:  noarch
472 Requires:   gcc
473
474 %description -n gcc-log-wrapper
475 GCC wrapper for logs saving
476
477 %post -n gcc-log-wrapper
478 # Warning: below for SVACE tool - it can't capture the data if a wrapper is symlink
479 PATHCC1=$(gcc -v 2>&1|grep COLLECT_LTO_WRAPPER|sed 's/COLLECT_LTO_WRAPPER=//') ; \
480 PATHCC1=$(dirname $PATHCC1) ; \
481 if [ ! -f $PATHCC1/cc1.orig ] ; then \
482   mv $PATHCC1/cc1{,.orig} ; \
483 else \
484   rm $PATHCC1/cc1 ; \
485 fi ; \
486 if [ ! -f $PATHCC1/cc1plus.orig ] ; then \
487   mv $PATHCC1/cc1plus{,.orig} ; \
488 else \
489   rm $PATHCC1/cc1plus ; \
490 fi ; \
491 ln /usr/lib/gcc-log-wrapper/cc1 $PATHCC1/cc1 ; \
492 ln /usr/lib/gcc-log-wrapper/cc1 $PATHCC1/cc1plus
493
494 %preun -n gcc-log-wrapper
495 PATHCC1=$(gcc -v 2>&1|grep COLLECT_LTO_WRAPPER|sed 's/COLLECT_LTO_WRAPPER=//') ; \
496 PATHCC1=$(dirname $PATHCC1) ; \
497 if [ -f $PATHCC1/cc1.orig ] ; then \
498   rm -f $PATHCC1/cc1 ; \
499   mv $PATHCC1/cc1{.orig,} ; \
500 fi ; \
501 if [ -f $PATHCC1/cc1plus.orig ] ; then \
502   rm -f $PATHCC1/cc1plus ; \
503   mv $PATHCC1/cc1plus{.orig,} ; \
504 fi
505
506
507 %prep
508
509 %ifarch x86_64
510 cp %{SOURCE29} .
511 %endif
512
513 %build
514 # Generate runtime options for sanitizers
515 echo "%{asan_runtime_options}"   | tee ASAN_OPTIONS
516 echo "%{hwasan_runtime_options}" | tee HWASAN_OPTIONS
517 echo "%{lsan_runtime_options}"  | tee LSAN_OPTIONS
518 echo "%{tsan_runtime_options}"  | tee TSAN_OPTIONS
519 echo "%{ubsan_runtime_options}" | tee UBSAN_OPTIONS
520
521 echo "libasan.so" | tee asan-runtime-ld.so.preload
522 echo "libcrypt.so.1" | tee -a asan-runtime-ld.so.preload
523
524 %ifarch x86_64
525 gcc -shared -o libhwasan.so -fPIC hwasan_stub.c
526 %endif
527
528 %install
529 mkdir -p %buildroot%_prefix
530 mkdir -p %buildroot%_prefix/bin
531 mkdir -p %{buildroot}/etc/
532 sed -e 's|GCC_LIBSUBDIR|%{libsubdir}|' -i %{SOURCE15}
533
534 install -m 0755 %{SOURCE15} %{buildroot}%{_prefix}/bin/
535 install -m 0755 %{SOURCE16} %{buildroot}%{_prefix}/bin/
536 install -m 0755 %{SOURCE17} %{buildroot}%{_prefix}/bin/
537
538 install -m 0644 ASAN_OPTIONS %{buildroot}
539 install -m 0644 asan-runtime-ld.so.preload %{buildroot}/etc/ld.so.preload
540
541 %ifarch x86_64
542 mkdir -p %{buildroot}/%{_libdir}
543 install -m 755 libhwasan.so %{buildroot}/%{_libdir}
544 %endif
545
546 %ifarch %hwasan_arch
547 install -m 0644 HWASAN_OPTIONS %{buildroot}
548 %endif
549
550 %ifarch %lsan_arch
551 install -m 0644 LSAN_OPTIONS %{buildroot}
552 install -m 0644 %{SOURCE21} %{buildroot}
553 %endif
554
555 %ifarch %tsan_arch
556 install -m 0644 TSAN_OPTIONS %{buildroot}
557 %endif
558
559 mkdir -p %{buildroot}/%{_rpmconfigdir}/tizen/
560 install -m 0644 UBSAN_OPTIONS %{buildroot}/
561 install -m 0644 %{SOURCE19} %{buildroot}/%{_rpmconfigdir}/
562 install -m 0644 %{SOURCE22} %{buildroot}/%{_rpmconfigdir}/
563 install -m 0755 %{SOURCE20} %{buildroot}/%{_rpmconfigdir}/tizen/
564
565 mkdir -p %{buildroot}/usr/lib/gcc-log-wrapper
566 install -m 0755 %{SOURCE23} %{buildroot}/usr/lib/gcc-log-wrapper/
567 install -m 0644 %{SOURCE24} %{buildroot}/%{_rpmconfigdir}/
568 install -m 0755 %{SOURCE25} %{buildroot}/%{_rpmconfigdir}/tizen/
569 install -m 0644 %{SOURCE26} %{buildroot}/%{_rpmconfigdir}/
570 install -m 0755 %{SOURCE27} %{buildroot}/%{_rpmconfigdir}/tizen/
571
572 mkdir -p %{buildroot}%{_prefix}/sbin
573 install -m 0755 %{SOURCE28} %{buildroot}%{_prefix}/sbin/
574
575 %files
576 #%manifest gcc-contrib.manifest
577
578 %files -n asan-force-options
579 %defattr(-,root,root,-)
580 %{_prefix}/bin/gcc-force-options
581 %{_prefix}/bin/gcc-unforce-options
582 %{_rpmconfigdir}/macros.asan
583
584 %ifarch %hwasan_arch
585 %files -n hwasan-force-options
586 %defattr(-,root,root,-)
587 %{_prefix}/bin/gcc-force-options
588 %{_prefix}/bin/gcc-unforce-options
589 %endif
590
591 %files -n ubsan-force-options
592 %defattr(-,root,root,-)
593 %{_prefix}/bin/gcc-force-options
594 %{_prefix}/bin/gcc-unforce-options
595
596 %files -n gcov-force-options
597 %defattr(-,root,root,-)
598 %{_prefix}/bin/gcc-force-options
599 %{_prefix}/bin/gcc-unforce-options
600
601 %ifarch %lsan_arch
602 %files -n lsan-force-options
603 #%manifest gcc-contrib.manifest
604 %defattr(-,root,root,-)
605 %{_prefix}/bin/gcc-force-options
606 %{_prefix}/bin/gcc-unforce-options
607 %endif
608
609 %ifarch %tsan_arch
610 %files -n tsan-force-options
611 %defattr(-,root,root,-)
612 %{_prefix}/bin/gcc-force-options
613 %{_prefix}/bin/gcc-unforce-options
614 %endif
615
616 %files -n asan-build-env
617 %defattr(-,root,root,-)
618 /ASAN_OPTIONS
619
620 %files -n asan-runtime-env
621 %defattr(-,root,root,-)
622 /ASAN_OPTIONS
623 /etc/ld.so.preload
624
625 %files -n asansi-runtime-env
626 %defattr(-,root,root,-)
627 %{_prefix}/sbin/asansictl
628
629 %ifarch %hwasan_arch
630 %files -n hwasan-build-env
631 %defattr(-,root,root,-)
632 /HWASAN_OPTIONS
633
634 %files -n hwasan-runtime-env
635 %defattr(-,root,root,-)
636 /HWASAN_OPTIONS
637 %endif
638
639 %ifarch x86_64
640 %files -n libhwasan-stub
641 %defattr(-,root,root,-)
642 %{libdir}/libhwasan.so
643 %endif
644
645 %ifarch %lsan_arch
646 %files -n lsan-runtime-env
647 %defattr(-,root,root,-)
648 /LSAN_OPTIONS
649 /lsan.supp
650 %endif
651
652 %ifarch %tsan_arch
653 %files -n tsan-runtime-env
654 %defattr(-,root,root,-)
655 /TSAN_OPTIONS
656
657 %files -n tsan-build-env
658 %defattr(-,root,root,-)
659 /TSAN_OPTIONS
660 %endif
661
662 %files -n gcov-build-env
663 %defattr(-,root,root,-)
664 %{_rpmconfigdir}/macros.gcov
665 %{_rpmconfigdir}/tizen/extract-gcov-info
666
667 %ifarch %ubsan_arch
668 %files -n ubsan-build-env
669 %defattr(-,root,root,-)
670 /UBSAN_OPTIONS
671 %{_rpmconfigdir}/macros.ubsan
672 %{_rpmconfigdir}/tizen/extract-ubsan-logs
673
674 %files -n ubsan-runtime-env
675 %defattr(-,root,root,-)
676 %endif
677
678 %files -n sanitizer-devel
679 %defattr(-,root,root,-)
680 %{_prefix}/bin/asan_symbolize.py
681
682 %files -n gcc-warning-build-env
683 %defattr(-,root,root,-)
684 %{_rpmconfigdir}/macros.gcc_warning
685 %{_rpmconfigdir}/tizen/extract-gcc-warning-logs
686
687 %files -n gcc-log-wrapper
688 %defattr(-,root,root,-)
689 /usr/lib/gcc-log-wrapper/cc1
690
691 %changelog