platform/upstream/gcc.git
2 months agoMerge "[gcc] Fix the CFLAGS/CXXFLAGS cleanup" into tizen_base_dev accepted/tizen_base_toolchain accepted/tizen_base_x accepted/tizen_base_x_asan tizen_base_dev accepted/tizen/base/toolchain/20240301.141848 accepted/tizen/base/toolchain/20240301.141952 accepted/tizen/base/x/20240304.072630 accepted/tizen/base/x/asan/20240412.003338
Dongkyun Son [Mon, 19 Feb 2024 04:19:14 +0000 (04:19 +0000)]
Merge "[gcc] Fix the CFLAGS/CXXFLAGS cleanup" into tizen_base_dev

3 months ago[gcc] Fix the CFLAGS/CXXFLAGS cleanup 23/305523/1
Slava Barinov [Fri, 2 Feb 2024 15:46:53 +0000 (18:46 +0300)]
[gcc] Fix the CFLAGS/CXXFLAGS cleanup

Currently the sed command line is wrong for sed in configure script and
therefore composition of -Os with -Wl,-O1 results into wrong command line.

Change-Id: I0a0e8e908956e0435f3f404373aec9e6648eb2f7
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
3 months agoRISC-V: __builtin_riscv_pause for all environment 06/305306/4 sandbox/dkson95/riscv accepted/tizen/base/toolchain/20240202.060642 accepted/tizen/base/x/20240214.091441
Tsukasa OI [Mon, 28 Aug 2023 21:04:13 +0000 (15:04 -0600)]
RISC-V: __builtin_riscv_pause for all environment

The "pause" RISC-V hint instruction requires the 'Zihintpause' extension (in
the assembler).  However, GCC emits "pause" unconditionally, making an
assembler error while compiling code with __builtin_riscv_pause while the
'Zihintpause' extension disabled.

However, the "pause" instruction code (0x0100000f) is a HINT and emitting its
instruction code is safe in any environment.

This commit implements handling for the 'Zihintpause' extension and emits
".insn 0x0100000f" instead of "pause" only if the extension is disabled (making
the diagnostics better).

gcc/ChangeLog:

* common/config/riscv/riscv-common.cc (riscv_ext_version_table):
Implement the 'Zihintpause' extension, version 2.0.
(riscv_ext_flag_table) Add 'Zihintpause' handling.
* config/riscv/riscv-builtins.cc: Remove availability predicate
"always" and add "hint_pause".
(riscv_builtins) : Add "pause" extension.
* config/riscv/riscv-opts.h (MASK_ZIHINTPAUSE, TARGET_ZIHINTPAUSE): New.
* config/riscv/riscv.md (riscv_pause): Adjust output based on
TARGET_ZIHINTPAUSE.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/builtin_pause.c: Removed.
* gcc.target/riscv/zihintpause-1.c: New test when the 'Zihintpause'
extension is enabled.
* gcc.target/riscv/zihintpause-2.c: Likewise.
* gcc.target/riscv/zihintpause-noarch.c: New test when the 'Zihintpause'
extension is disabled.

(cherry picked from commit c2d04dd659c499d8df19f68d0602ad4c7d7065c2)

Change-Id: I48148dee6a0d23796ce670ce21183011698b91e6

3 months agoRISC-V: Recognized zihintntl extensions 05/305305/4
Monk Chiang [Thu, 13 Jul 2023 05:38:55 +0000 (13:38 +0800)]
RISC-V: Recognized zihintntl extensions

gcc/ChangeLog:

* common/config/riscv/riscv-common.cc:
(riscv_implied_info): Add zihintntl item.
(riscv_ext_version_table): Ditto.
(riscv_ext_flag_table): Ditto.
* config/riscv/riscv-opts.h (MASK_ZIHINTNTL): New macro.
(TARGET_ZIHINTNTL): Ditto.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/arch-22.c: New test.
* gcc.target/riscv/predef-28.c: New test.

(cherry-picked from commit ad0518d97cfc857183e524fabc104ebeec9e8ccd)

Change-Id: Ibbce0e2b9ab9138fb218de9573b7173816e46f50

3 months agoRISCV: Inline subword atomic ops 46/305346/2
Patrick O'Neill [Tue, 18 Apr 2023 21:33:13 +0000 (14:33 -0700)]
RISCV: Inline subword atomic ops

RISC-V has no support for subword atomic operations; code currently
generates libatomic library calls.

This patch changes the default behavior to inline subword atomic calls
(using the same logic as the existing library call).
Behavior can be specified using the -minline-atomics and
-mno-inline-atomics command line flags.

gcc/libgcc/config/riscv/atomic.c has the same logic implemented in asm.
This will need to stay for backwards compatibility and the
-mno-inline-atomics flag.

2023-04-18 Patrick O'Neill <patrick@rivosinc.com>

gcc/ChangeLog:
PR target/104338
* config/riscv/riscv-protos.h: Add helper function stubs.
* config/riscv/riscv.cc: Add helper functions for subword masking.
* config/riscv/riscv.opt: Add command-line flag.
* config/riscv/sync.md: Add masking logic and inline asm for fetch_and_op,
fetch_and_nand, CAS, and exchange ops.
* doc/invoke.texi: Add blurb regarding command-line flag.

libgcc/ChangeLog:
PR target/104338
* config/riscv/atomic.c: Add reference to duplicate logic.

gcc/testsuite/ChangeLog:
PR target/104338
* gcc.target/riscv/inline-atomics-1.c: New test.
* gcc.target/riscv/inline-atomics-2.c: New test.
* gcc.target/riscv/inline-atomics-3.c: New test.
* gcc.target/riscv/inline-atomics-4.c: New test.
* gcc.target/riscv/inline-atomics-5.c: New test.
* gcc.target/riscv/inline-atomics-6.c: New test.
* gcc.target/riscv/inline-atomics-7.c: New test.
* gcc.target/riscv/inline-atomics-8.c: New test.

(cherry-picked from commit f797260adaf52bee0ec0e16190bbefbe1bfc3692)

Change-Id: I13eccd20805b8308ba19134a13063eef3762f589
Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
5 months agopackaging: Enable LSan for ix86 17/301517/1 accepted/tizen_base_riscv accepted/tizen/base/riscv/20240111.090215 accepted/tizen/base/riscv/20240116.090010
Dongkyun Son [Fri, 17 Nov 2023 07:50:04 +0000 (16:50 +0900)]
packaging: Enable LSan for ix86

https://github.sec.samsung.net/RS-TizenStudio/tizen-gnu-toolchain-upgrade/issues/46

