Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] gcc: backport omp false positive fix
@ 2019-11-06  0:08 voidlinux-github
  2019-11-06  6:47 ` [PR PATCH] [Merged]: " voidlinux-github
  0 siblings, 1 reply; 2+ messages in thread
From: voidlinux-github @ 2019-11-06  0:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]

There is a new pull request by q66 against master on the void-packages repository

https://github.com/void-ppc/void-packages gcc-omp
https://github.com/void-linux/void-packages/pull/16166

gcc: backport omp false positive fix
This fixes gcc not marking constants emitted into assembly as shared which would result in strange build errors such as:

```
$ gcc -fopenmp test-openmp.c
test-openmp.c: In function ‘testfunc’:
test-openmp.c:10:15: error: ‘*.LC0’ not specified in enclosing ‘parallel’
   10 |         float k[3] = { 0.1f, 0.1f, 0.1f } ;
      |               ^
test-openmp.c:7:9: error: enclosing ‘parallel’
    7 | #pragma omp parallel for default(none) shared(f)
      |         ^~~
```

This happens only sometimes and not on all platforms and seems to mostly come down to luck.

Not bumping crosstoolchains for now, as that would be too intensive on the builders right now. If we encounter this somewhere we should bump cross as well.

A patch file from https://github.com/void-linux/void-packages/pull/16166.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gcc-omp-16166.patch --]
[-- Type: text/x-diff, Size: 2365 bytes --]

From 64caf6dd1fccdbe53ee47bf8b3a9aee13b6db484 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Thu, 31 Oct 2019 23:20:52 +0100
Subject: [PATCH] gcc: backport omp false positive fix
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This fixes gcc not marking constants emitted into assembly as
shared which would result in strange build errors such as:

```
$ gcc -fopenmp test-openmp.c
test-openmp.c: In function ‘testfunc’:
test-openmp.c:10:15: error: ‘*.LC0’ not specified in enclosing ‘parallel’
   10 |         float k[3] = { 0.1f, 0.1f, 0.1f } ;
      |               ^
test-openmp.c:7:9: error: enclosing ‘parallel’
    7 | #pragma omp parallel for default(none) shared(f)
      |         ^~~
```

This happens only sometimes and not on all platforms and seems to
mostly come down to luck.

Not bumping crosstoolchains for now, as that would be too intensive
on the builders right now. If we encounter this somewhere we should
bump cross as well.

[ci skip]
---
 srcpkgs/gcc/patches/omp.patch | 17 +++++++++++++++++
 srcpkgs/gcc/template          |  2 +-
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/gcc/patches/omp.patch

diff --git a/srcpkgs/gcc/patches/omp.patch b/srcpkgs/gcc/patches/omp.patch
new file mode 100644
index 00000000000..650cbcb39ff
--- /dev/null
+++ b/srcpkgs/gcc/patches/omp.patch
@@ -0,0 +1,17 @@
+Backport: https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=276211
+
+This fixes potential failures with openmp and constants, such as
+
+error: ‘*.LC0’ not specified in enclosing ‘parallel’
+
+--- gcc/gimplify.c
++++ gcc/gimplify.c
+@@ -7132,6 +7132,8 @@
+   kind = lang_hooks.decls.omp_predetermined_sharing (decl);
+   if (kind != OMP_CLAUSE_DEFAULT_UNSPECIFIED)
+     default_kind = kind;
++  else if (VAR_P (decl) && TREE_STATIC (decl) && DECL_IN_CONSTANT_POOL (decl))
++    default_kind = OMP_CLAUSE_DEFAULT_SHARED;
+ 
+   switch (default_kind)
+     {
diff --git a/srcpkgs/gcc/template b/srcpkgs/gcc/template
index 6774b8a5826..9ff1282c74e 100644
--- a/srcpkgs/gcc/template
+++ b/srcpkgs/gcc/template
@@ -8,7 +8,7 @@ _isl_version=0.21
 
 pkgname=gcc
 version=${_minorver}.0
-revision=1
+revision=2
 short_desc="GNU Compiler Collection"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 homepage="http://gcc.gnu.org"

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Merged]: gcc: backport omp false positive fix
  2019-11-06  0:08 [PR PATCH] gcc: backport omp false positive fix voidlinux-github
@ 2019-11-06  6:47 ` voidlinux-github
  0 siblings, 0 replies; 2+ messages in thread
From: voidlinux-github @ 2019-11-06  6:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 946 bytes --]

There's a merged pull request on the void-packages repository

gcc: backport omp false positive fix
https://github.com/void-linux/void-packages/pull/16166

Description:
This fixes gcc not marking constants emitted into assembly as shared which would result in strange build errors such as:

```
$ gcc -fopenmp test-openmp.c
test-openmp.c: In function ‘testfunc’:
test-openmp.c:10:15: error: ‘*.LC0’ not specified in enclosing ‘parallel’
   10 |         float k[3] = { 0.1f, 0.1f, 0.1f } ;
      |               ^
test-openmp.c:7:9: error: enclosing ‘parallel’
    7 | #pragma omp parallel for default(none) shared(f)
      |         ^~~
```

This happens only sometimes and not on all platforms and seems to mostly come down to luck.

Not bumping crosstoolchains for now, as that would be too intensive on the builders right now. If we encounter this somewhere we should bump cross as well.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-06  6:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06  0:08 [PR PATCH] gcc: backport omp false positive fix voidlinux-github
2019-11-06  6:47 ` [PR PATCH] [Merged]: " voidlinux-github

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).