platform/upstream/gcc.git
8 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>
8 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>
8 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>
8 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

8 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>
8 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>
8 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

8 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

10 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>
10 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>
10 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>
10 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.

10 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>
10 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>
10 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

10 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>
10 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>
10 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

10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 months agoUpdate pkgversion string
Mikhail Kashkarov [Thu, 28 Nov 2019 20:30:14 +0000 (23:30 +0300)]
Update pkgversion string

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

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

Removed in upstream

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

10 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

10 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

10 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>
10 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>
10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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>
10 months agoAdd armv7hl support.
Mikhail Kashkarov [Fri, 5 May 2017 14:00:49 +0000 (17:00 +0300)]
Add armv7hl support.

Change-Id: Ib611ee4659af5e30b2a9c46ded7588b5a5c139fa

10 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>
10 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>
10 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

10 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>
10 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>
10 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>
10 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>
10 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>
10 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

10 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

10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 months agoEnabling libcc1 build
Slava Barinov [Thu, 2 Mar 2017 08:47:59 +0000 (11:47 +0300)]
Enabling libcc1 build

Change-Id: I4485bdf215e020450a65970474b591e98a7367f1

10 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>
10 months agoBasing on 6.3.1 branch
Slava Barinov [Tue, 28 Feb 2017 11:35:47 +0000 (14:35 +0300)]
Basing on 6.3.1 branch

Change-Id: Idbb9664859cb4a000f1a5631bc948652b49e9fc4
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
10 months agopackaging: explicitly added configure options
Dongkyun, Son [Thu, 2 Feb 2017 06:27:19 +0000 (15:27 +0900)]
packaging: explicitly added configure options