Change-Id: I43c3919dd7e297cc62c632be5176d26b2181a821
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
5 months agoMerge branch 'tizen_base_dev_features' into HEAD 70/301270/1
Dongkyun Son [Mon, 13 Nov 2023 07:22:39 +0000 (16:22 +0900)]
Merge branch 'tizen_base_dev_features' into HEAD

Change-Id: I7ac556f6cd7a0078310422e1b0d03abcfdd3419d
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
5 months agopackaging: Enable LSan for %arm tizen_base_dev_features
Slava Barinov [Fri, 10 Nov 2023 15:37:45 +0000 (18:37 +0300)]
packaging: Enable LSan for %arm

Change-Id: I7427bea84bf7593ac72c27d24148ad6296616fad
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
5 months ago[ASan] Add __libc_siglongjmp/__libc_longjmp interceptors
Mikhail Kashkarov [Thu, 27 Dec 2018 09:42:37 +0000 (12:42 +0300)]
[ASan] Add __libc_siglongjmp/__libc_longjmp interceptors

Change-Id: Ic247cb33f17743fa597b3a74baf7cf31c075165d

5 months ago[LSan] Add dynamic loading support for LSan library
Vyacheslav Cherkashin [Wed, 31 Oct 2018 14:52:22 +0000 (17:52 +0300)]
[LSan] Add dynamic loading support for LSan library

The LSan library has very big static TLS section

Problem:
  - LSan library could not be loaded dynamically because it had a very
    big static TLS section.
        AllocatorCache: ~15KB for 32bit
                        ~53KB for 64bit
Solution:
  - Store in the TLS section only a pointer to the AllocatorCache and
    dynamically allocate memory for it.

Change-Id: I6e90e6682e277c90825938f5732867b6564d62b4
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
5 months ago[THUMB2] Frame pointer for arm with THUMB2 mode.
Denis Khalikov [Thu, 30 Aug 2018 15:57:41 +0000 (18:57 +0300)]
[THUMB2] Frame pointer for arm with THUMB2 mode.

Set frame pointer to the predictable location in the stack frame
for arm with THUMB2 mode.

Denis Khalikov  <d.khalikov@partner.samsung.com>

  * config/arm/arm.c (arm_emit_multi_reg_pop_no_return): New function.
  (arm_compute_initial_elimination_offset): Add support for
  TARGET_THUMB_STACK_UNWIND.
  (arm_expand_prologue): Emit function prologue related to
  TARGET_THUMB_STACK_UNWIND.
  (thumb2_expand_return): Emit function epilogue related to
  TARGET_THUMB_STACK_UNWIND.
  (arm_expand_epilogue): Emit function epilogue related to
  TARGET_THUMB_STACK_UNWIND.
  * config/arm/arm.h (TARGET_THUMB_STACK_UNWIND): New define.
  (INITIAL_ELIMINATION_OFFSET): Add support for
  TARGET_THUMB_STACK_UNWIND.
  * config/arm/arm.opt: Add compile-time option THUMB_FP.
  * gcc/testsuite/c-c++-common/asan/fast-unwind-thumb.c: New tests.

Change-Id: I45a68a1216f3115c5199e5cea14c344fabe11fc1

7 months ago[ASan] Add FORTIFY_SOURCE interceptors
Denis Khalikov [Wed, 29 Nov 2017 11:21:07 +0000 (14:21 +0300)]
[ASan] Add FORTIFY_SOURCE interceptors

List of interceptors:
__strcat_chk,
__strncat_chk,
__strcpy_chk,
__strncpy_chk.
__poll_chk,
__ppoll_chk,
__read_chk,
__recv_chk,
__recvfrom_chk,
__pread_chk,
__pread64_chk.
__getgroups_chk,
__getcwd_chk,
__realpath_chk,
__confstr_chk.
__mbstowcs_chk,
__mbsrtowcs_chk,
__mbsnrtowcs_chk,
__wcstombs_chk,
__wcsrtombs_chk,
__wcsnrtombs_chk,
__wcrtomb_chk,
__ttyname_r_chk.

Change-Id: I16ef4d2d80089b96e5c51ea5160b706b35f9ce18

7 months ago[ASan] Add teests of interceptor for printf_chk
Denis Khalikov [Tue, 19 Dec 2017 09:47:55 +0000 (12:47 +0300)]
[ASan] Add teests of interceptor for printf_chk

Differential Revision: https://reviews.llvm.org/D40951

Change-Id: I7c32945659da4cf80e995370cb26fb063bb7930c

7 months ago[TTC-8][Sanitizers] Add tests for allocator_may_return_null=1 flag
Slava Barinov [Wed, 13 Sep 2017 15:13:49 +0000 (18:13 +0300)]
[TTC-8][Sanitizers] Add tests for allocator_may_return_null=1 flag

The LLVM test has been rewritten to be able to run inside GCC test suite.

Change-Id: Ifaf9e3681ddacfaad73a314a01ab3c6c7704d40b
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
7 months ago[TTC-9] Make LSan compliant with recovery mode when running on top of ASan
Slava Barinov [Thu, 14 Sep 2017 09:42:17 +0000 (12:42 +0300)]
[TTC-9] Make LSan compliant with recovery mode when running on top of ASan

Don't overwrite exit code in LSan when running on top of ASan in recovery mode
to avoid breakage of users code due to found leaks.

Change-Id: I172f59734837d3df350c9e586ace2547ae9f3f23
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
7 months agoAdd ChangeLog.Tizen
Sangmin Seo [Wed, 9 Aug 2017 05:18:33 +0000 (14:18 +0900)]
Add ChangeLog.Tizen

ChangeLog.Tizen is to keep track of private patches for Tizen GCC.

Change-Id: I2fbde58d410ab4a7ddbda361be86a48de9d891e3

7 months agoFix cleanup location for try_finally_expr.
Slava Barinov [Thu, 6 Jul 2017 13:14:58 +0000 (16:14 +0300)]
Fix cleanup location for try_finally_expr.

        gcc/
        * tree.def: Add STATEMENT_LIST_END tree code.
        * tree.c: Add STATEMENT_LIST_END handling as TS_COMMON.
        * gimplify.c (gimplify_expr): Use STATEMENT_LIST_END location to
        provide right information for try_finally_expr.
        * tree-eh.c (lower_try_finally_onedest): Set finally location
        * c-family/c-semantics.c (pop_stmt_list): Support single-statement
        lists extraction with STATEMENT_LIST_END in the end.
        * fold-const.c (operand_equal_p): Add STATEMENT_LIST_END support.
        gcc/cp/
        * parser.c (cp_parser_compound_statement): Use STATEMENT_LIST_END
        to keep the location of closing brace.
        * pt.c: Handle STATEMENT_LIST_END.
        * constraint.cc (check_function_concept): Handle concept definitions
        with STATEMENT_LIST_END.
        * error.c (dump_expr): Add STATEMENT_LIST_END support.
        gcc/testsuite/
        * g++.dg/ext/statement-list-end.C: New.

