From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 42EE1138350 for ; Sat, 21 Mar 2020 23:31:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 52A35E0AB5; Sat, 21 Mar 2020 23:31:03 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 24BA1E0AB5 for ; Sat, 21 Mar 2020 23:31:03 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 68BF334F17F for ; Sat, 21 Mar 2020 23:31:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7F5CF18B for ; Sat, 21 Mar 2020 23:30:59 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1584833448.3b0142eada144a18e5d1bc521b36ae274e0056d7.slyfox@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/ocl-icd/files/, dev-libs/ocl-icd/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/ocl-icd/files/ocl-icd-2.2.12-gcc-10.patch dev-libs/ocl-icd/ocl-icd-2.2.12-r1.ebuild X-VCS-Directories: dev-libs/ocl-icd/files/ dev-libs/ocl-icd/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: 3b0142eada144a18e5d1bc521b36ae274e0056d7 X-VCS-Branch: master Date: Sat, 21 Mar 2020 23:30:59 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 67765068-5b42-4b28-852b-4165823eb01b X-Archives-Hash: 43feae53c87c5e23d6f9ffcccda6d49f commit: 3b0142eada144a18e5d1bc521b36ae274e0056d7 Author: Sergei Trofimovich gentoo org> AuthorDate: Sat Mar 21 23:30:48 2020 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Sat Mar 21 23:30:48 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b0142ea dev-libs/ocl-icd: tweak for gcc-10, bug #706098 Reported-by: Anthony Parsons Closes: https://bugs.gentoo.org/706098 Package-Manager: Portage-2.3.94, Repoman-2.3.21 Signed-off-by: Sergei Trofimovich gentoo.org> dev-libs/ocl-icd/files/ocl-icd-2.2.12-gcc-10.patch | 39 ++++++++++++++++++++++ dev-libs/ocl-icd/ocl-icd-2.2.12-r1.ebuild | 2 ++ 2 files changed, 41 insertions(+) diff --git a/dev-libs/ocl-icd/files/ocl-icd-2.2.12-gcc-10.patch b/dev-libs/ocl-icd/files/ocl-icd-2.2.12-gcc-10.patch new file mode 100644 index 00000000000..64948d5b05e --- /dev/null +++ b/dev-libs/ocl-icd/files/ocl-icd-2.2.12-gcc-10.patch @@ -0,0 +1,39 @@ +https://bugs.gentoo.org/706098 + +From 4667bddd365bcc1dc66c483835971f0083b44b1d Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Wed, 22 Jan 2020 19:38:23 +0000 +Subject: [PATCH] icd_generator.rb: fix build failure against gcc-10 + +On gcc-10 (and gcc-9 -fno-common) build fails as: + +``` +libtool: link: gcc -shared -fPIC -DPIC .libs/libdummy_icd.o .libs/libdummy_icd_gen.o \ + -ldl -g -O2 -Wl,-soname -Wl,libdummycl.so.0 -o .libs/libdummycl.so.0.0.0 +ld: .libs/libdummy_icd_gen.o:/home/slyfox/dev/git/ocl-icd/libdummy_icd_gen.h:226: + multiple definition of `master_dispatch'; .libs/libdummy_icd.o:/home/slyfox/dev/git/ocl-icd/libdummy_icd_gen.h:226: first defined here +``` + +gcc-10 will change the default from -fcommon to fno-common: +https://gcc.gnu.org/PR85678. + +The error also happens if CFLAGS=-fno-common passed explicitly. + +Reported-by: Anthony Parsons +Bug: https://bugs.gentoo.org/706098 +Signed-off-by: Sergei Trofimovich +--- + icd_generator.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/icd_generator.rb ++++ b/icd_generator.rb +@@ -207,7 +207,7 @@ def self.generate_libdummy_icd_header + } + libdummy_icd_structures += "};\n\n" + libdummy_icd_structures += "#pragma GCC visibility push(hidden)\n\n" +- libdummy_icd_structures += "struct _cl_icd_dispatch master_dispatch; \n\n" ++ libdummy_icd_structures += "extern struct _cl_icd_dispatch master_dispatch; \n\n" + $use_name_in_test.each { |k, f| + libdummy_icd_structures += "typeof(#{f}) INT#{f};\n" + } diff --git a/dev-libs/ocl-icd/ocl-icd-2.2.12-r1.ebuild b/dev-libs/ocl-icd/ocl-icd-2.2.12-r1.ebuild index aebd6ac1e7e..3142ef64c65 100644 --- a/dev-libs/ocl-icd/ocl-icd-2.2.12-r1.ebuild +++ b/dev-libs/ocl-icd/ocl-icd-2.2.12-r1.ebuild @@ -18,6 +18,8 @@ IUSE="+khronos-headers" BDEPEND="${RUBY_DEPS}" RDEPEND="app-eselect/eselect-opencl" +PATCHES=("${FILESDIR}"/${P}-gcc-10.patch) + src_prepare() { replace-flags -Os -O2 # bug 646122