--enable-plugin (same as 4.9's)
--disable-libcc1 (new on 6.2's)

Change-Id: I005be6c5c888597cda64b0fe94b6d20399ef4c93
Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
10 months agopackaging: remove plugin packages and files
Chan Lee [Thu, 19 Jan 2017 06:54:25 +0000 (15:54 +0900)]
packaging: remove plugin packages and files

Change-Id: I416cdc6e1bc6c687427a48796f1575a94f678f10
Signed-off-by: Chan Lee <chan45.lee@samsung.com>
10 months agopackaging: disable lsan for arm and x86
Chan Lee [Thu, 19 Jan 2017 06:51:50 +0000 (15:51 +0900)]
packaging: disable lsan for arm and x86

Change-Id: I0ff97d8f50f386eabd49f8b5d1479f6645e52e90
Signed-off-by: Chan Lee <chan45.lee@samsung.com>
10 months agopackaging: add packaging
Dongkyun, Son [Wed, 11 Jan 2017 10:29:59 +0000 (19:29 +0900)]
packaging: add packaging

Change-Id: Icd5159e115d6827eaaff5ff59861d07438c29129
Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
13 months agoUpdate ChangeLog and version files for release upstream-13.1.0 upstream/13.1.0
Jakub Jelinek [Wed, 26 Apr 2023 07:10:03 +0000 (07:10 +0000)]
Update ChangeLog and version files for release

13 months agoUpdate gennews for GCC 13.
Jakub Jelinek [Wed, 26 Apr 2023 07:05:49 +0000 (09:05 +0200)]
Update gennews for GCC 13.

2023-04-26  Jakub Jelinek  <jakub@redhat.com>

* gennews (files): Add files for GCC 13.

(cherry picked from commit f2f721d13b92267497ca52a3bd6e2e03071bad12)

13 months agoDaily bump.
GCC Administrator [Wed, 26 Apr 2023 00:22:28 +0000 (00:22 +0000)]
Daily bump.

13 months agoRegenerate gcc.pot
Joseph Myers [Tue, 25 Apr 2023 21:44:54 +0000 (21:44 +0000)]
Regenerate gcc.pot

* gcc.pot: Regenerate.

13 months agopowerpc: Fix up *branch_anddi3_dot for -m32 -mpowerpc64 [PR109566]
Jakub Jelinek [Tue, 25 Apr 2023 12:20:51 +0000 (14:20 +0200)]
powerpc: Fix up *branch_anddi3_dot for -m32 -mpowerpc64 [PR109566]

The following testcase reduced from newlib ICEs on powerpc-linux,
with -O2 -m32 -mpowerpc64 since r12-6433 PR102239 optimization was
added and on the original testcase since some ranger improvements in
GCC 13 made it no longer latent on newlib.
The problem is that the *branch_anddi3_dot define_insn_and_split
relies on the *rotldi3_mask_dot define_insn_and_split being recognized
during splitting.  The rs6000_is_valid_rotate_dot_mask function checks whether
the mask is a CONST_INT which is a valid mask, but *rotl<mode>3_mask_dot in
addition to checking that it is a valid mask also has
  (<MODE>mode == Pmode || UINTVAL (operands[3]) <= 0x7fffffff)
test in the condition.  For TARGET_64BIT that doesn't add any further
requirements, but for !TARGET_64BIT && TARGET_POWERPC64 if the AND
second operand is larger than INT_MAX it will not be recognized.

The rs6000_is_valid_rotate_dot_mask function is used solely in one spot,
condition of *branch_anddi3_dot, so the following patch adjusts it
to check for that as well.

2023-04-25  Jakub Jelinek  <jakub@redhat.com>

PR target/109566
* config/rs6000/rs6000.cc (rs6000_is_valid_rotate_dot_mask): For
!TARGET_64BIT, don't return true if UINTVAL (mask) << (63 - nb)
is larger than signed int maximum.

* gcc.target/powerpc/pr109566.c: New test.

(cherry picked from commit 97f8f2d0a0384d377ca46da88495f9a3d18d4415)

13 months agoDaily bump.
GCC Administrator [Tue, 25 Apr 2023 00:23:22 +0000 (00:23 +0000)]
Daily bump.

13 months agoUpdate gcc hr.po, sv.po, zh_CN.po
Joseph Myers [Mon, 24 Apr 2023 18:11:30 +0000 (18:11 +0000)]
Update gcc hr.po, sv.po, zh_CN.po

* hr.po, sv.po, zh_CN.po: Update.

13 months agodoc: Update install.texi for GCC 13
Rainer Orth [Mon, 24 Apr 2023 09:56:37 +0000 (11:56 +0200)]
doc: Update install.texi for GCC 13

install.texi needs some updates for GCC 13 and trunk:

* We used a mixture of Solaris 2 and Solaris references.  Since Solaris
  1/SunOS 4 is ancient history by now, consistently use Solaris
  everywhere.  Likewise, explicit references to Solaris 11 can go in
  many places since Solaris 11.3 and 11.4 is all GCC supports.

* Some caveats apply to both Solaris/SPARC and x86, like the difference
  between as and gas.

* Some specifics are obsolete, like the /usr/ccs/bin path whose contents
  was merged into /usr/bin in Solaris 11.0 already.  Likewise, /bin/sh
  is ksh93 since Solaris 11.0, so there's no need to explicitly use
  /bin/ksh.

* I've removed the reference to OpenCSW: there's barely a need for external
  sites to get additional packages.  OpenCSW is mostly unmaintained these
  days and has been found to be rather harmful then helping.

* The section on assembler and linker to use was partially duplicated.
  Better keep the info in one place.

* GNAT is bundled in recent Solaris 11.4 updates, so recommend that.

Tested on i386-pc-solaris2.11 with make doc/gccinstall.{info,pdf} and
inspection of the latter.

2023-04-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

gcc:
* doc/install.texi: Consistently use Solaris rather than Solaris 2.
Remove explicit Solaris 11 references.
Markup fixes.
(Options specification, --with-gnu-as): as and gas always differ
on Solaris.
Remove /usr/ccs/bin reference.
(Installing GCC: Binaries, Solaris (SPARC, Intel)): Remove.
(i?86-*-solaris2*): Merge assembler, linker recommendations ...
(*-*-solaris2*): ... here.
Update bundled GCC versions.
Don't refer to pre-built binaries.
Remove /bin/sh warning.
Update assembler, linker recommendations.
Document GNAT bootstrap compiler.
(sparc-sun-solaris2*): Remove non-UltraSPARC reference.
(sparc64-*-solaris2*): Move content...
(sparcv9-*-solaris2*): ...here.
Add GDC for 64-bit bootstrap compilers.

13 months agoDaily bump.
GCC Administrator [Mon, 24 Apr 2023 00:22:57 +0000 (00:22 +0000)]
Daily bump.

13 months agoDaily bump.
GCC Administrator [Sun, 23 Apr 2023 00:22:24 +0000 (00:22 +0000)]
Daily bump.

13 months agomatch.pd: Fix fneg/fadd optimization [PR109583]
Jakub Jelinek [Sat, 22 Apr 2023 08:24:29 +0000 (10:24 +0200)]
match.pd: Fix fneg/fadd optimization [PR109583]

The following testcase ICEs on x86, foo function since my r14-22
improvement, but bar already since r13-4122.  The problem is the same,
in the if expression related_vector_mode is called and that starts with
  gcc_assert (VECTOR_MODE_P (vector_mode));
but nothing in the fneg/fadd match.pd pattern actually checks if the
VEC_PERM type has VECTOR_MODE_P (vec_mode).  In this case it has BLKmode
and so it ICEs.

The following patch makes sure we don't ICE on it.

2023-04-22  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/109583
* match.pd (fneg/fadd simplify): Don't call related_vector_mode
if vec_mode is not VECTOR_MODE_P.

* gcc.dg/pr109583.c: New test.

(cherry picked from commit c58c0771b7a3dbd2a00cd4b6ca2301d74b6cd4e2)

13 months agoDaily bump.
GCC Administrator [Sat, 22 Apr 2023 00:22:49 +0000 (00:22 +0000)]
Daily bump.

13 months agoLoongArch: Add built-in functions description of LoongArch Base instruction set instr...
Lulu Cheng [Thu, 6 Apr 2023 08:02:07 +0000 (16:02 +0800)]
LoongArch: Add built-in functions description of LoongArch Base instruction set instructions.

gcc/ChangeLog:

* doc/extend.texi: Add section for LoongArch Base Built-in functions.

(cherry picked from commit 5015cdf3155c80e5fd61f7b6ab8082ee849e3e90)

13 months agoDo not ignore UNDEFINED ranges when determining PHI equivalences.
Andrew MacLeod [Thu, 20 Apr 2023 17:10:40 +0000 (13:10 -0400)]
Do not ignore UNDEFINED ranges when determining PHI equivalences.

Do not ignore UNDEFINED name arguments when registering two-way equivalences
from PHIs.

PR tree-optimization/109564
gcc/
* gimple-range-fold.cc (fold_using_range::range_of_phi): Do no ignore
UNDEFINED range names when deciding if all PHI arguments are the same,

gcc/testsuite/
* gcc.dg/torture/pr109564-1.c: New testcase.
* gcc.dg/torture/pr109564-2.c: Likewise.
* gcc.dg/tree-ssa/evrp-ignore.c: XFAIL.
* gcc.dg/tree-ssa/vrp06.c: Likewise.

(cherry picked from commit 17aa9ddb34581855dd013745c8be27dda024de4a)

13 months agoDaily bump.
GCC Administrator [Fri, 21 Apr 2023 00:22:34 +0000 (00:22 +0000)]
Daily bump.

13 months agodoc: Remove repeated word (typo)
Alejandro Colomar [Thu, 20 Apr 2023 17:18:55 +0000 (19:18 +0200)]
doc: Remove repeated word (typo)

gcc/ChangeLog:

* doc/extend.texi (Common Function Attributes): Remove duplicate
word.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
13 months agoDaily bump.
GCC Administrator [Thu, 20 Apr 2023 00:21:47 +0000 (00:21 +0000)]
Daily bump.

13 months agoc++: bad ggc_free in try_class_unification [PR109556]
Patrick Palka [Wed, 19 Apr 2023 17:07:46 +0000 (13:07 -0400)]
c++: bad ggc_free in try_class_unification [PR109556]

Aside from correcting how try_class_unification copies multi-dimensional
'targs', r13-377-g3e948d645bc908 also made it ggc_free this copy as an
optimization.  But this is wrong since the call to unify within might've
captured the args in persistent memory such as the satisfaction cache
(as part of constrained auto deduction).

PR c++/109556

gcc/cp/ChangeLog:

* pt.cc (try_class_unification): Don't ggc_free the copy of
'targs'.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/concepts-placeholder13.C: New test.

(cherry picked from commit 5e284ebbc3082c5a8974d24e3a0977aa48f3cc60)

13 months agoRevert "libstdc++: Export global iostreams with GLIBCXX_3.4.31 symver [PR108969]"
Jonathan Wakely [Wed, 19 Apr 2023 12:18:56 +0000 (13:18 +0100)]
Revert "libstdc++: Export global iostreams with GLIBCXX_3.4.31 symver [PR108969]"

This reverts commit 762be0646bf96761ce68a9e06ab60c453e0963d0.

13 months agoRevert "libstdc++: Fix preprocessor condition in linker script [PR108969]"
Jonathan Wakely [Wed, 19 Apr 2023 12:18:53 +0000 (13:18 +0100)]
Revert "libstdc++: Fix preprocessor condition in linker script [PR108969]"

This reverts commit ed933888e680384e1e7af361b20dd484ad424f7d.

13 months agotestsuite: Fix up pr109524.C for -std=c++23 [PR109524]
Jakub Jelinek [Wed, 19 Apr 2023 08:01:04 +0000 (10:01 +0200)]
testsuite: Fix up pr109524.C for -std=c++23 [PR109524]

This testcase was reduced such that it isn't valid C++23, so with my
usual testing with GXX_TESTSUITE_STDS=98,11,14,17,20,2b it fails:
FAIL: g++.dg/pr109524.C  -std=gnu++2b (test for excess errors)
.../gcc/testsuite/g++.dg/pr109524.C: In function 'nn hh(nn)':
.../gcc/testsuite/g++.dg/pr109524.C:35:12: error: cannot bind non-const lvalue reference of type 'nn&' to an rvalue of type 'nn'
.../gcc/testsuite/g++.dg/pr109524.C:17:6: note:   initializing argument 1 of 'nn::nn(nn&)'
The following patch fixes that and I've verified it doesn't change
anything on what the test was testing, it still ICEs in r13-7198 and
passes in r13-7203, now in all language modes (except for 98 where
it is intentionally UNSUPPORTED).

2023-04-19  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/109524
* g++.dg/pr109524.C (nn::nn): Change argument type from nn & to
const nn &.

(cherry picked from commit 794ffdb0fb6312ce07af0bfc797bef9f4cff4c61)

13 months agoinstall.texi: Document --enable-decimal-float for AArch64
Christophe Lyon [Mon, 17 Apr 2023 17:23:54 +0000 (19:23 +0200)]
install.texi: Document --enable-decimal-float for AArch64

When I committed the patches to enable support for DFP on AArch64, I
forgot to update the installation documentation.

This patch adds AArch64 as needed (same as i386/x86_64).

2023-04-17  Christophe Lyon  <christophe.lyon@arm.com>

gcc/
* doc/install.texi (enable-decimal-float): Add AArch64.

(cherry picked from commit cbddd574a78529b9176eb28253c20a335daefbb4)

13 months agoRISC-V: Force ilp32d for the T-Head FMV test
Palmer Dabbelt [Mon, 17 Apr 2023 18:20:44 +0000 (11:20 -0700)]
RISC-V: Force ilp32d for the T-Head FMV test

These functions are NOPs on the soft-float ABIs.  Since we're already
forcing the ISA, let's just force the ABI too.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/xtheadfmv-fmv.c: Force the ilp32d ABI.

(cherry picked from commit c16848ed8f30be952ac0167fd464ae794fa5ac67)

13 months agoRISC-V: Set the ABI for the RVV tests
Palmer Dabbelt [Mon, 17 Apr 2023 18:20:43 +0000 (11:20 -0700)]
RISC-V: Set the ABI for the RVV tests

The RVV test harness currently sets the ISA according to the target
tuple, but doesn't also set the ABI.  This just sets the ABI to match
the ISA, though we should really also be respecting the user's specific
ISA to test.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/rvv.exp (gcc_mabi): New variable.

(cherry picked from commit e6b050da8a4513ab37fd3699c7a963421fbe4d81)

13 months agoRISC-V: Clean up the pr106602.c testcase
Palmer Dabbelt [Mon, 17 Apr 2023 18:20:42 +0000 (11:20 -0700)]
RISC-V: Clean up the pr106602.c testcase

The test case that was added is rv64i-specific, as there's better ways
to generate this code on rv32i (where the long/int cast is a NOP) and on
rv64i_zba (where we have word shifts).  This renames the original test
case and adds two more for those targets.

gcc/testsuite/ChangeLog:
PR target/106602
* gcc.target/riscv/pr106602.c: Moved to...
* gcc.target/riscv/pr106602-rv64i.c: ...here.
* gcc.target/riscv/pr106602-rv32i.c: New test.
* gcc.target/riscv/pr106602-rv64i_zba.c: New test.

(cherry picked from commit 8c010f6fe5ebe80d2e054b31e04ae0e9f12ae368)

13 months agoDaily bump.
GCC Administrator [Wed, 19 Apr 2023 00:23:09 +0000 (00:23 +0000)]
Daily bump.

13 months agolibstdc++: Fix preprocessor condition in linker script [PR108969]
Jonathan Wakely [Tue, 18 Apr 2023 16:22:40 +0000 (17:22 +0100)]
libstdc++: Fix preprocessor condition in linker script [PR108969]

The linker script is preprocessed with $(top_builddir)/config.h not the
include/$target/bits/c++config.h version, which means that configure
macros do not have the _GLIBCXX_ prefix yet.

The _GLIBCXX_SYMVER_GNU and _GLIBCXX_SHARED checks are redundant,
because the gnu.ver file is only used for _GLIBCXX_SYMVER_GNU and the
linker script is only used for the shared library. Remove those.

libstdc++-v3/ChangeLog:

PR libstdc++/108969
* config/abi/pre/gnu.ver: Fix preprocessor condition.

(cherry picked from commit 6067ae4557a3a7e5b08359e78a29b8a9d5dfedce)