Change-Id: Id22e953b97b52d0f2a2ba44065337a59639578db
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
7 months ago[UBSAN] Fix systemd initialization with UBSan.
Denis Khalikov [Tue, 8 Aug 2017 13:35:33 +0000 (16:35 +0300)]
[UBSAN] Fix systemd initialization with UBSan.

In case systemd was build with UBSan we should
ensure that /proc is mounted, to prevent booting
error.

Change-Id: I52016a5e440f311c85f6fe2cad1dfd7966976651
Signed-off-by: Denis Khalikov <d.khalikov@partner.samsung.com>
7 months agoSwitch on detect_leaks on 64-bit platforms by default
Slava Barinov [Fri, 14 Jul 2017 08:25:35 +0000 (11:25 +0300)]
Switch on detect_leaks on 64-bit platforms by default

       libsanitizer/
       * asan/asan_flags.cc: Switch on leak detection for 64-bit target.
       * lsan/lsan.cc: Likewise.
       * sanitizer_common/sanitizer_flags.inc: Likewise.

Neither the OBS build nor sanitized firmware build are affected.

When Tizen application developer enables ASan for his own package only and run
it in 64-bit emulator (without any additional setup) ASan will report leaks
additionally to all other error messages.

Change-Id: Id16017e9bbe5221778330287c707bdf1846f0760
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
7 months ago[sanitizer-coverage] Add stub for trace-pc instrumentation
Dmitriy Nikiforov [Thu, 11 May 2017 14:21:34 +0000 (17:21 +0300)]
[sanitizer-coverage] Add stub for trace-pc instrumentation

libsanitizer/
* sanitizer_common/sanitizer_coverage_libcdep_new.cc
(__sanitizer_cov_trace_pc): New function.

Change-Id: I1ead302ccb56c8f20d1a6e29a7cdef8963fa4090
Signed-off-by: Dmitriy Nikiforov <d.nikiforov@partner.samsung.com>
7 months agoMove SanitizerToolName definition before MaybeMountProcFS.
Maxim Ostapenko [Tue, 8 Nov 2016 10:45:49 +0000 (13:45 +0300)]
Move SanitizerToolName definition before MaybeMountProcFS.

The MaybeMountProcFS uses SanitizerToolName in its failure messages so we
need it defined at this point.

Change-Id: I6a568e1ebf3d646ecfbdb53fd8e48910e9b66559
Signed-off-by: Maxim Ostapenko <m.ostapenko@samsung.com>
7 months agoSupport asan runtime without /ASAN_OPTIONS file
Mikhail Kashkarov [Fri, 22 Nov 2019 17:47:14 +0000 (20:47 +0300)]
Support asan runtime without /ASAN_OPTIONS file

Allow nice host builds with Tizen libasan.

7 months agoMake lsan-force-options and lsan-build-env more usable. Factor out common code from...
Ivan Baravy [Mon, 27 Feb 2017 08:07:23 +0000 (11:07 +0300)]
Make lsan-force-options and lsan-build-env more usable. Factor out common code from {A, UB}San to sanitizer_common code.

Add -fno-omit-frame-pointer -U_FORTIFY_SOURCE to lsan-force-options because
LSan heavily relies on frame pointers. Disable LSan in QEMU builds through
LSAN_OPTIONS file. Refactor Tizen specific patches in ASan and UBSan.

Change-Id: I5365daee191dd1f61229757b8f47d102390d59a0

7 months agoFix ASan tests.
Maxim Ostapenko [Thu, 4 Aug 2016 08:27:22 +0000 (11:27 +0300)]
Fix ASan tests.

Some ASan tests fail due to:
1) Unable to unwind malloc trace.
2) Return invalid code due to hant_on_error=false enabled by default.

Let's fix this.

Change-Id: I634c5bff0e21a693a4168eaa12f443cee114a83e
Signed-off-by: Maxim Ostapenko <m.ostapenko@samsung.com>
7 months agoSet detect_leaks = false and halt_on_error = false by default.
Ivan Baravy [Mon, 27 Feb 2017 08:00:20 +0000 (11:00 +0300)]
Set detect_leaks = false and halt_on_error = false by default.

Set detect_leaks and halt_on_error to false by default because mic
installs asan-build-env package too late.

Change-Id: I497f1f8e6a1e9425e40c8087ea50b14d176a04ce

7 months agoRemove redundant calls of MaybeMountProcFS and refactor it.
Maxim Ostapenko [Wed, 6 Jul 2016 10:04:28 +0000 (13:04 +0300)]
Remove redundant calls of MaybeMountProcFS and refactor it.

It seems that we have lots of redundant MaybeMountProcFS, in particular
each mapped sanitized shared library calls it from AsanInitializer constructor.
Remove redudant MaybeMountProcFS calls from AsanInitializer and __asan_init.

Also, it seems that under qemu-aarch64 opening /proc/self/maps for reading
might be very expensive, so replace OpenFile("/proc/self/maps", RdOnly) with
FileExists("/proc/self/maps") in MaybeMountProcFS to avoid expensive calls.

Change-Id: I8ba28dbbc102be519fa2b284520509f601ec5cf7
Signed-off-by: Maxim Ostapenko <m.ostapenko@samsung.com>
7 months agoAdd git-merge-changelog support
Mikhail Kashkarov [Wed, 20 Nov 2019 11:38:03 +0000 (14:38 +0300)]
Add git-merge-changelog support

Change-Id: I84fc05f8672a17ee7c862595d9c25c86c9f18f27

7 months agoFix c-c++-common/asan/pr64820.c testcase to pass output pattern tests under
Ivan Baravy [Mon, 27 Feb 2017 07:42:49 +0000 (10:42 +0300)]
Fix c-c++-common/asan/pr64820.c testcase to pass output pattern tests under
qemu-aarch64. Adjust halt_on_error tests.

gcc/testsuite/

    * c-c++-common/asan/pr64820.c: Adjust output patterns.
    * c-c++-common/asan/halt_on_error-1.c: Adjust.
    * c-c++-common/asan/halt_on_error-1.c: Likewise.

7 months agoMove lsan_check_in_progress definition to lsan_common.cc.
Maxim Ostapenko [Mon, 26 Dec 2016 08:44:46 +0000 (11:44 +0300)]
Move lsan_check_in_progress definition to lsan_common.cc.

This commit fixes undefined reference error from libasan.so:

/lib/libasan.so: undefined reference to `lsan_check_in_progress'

occurred due to ASan runtime embeds part of LSan runtime and
misses lsan_check_in_progress symbol. To overcome the issue, just move
lsan_check_in_progress definition to lsan_common.cc.

Change-Id: I9ed7f4d490d525bbf7ce054285afaec24716f35a
Signed-off-by: Maxim Ostapenko <m.ostapenko@samsung.com>
7 months agoAdd mmap/munmap interceptors.
Maxim Ostapenko [Wed, 5 Oct 2016 14:04:08 +0000 (17:04 +0300)]
Add mmap/munmap interceptors.

Some allocators may use mmap for their local pools that may cause false positive
reports because LSan currently doesn't intercept mmap call mainly due to its
complexity (we don't know whether a particular mmap would contain live pointers).
However for some cases (e.g. anonymous rw mmaps) we can guess that they would
contain live pointers thus we can add them into root regions. Thus, now we
intercept mmap/munmap calls, add anonymous rw mappings into root regions and
call real mmap.

Change-Id: Ie0bde91497a31ab670f15d67b34d328969dc0981
Signed-off-by: Maxim Ostapenko <m.ostapenko@samsung.com>
7 months agoMake {A, L}San allocator more compact.
Maxim Ostapenko [Thu, 17 Nov 2016 12:58:25 +0000 (15:58 +0300)]
Make {A, L}San allocator more compact.

This change tries to reduce memory consumption of {A, L}Saned image by hacking
primary allocator internals:

* Reduce region size 2^20 -> 2^17.
* Make largest chunk size in primary allocator 2^17 -> 2^16.

The change appears to be quite useful for LSan'ed image:

Stock version:
           total      used      free     shared    buffers     cached
Mem:        964        828       136        3         4         92

Patched version:
           total      used      free     shared    buffers     cached
Mem:        964        688       275        5         13        185

Change-Id: I80b95f7dfb5a7be0e7208567a31606a3d027256c
Signed-off-by: Maxim Ostapenko <m.ostapenko@samsung.com>
7 months agoSet 0777 mode to sanitizer tool report
Slava Barinov [Tue, 15 Nov 2016 12:51:42 +0000 (15:51 +0300)]
Set 0777 mode to sanitizer tool report

There are processes which are executed with root permissions and then
change the user during run on target.

Without setting up the file mode to 0777 trying to write log causes
write error and process exits.

Change-Id: I88c6738625d67f4db2efea76cc8928d4f58b6e7c
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
7 months agoSupport print_cmdline in LSan.
Maxim Ostapenko [Mon, 7 Nov 2016 17:16:48 +0000 (20:16 +0300)]
Support print_cmdline in LSan.

Change-Id: I65d37582e6b5c3d54f8628e96edbaf4cbfc7c337
Signed-off-by: Maxim Ostapenko <m.ostapenko@samsung.com>
Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
7 months agoSwitch off UBSan for sha1 to reduce number of log messages
Slava Barinov [Wed, 24 Aug 2016 12:30:20 +0000 (15:30 +0300)]
Switch off UBSan for sha1 to reduce number of log messages

The sha1 contains intentional unaligned access

Change-Id: I5bb6d0c9bf274e8ed0fe4c87c341dee054623202
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
7 months agoForce halt_on_error=true in ASan tests
Slava Barinov [Tue, 8 Nov 2016 08:32:09 +0000 (11:32 +0300)]
Force halt_on_error=true in ASan tests

Since our ASan does not fail application on error by default we should
switch this behaviour on explicitly to keep testsuite work.

Change-Id: I4344f82427bc62a40604a75f5f09f62333b6782d
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
7 months ago* gcc.dg/ubsan/static-init-null.c: New testcase
Ivan Baravy [Tue, 21 Feb 2017 18:26:42 +0000 (21:26 +0300)]
* gcc.dg/ubsan/static-init-null.c: New testcase

7 months agoSet 0644 mode to sanitizer tool report
Slava Barinov [Wed, 31 Aug 2016 14:41:46 +0000 (17:41 +0300)]
Set 0644 mode to sanitizer tool report

Without setting up the file mode explicitly its impossible to read the
logs by users in OBS.

Change-Id: Icaa540b434fc6266cbd0b1ad3391e21b8cbb692f
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
7 months agoAdd binary name printing support to UBSan
Slava Barinov [Tue, 30 Aug 2016 09:09:23 +0000 (12:09 +0300)]
Add binary name printing support to UBSan

The binary name is needed for reporting with log_path since PID is not
always enough to identify the process right.

Change-Id: Ibefe22bac9f4d2a89eaacb40e6d7dc860b08d5f9
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
7 months agoDeliver LSan fixes for Tizen.
Maxim Ostapenko [Mon, 19 Sep 2016 14:38:07 +0000 (17:38 +0300)]
Deliver LSan fixes for Tizen.

    * Read LSAN_OPTIONS from /LSAN_OPTIONS file.
    * Add MaybeMountProcFS stuff for LSan. This would allow us to preload
    liblsan.so even for systemd when /proc/ isn't mounted yet.
    * Add ARM and x86 ports for LSan.
    * Add PointsIntoChunk method to protect against segfault when pointer
    points to metadata.
    * Make cf.exitcode = 0 by default.

commit a6549ffda72b4f84bbd2c763640181eaeccf6582

Change-Id: I20b10bd29f4ed25e78a61b70dfb82b12c1be352e

7 months agoBackport Tizen specific stuff from VDLinux 6.
Ivan Baravy [Mon, 27 Feb 2017 07:27:43 +0000 (10:27 +0300)]
Backport Tizen specific stuff from VDLinux 6.

Backport from VDLinux 5. Optionally mount /proc in __asan_init to allow
systemd sanitization.

    2014-10-21  Yury Gribov <y.gribov@samsung.com>

    JIRA: MAVDT-64

    * libsanitizer/asan/asan_rtl.cc (MaybeMountProcFS): New function.
    (__asan_init): Call MaybeMountProcFS.

Mount /proc not only in AsanInitInternal, but also in __asan_init and AsanInitializer to
ensure we have proc mounted when needed.

    * libsanitizer/asan/asan_rtl.cc (__asan_init): Call MaybeMountProcFS.
    * (AsanInitializer): Likewise.

Set address space unlimited if it is not.

    * libsanitizer/asan/asan_rtl.cc (MaybeDisableUlimit): New function.
    (AsanInitInternal): Call it.

Read ASan and UBSan options from predefined file if it is available.

    * libsanitizer/asan/asan_flags.cc: Read ASAN_OPTIONS from predefined
    file if available.
    * libsanitizer/ubsan/ubsan_flags.cc: Likewise.

Change-Id: Ibfa7a3bb032f757e28cf7baac19882a8e4367cae

9 months agoAdd .gbs.conf to align upstream branch with tag submit/tizen_base_dev/20230731.024114
Dongkyun Son [Fri, 30 Jun 2023 05:32:03 +0000 (14:32 +0900)]
Add .gbs.conf to align upstream branch with tag

Change-Id: Icf28ce7c590f459e6e7a851d9de0ac5b997cce34
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
9 months agoriscv64: add /lib64 and /usr/lib64 to libdir for gcc driver
Slava Barinov [Thu, 1 Jun 2023 21:30:57 +0000 (00:30 +0300)]
riscv64: add /lib64 and /usr/lib64 to libdir for gcc driver

At least until a decision on system-wide %_libdir for RISC-V 64 is made

Change-Id: I509acf5263a3f06afd4395b4d72b931789e44454
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
9 months agopackaging: Add riscv64 platform
Slava Barinov [Thu, 1 Jun 2023 09:27:01 +0000 (12:27 +0300)]
packaging: Add riscv64 platform

Change-Id: I377f05d4a027040f22b9c22d361efd9865584132
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
9 months agoRevert "Do not build libgfortran unless requested explicitly"
Dongkyun Son [Thu, 22 Jun 2023 05:13:14 +0000 (14:13 +0900)]
Revert "Do not build libgfortran unless requested explicitly"

This reverts commit 15f23fa790a5c3396ce177981d8395152b679266.

9 months agopackaging: libstdc++exp added
Slava Barinov [Fri, 28 Apr 2023 13:04:06 +0000 (16:04 +0300)]
packaging: libstdc++exp added

Change-Id: I5495f7a6c39462b22f3470380982f5ae1bbd48b1
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
9 months agopackaging: enable HWASan for x86_64
Slava Barinov [Fri, 28 Apr 2023 13:01:11 +0000 (16:01 +0300)]
packaging: enable HWASan for x86_64

Now the library is built by default

Change-Id: I60d5f8a4b82d54556ecf8f70deb597a7047371aa
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
9 months agopackaging: Bump to 13.1.0
Slava Barinov [Thu, 27 Apr 2023 09:07:41 +0000 (12:07 +0300)]
packaging: Bump to 13.1.0

Change-Id: I64c7fc98d709773616da57490647f5a1ae0ea53d

9 months agopackaging: update math libraries version
Dongkyun Son [Tue, 7 Feb 2023 01:50:38 +0000 (10:50 +0900)]
packaging: update math libraries version

* gmp-6.1.2 -> 6.2.1
* mpfr-4.0.2 -> 4.2.0
* mpc-1.1.0 -> 1.3.1

Change-Id: Iffc8a68e30dfff976e1b8628f64bcc406b778148
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
9 months agopackaging: Bump version to 12.2.0
Dongkyun Son [Wed, 8 Feb 2023 08:17:40 +0000 (17:17 +0900)]
packaging: Bump version to 12.2.0

Change-Id: I1e5119b75e065ffd7a27715627de7347d873716f
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
9 months agoRevert "packaging: Enable gcc build with mthumb-fp"
Dongkyun Son [Mon, 6 Feb 2023 10:01:12 +0000 (19:01 +0900)]
Revert "packaging: Enable gcc build with mthumb-fp"

This reverts commit da017a93fe239dfb8d97447dd576a0e2b01f5257.

Change-Id: Ibe93e8fb70df007ab0f75c01f49f4fb821e654a3

9 months agoTizen configuration enabled for aarch64 build
Slava Barinov [Tue, 22 Jun 2021 09:00:35 +0000 (12:00 +0300)]
Tizen configuration enabled for aarch64 build

2021-06-22  Vyacheslav Barinov  <v.barinov@samsung.com>

        * gcc/config.gcc: Use tizen.h config for AArc64 Tizen builds.
* gcc/config/aarch64/tizen.h: New file.

Change-Id: Ibdbbfa4e6352d2a8f23193004ec998697c490d54
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
9 months agopackaging: disable gcc_run_tests of cross gcc
Dongkyun Son [Wed, 17 Mar 2021 03:14:36 +0000 (12:14 +0900)]
packaging: disable gcc_run_tests of cross gcc

Cross-toolchain testing is not straightforward.

Change-Id: I8292ea0fd2df95195f651daae9b3262a815b051c
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
9 months agopackaging: Fix armv7hl build
Slava Barinov [Wed, 27 Jan 2021 17:00:05 +0000 (20:00 +0300)]
packaging: Fix armv7hl build

The fix prevents

 cc1: error: '-mfloat-abi=hard': selected processor lacks an FPU

Change-Id: I68419bd16b9ca73ef4d5aac174a68a8c4166a65f
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
9 months agopackaging: Add configure-dumper support
Slava Barinov [Thu, 4 Jun 2020 11:57:56 +0000 (14:57 +0300)]
packaging: Add configure-dumper support

Change-Id: I1b83928110a067023e527983046700612deb509f
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
9 months agopackaging: Remove -fno-omit-frame-pointer flag
Slava Barinov [Wed, 29 Apr 2020 11:50:53 +0000 (14:50 +0300)]
packaging: Remove -fno-omit-frame-pointer flag

The flag causes libsanitizer build fail.

Change-Id: I3b0eddb5cca8ee8d3ccef2050191978df571627a
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
9 months agopackaging: Support 32bit build for armv8-a CPU
Slava Barinov [Mon, 13 Apr 2020 11:22:52 +0000 (14:22 +0300)]
packaging: Support 32bit build for armv8-a CPU

Change-Id: If7635ee83e866faae7fc6f04ba02da3918e0fdc7
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
9 months agopackaging: Move static libs to separate package
Slava Barinov [Mon, 6 Apr 2020 15:11:32 +0000 (18:11 +0300)]
packaging: Move static libs to separate package

Change-Id: Ic5a6f0024ba8bd4c41fdd77d9a1e70b6eee70d62
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
9 months agopackaging: Update test system
Slava Barinov [Mon, 6 Apr 2020 13:11:15 +0000 (16:11 +0300)]
packaging: Update test system

Change-Id: Ic7c49d013865a960a8392112d3a1ff717472e715
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
9 months agopackaging: add support option for -fstack-protector-strong
Dongkyun Son [Thu, 20 Feb 2020 05:41:35 +0000 (14:41 +0900)]
packaging: add support option for -fstack-protector-strong

Change-Id: Ifdb7987bd4531b49ec136723c68bb694bfc315d0
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
9 months agoTizen configuration added
Slava Barinov [Mon, 30 Dec 2019 07:28:51 +0000 (10:28 +0300)]
Tizen configuration added

2019-12-30  Vyacheslav Barinov  <v.barinov@samsung.com>

* gcc/config/arm/tizen.h: New
* gcc/config.gcc: Use tizen.h config for Tizen builds.

Change-Id: I51d856fd3dd12b22081e545178dc5947388e7b5b
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
9 months agopackaging: update libraries
Dongkyun Son [Thu, 28 Nov 2019 04:59:19 +0000 (13:59 +0900)]
packaging: update libraries

gmp:    6.1.1   ->  6.1.2
mpfr:   3.1.5   ->  4.0.2
mpc:    1.0.3   ->  1.1.0
isl:    0.17.1  ->  0.22

Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
9 months agoUpdate pkgversion string
Mikhail Kashkarov [Thu, 28 Nov 2019 20:30:14 +0000 (23:30 +0300)]
Update pkgversion string

9 months agoUpdate gcov files
Mikhail Kashkarov [Wed, 27 Nov 2019 16:22:20 +0000 (19:22 +0300)]
Update gcov files

9 months agoRemove cilk packages
Mikhail Kashkarov [Wed, 27 Nov 2019 14:25:34 +0000 (17:25 +0300)]
Remove cilk packages

Removed in upstream

9 months agoRelease Tizen 9.2.0
Mikhail Kashkarov [Wed, 27 Nov 2019 13:36:35 +0000 (16:36 +0300)]
Release Tizen 9.2.0

9 months agoEnable linaro-gcc bootstrap with asan config.
Mikhail Kashkarov [Thu, 1 Aug 2019 13:34:10 +0000 (16:34 +0300)]
Enable linaro-gcc bootstrap with asan config.

We couldn't verify linaro-gcc bootstrap with dynmaic ASan as we don't update
library pathes while running executables, so the compilation is performed with
the new instrumentations and the old external runtime from the build environment
is used during run.

And we'll also get runtime conflicts with 2 libasan.so version inside sanitized
environment, so it doesn't make sense to define 'asanbootstrap' with 'asan'.

If we really do want to test dynamic ASan, we could add the following to the
POSTSTAGE1_LDFLAGS:

  "-rpath$$r/prev-$(TARGET_SUBDIR)/libsanitizer/asan/.libs"

and keep additional rpathes for final binaries or use patchelf tool.

Change-Id: I8783f0395521126f8e01125e24bc40ed457bc008

9 months agoEnable build-tunable asan shadow scale size
Mikhail Kashkarov [Fri, 28 Jun 2019 18:31:32 +0000 (21:31 +0300)]
Enable build-tunable asan shadow scale size

Use the following for the project config (3 is default):

  %define asan_shadow_scale 3
  Macros:
  asan_shadow_scale 3
  :Macros

Change-Id: I23b231f03d6ab47c6b4264f8c7837eb1197f4cc4

9 months ago* gcc.dg/pr83623.c: Add additional options on hppa*-&-hpux* and arm*-*-*.
Dongkyun Son [Wed, 5 Jun 2019 06:56:45 +0000 (15:56 +0900)]
* gcc.dg/pr83623.c: Add additional options on hppa*-&-hpux* and arm*-*-*.

(includes 5839d47d0d65a35fa4791220ef57f50912ca40d5)

Change-Id: Icd2eab553e9fd30d4317301a93b2d5e2c56a27e4
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
9 months agopackaging: add release information to pkgversion string.
Dongkyun Son [Wed, 8 Nov 2017 01:49:50 +0000 (10:49 +0900)]
packaging: add release information to pkgversion string.

gcc (Tizen/Linaro GCC %{version} %{gcc_release} %{release}) BASEVER DATESTAMP
%{release} can provide more information(revision, build count).

Change-Id: I73e4da88ebcee0269c6875b6ef40d5690dc4de67
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
9 months agopackaging: Enable gcc build with mthumb-fp
Denis Khalikov [Wed, 22 Aug 2018 10:48:13 +0000 (13:48 +0300)]
packaging: Enable gcc build with mthumb-fp

Change-Id: Ib433b7163a1541134ed7bbf4b446a70fb5a2f34a

9 months agopackaging: Add macroses to test linaro-gcc on target device
Mikhail Kashkarov [Thu, 30 Aug 2018 09:20:25 +0000 (12:20 +0300)]
packaging: Add macroses to test linaro-gcc on target device

- run_tests_on_device:
  1. Turn on linaro-gcc tests.
  2. Do not remove 'obj/' directory.
  3. Skip configure/make commands in the %build stage.

- exit_on_make_finish:
  Exit right after "make BOOT_CFLAGS=..." step.

Change-Id: I77a85befa7756922963b63488aaf8cdc431fec0f

9 months agoRepair collecting files for testresults rpm package.
Mikhail Kashkarov [Fri, 13 Jul 2018 14:05:21 +0000 (17:05 +0300)]
Repair collecting files for testresults rpm package.

Different .log files with the same name from gmp/mpfr are overwriting on copy,
put the in the separate directories.

Change-Id: I77761f1ff589252b4e8816dc12e9025d360fc5a0

9 months agopackaging: Add -Wformat options to disable warnings and tests FAIL.
Mikhail Kashkarov [Thu, 17 May 2018 13:32:19 +0000 (16:32 +0300)]
packaging: Add -Wformat options to disable warnings and tests FAIL.

"-Wformat-..." options generate warnings like:

  cc1: warning: -Wformat-security ignored without -Wformat [-Wformat-security]

that makes a lot of unexpected failures in testsuite while checking produced
output (FAIL: .. test for excess errors) and also results comparison is messed
up for the new tests.
Insert -Wformat if it's missing.

Change-Id: Ia61f256b1f8c3fe5b3ee3c02d363eb901c68adbe

9 months agopackaging: Add -marm and -fno-omit-frame-pointer
Denis Khalikov [Thu, 5 Jul 2018 10:04:58 +0000 (13:04 +0300)]
packaging: Add -marm and -fno-omit-frame-pointer

To enable "fastunwinder" work on armv7l we should explicitly
build libasan with -marm and -fno-omit-frame-pointer.

Change-Id: I28e763fa7b088aa26a81e7bb6d3a7fa9ba7a714b

9 months agopackaging: Bootstrap compiler optimization
Oleg Ogurtsov [Thu, 11 Jan 2018 09:53:42 +0000 (12:53 +0300)]
packaging: Bootstrap compiler optimization

Change-Id: Ie1e12ff3ae5c0550254f58da4750830e5739d3f5

9 months agoEnable asaned glibc work.
Denis Khalikov [Tue, 26 Sep 2017 18:51:35 +0000 (21:51 +0300)]
Enable asaned glibc work.

Modify GetPageSize () function to return
4096 for arm and arch64 architectures. We can
not call sysconf from libc befor libc is inited.

Mark libasan as initfirst, in this case "patched" rtld
will be able to initiazlie libasan before libc.so

Change-Id: I56a582fdeafcf55b9dbab8fcd1b39be850cccc04

9 months agopackaging: add %arm to lsan_arch
Dongkyun Son [Tue, 24 Oct 2017 01:22:21 +0000 (10:22 +0900)]
packaging: add %arm to lsan_arch

libasan.so.* are installed, but unpackaged in armv7hl.

Change-Id: I713fdcc3b157f3578995fa26b9d8d4754f937bfa
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
9 months agoAdd armv7hl support.
Mikhail Kashkarov [Fri, 5 May 2017 14:00:49 +0000 (17:00 +0300)]
Add armv7hl support.

Change-Id: Ib611ee4659af5e30b2a9c46ded7588b5a5c139fa

9 months agopackaging: clean-up sanitizer macros.
Dongkyun Son [Tue, 19 Sep 2017 05:33:20 +0000 (14:33 +0900)]
packaging: clean-up sanitizer macros.

sanitizer related macros moved to 'gcc-contrib' package.

Change-Id: Ic8ed52aac4a502f2bf44053225b2e29e721699d6
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
9 months agopackaging: provide libasan(64bit) on 32bit build env
Dongkyun Son [Fri, 1 Sep 2017 15:35:56 +0000 (00:35 +0900)]
packaging: provide libasan(64bit) on 32bit build env

This is needed as it requires 64bit libs into i586 repo, sometimes.
(e.g, .NET toolchain asan build).

Change-Id: Ia18f132b19e8552b347132531f3e12000aa34514
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
9 months agopackaging: Support for gcc-contrib.
Denis Khalikov [Fri, 18 Aug 2017 15:07:28 +0000 (18:07 +0300)]
packaging: Support for gcc-contrib.

This patch deletes all scripts from gcc *spec files.
All scripts moved to gcc-contrib package.

Change-Id: I847a5c61b69cc74aadf59c31e3b04a404a4d13b0

9 months agopackaging: Add libasan as requires for asan-runtime-env
Hoyub Lee [Mon, 21 Aug 2017 07:10:12 +0000 (16:10 +0900)]
packaging: Add libasan as requires for asan-runtime-env

Installing asan-runtime-env without libasan invokes error from ld.so.
Therefore, it is correct to add libasan as requires.

Change-Id: I9d2e2a3f60369b1332d7280b6cc6253a73e36439
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
9 months agopackaging: Set shadow address space to unlimited for ASan
Chan Lee [Fri, 25 Aug 2017 01:46:44 +0000 (10:46 +0900)]
packaging: Set shadow address space to unlimited for ASan

Currently, at the beginning of gbs build, shadow address space is set
according to the environment of the host machine. It makes ASan build
fail because ASan needs a whole shadow address space.

Actually ASan tries to set the value to unlimited at init time( ASanInitInternal() )
but it failes because of lack of permission like below.

[   39s] ==6800==ERROR: AddressSanitizer setrlimit() failed 1

The value could be set at package install time because the user
is 'root' at this time.
Using ulimit can only set the value for current user('root') not 'abuild'
which is the user at build time so we need to set /etc/security/limits.conf directly.

Change-Id: Ia03911a37a689c186d0e028d01b665cf6a0c3073
Signed-off-by: Chan Lee <chan45.lee@samsung.com>
9 months agopackaging: Force options for native compiler only
Slava Barinov [Thu, 10 Aug 2017 08:05:46 +0000 (11:05 +0300)]
packaging: Force options for native compiler only

If both native and cross-compiler are installed (e. g. in qemu-accel build) the
gcc-force-options should only accelerate native compiler in order to keep
gcc-unforce-options work.

Change-Id: I1454fb199e6f849b89f7b16129e005894d800cbc
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
9 months agopackaging: remain ld.so.preload.org
Chan Lee [Wed, 23 Aug 2017 11:28:57 +0000 (20:28 +0900)]
packaging: remain ld.so.preload.org

Original file should be remained to restore when uninstalling rpm.

Change-Id: Id5e5b82ff327e14db966b142248d6a5a3e17917c
Signed-off-by: Chan Lee <chan45.lee@samsung.com>
9 months agopackaging: Enable ASan bootstrap for ASan projects
Slava Barinov [Tue, 25 Jul 2017 08:44:17 +0000 (11:44 +0300)]
packaging: Enable ASan bootstrap for ASan projects

GCC will be built in ASan projects.

To test the GCC package the rpm macro `asanbootstrap' should be defined in
project config.

Change-Id: Id91425e2895f63ec92c8e83fb96f93aaade67728
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
9 months ago[TTC-3] Fix asan_symbolize.py output frame numbers.
Mikhail Kashkarov [Thu, 20 Jul 2017 11:19:13 +0000 (14:19 +0300)]
[TTC-3] Fix asan_symbolize.py output frame numbers.

If input line already symbolized and has format
'#0 0x7f6e35cf2e45 in func foo:46' - fix internal frame number.

packaging/
    * asan_symbolized.py (have_line_to_symbolized): New function.

Change-Id: I2c52c58f9e2d6dfce709e87dee2abd62b642bcad

9 months ago[TTC-2] Fix asan_symbolize.py for C++ function prototypes detection.
Mikhail Kashkarov [Thu, 13 Jul 2017 14:02:39 +0000 (17:02 +0300)]
[TTC-2] Fix asan_symbolize.py for C++ function prototypes detection.

Change-Id: Iffa30dce19f99506312a93b79cc8deb05404a82a

9 months agopackaging: append -ldl -lpthread to ASan force options.
Sangmin Seo [Wed, 12 Jul 2017 09:37:50 +0000 (18:37 +0900)]
packaging: append -ldl -lpthread to ASan force options.

When building for address sanitization, some packages complain about
missing symbols due to omitted -ldl or -pthread.  This patch appends
-ldl and -lpthread to the ASan force options in order to resolve this
kind of issue.  Note that since -ldl and -lpthread are already needed
by libasan, adding them to the ASan force options should not cause any
problems.

This patch also adds -Wl,--as-needed before -ldl -lpthread in the
force options to prevent libdl or libpthread from being linked when
unnecessary.

Change-Id: Ic50059d4684e15773f56c589cfacda0bc944d955
Signed-off-by: Sangmin Seo <sangmin7.seo@samsung.com>
9 months agopackaging: create a wrapper for collect2 in gcc-force-options
Sangmin Seo [Tue, 18 Jul 2017 05:01:23 +0000 (14:01 +0900)]
packaging: create a wrapper for collect2 in gcc-force-options

gcc-force-options used to prepend/append all force options to the
gcc/g++ wrappers.  This approach worked well for most packages but
caused some configure scripts to behave differently when linker flags
are included in the force options.  For example, if g++ is called with
-ldl appended, it always goes to the linking phase.  As a result, when
configure has expanded AC_PROG_CXXCPP macro, variables related to
preprocessor are not properly set and actual build ends up using
incorrect compile and link flags.

Since prepending or appending linker flags to the linker makes more
sense than carrying them from the compilation phase, this patch
basically divides the force options into compiler flags and linker
ones, and inserts them to corresponding wrappers.  Consequently, a
wrapper for collect2 is created, as we did for gcc and g++, in order
to pass the linker flags to the linker.  Note that collect2 bridges
the compiler and the actual linker, and thus creating a wrapper for
collect2 is more portable and succinct than doing so for linkers.

Change-Id: I8733bf14c5a2c04bfebe38a339c94e7a738cf17c
Signed-off-by: Sangmin Seo <sangmin7.seo@samsung.com>
9 months agopackaging: Add %gcc_force_options and %gcc_unforce_options macros
Slava Barinov [Thu, 13 Jul 2017 10:35:02 +0000 (13:35 +0300)]
packaging: Add %gcc_force_options and %gcc_unforce_options macros

The macros can be used in certain .spec files to switch off sanitization of
parts or modules without hard-coding sanitizer flags into packages.

Change-Id: I1643a3bdd64a3d48855f02622feb064d482e3655
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
Signed-off-by: Sangmin Seo <sangmin7.seo@samsung.com>
9 months agopackaging: enable log_exe_name sanitizer option for ASan
Chan Lee [Thu, 1 Jun 2017 03:28:22 +0000 (12:28 +0900)]
packaging: enable log_exe_name sanitizer option for ASan

This option shoule be 'log_exe_name' not 'log_exe_path'

According to SanitizerCommonFlags,
(https://github.com/google/sanitizers/wiki/SanitizerCommonFlags)
Enabling this option makes ASan mention name of executable when reporting error and append
executable name to logs (as in "log_path.exe_name.pid").

Change-Id: I0a49a2032355b6527ea7522faa1414ec8d567125
Signed-off-by: Chan Lee <chan45.lee@samsung.com>
9 months agoDo not build libgfortran unless requested explicitly
Slava Barinov [Thu, 27 Apr 2017 08:20:09 +0000 (11:20 +0300)]
Do not build libgfortran unless requested explicitly

        * gcc/fortran/config-lang.in : add conditional target_libs setup.

This option does not make sense in upstream GCC - Fortran frontend is useless
without runtime, but will work with qemu-accel in Tizen OBS environment.

Change-Id: Ie42fa3201a0bc022ef46ef53b51be896ad091943
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
9 months agopackaging: add fortran compiler
Chan Lee [Mon, 24 Apr 2017 07:11:01 +0000 (16:11 +0900)]
packaging: add fortran compiler

Change-Id: I139d3b29c690a05e29bcfcfa660350f63bbbdadc
Signed-off-by: Chan Lee <chan45.lee@samsung.com>
9 months agoRemove hard-coded path to extract-ubsan-logs script
Slava Barinov [Fri, 7 Apr 2017 10:06:58 +0000 (13:06 +0300)]
Remove hard-coded path to extract-ubsan-logs script

Change-Id: Id515f89e748fbe9a18f5a615e100eb530a0c5930
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
9 months agopackaging: add license files to all sub components
Dongkyun, Son [Fri, 7 Apr 2017 01:27:29 +0000 (10:27 +0900)]
packaging: add license files to all sub components

The license files are added to only library components because they could be
included to target binary.

Change-Id: I7fb9885843794ea47c29833ead402386d890d663
Signed-off-by: Chan Lee <chan45.lee@samsung.com>
Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
9 months agopackaging: remove cloog
Chan Lee [Fri, 7 Apr 2017 07:04:02 +0000 (16:04 +0900)]
packaging: remove cloog

Cloog had been removed from gcc.

Related git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218348
138bc75d-0d04-0410-961f-82ee72b054a4

Change-Id: Ifc898f5f4b429382d082b43e3cbfd4e46b226e2f
Signed-off-by: Chan Lee <chan45.lee@samsung.com>
9 months agopackaging: provide 64bit libs on 32bit build env
Chan Lee [Mon, 27 Mar 2017 01:30:18 +0000 (10:30 +0900)]
packaging: provide 64bit libs on 32bit build env

In some cases, especially .Net toolchain needs 64bit libs to execute
even though 32bit build environment.
It's a little weird but possble because almost archtecture of build machine is 64bit.

Change-Id: I0d8df53d4743a4fa1b2c00d6aeeeed77e8b964cf
Signed-off-by: Chan Lee <chan45.lee@samsung.com>
9 months agoEnabling libcc1 build
Slava Barinov [Thu, 2 Mar 2017 08:47:59 +0000 (11:47 +0300)]
Enabling libcc1 build

Change-Id: I4485bdf215e020450a65970474b591e98a7367f1

9 months agoAdd liblsan packaging
Slava Barinov [Tue, 28 Feb 2017 12:17:45 +0000 (15:17 +0300)]
Add liblsan packaging

Change-Id: I44084744a83cdc87e69b2a1f25cc4138bac31913
Signed-off-by: Slava Barinov <v.barinov@samsung.com>