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 EE612138334 for ; Sun, 22 Jul 2018 21:06:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DFB15E0969; Sun, 22 Jul 2018 21:06:43 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 9C3BBE0969 for ; Sun, 22 Jul 2018 21:06:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 BA3F5335D55 for ; Sun, 22 Jul 2018 21:06:41 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E14B9377 for ; Sun, 22 Jul 2018 21:06:39 +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: <1532293591.5c1629567172efd3e05e6b9629d18f8fb98c485e.slyfox@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-emulation/dolphin/files/, games-emulation/dolphin/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-emulation/dolphin/dolphin-5.0.ebuild games-emulation/dolphin/files/dolphin-5.0-no-pie.patch X-VCS-Directories: games-emulation/dolphin/ games-emulation/dolphin/files/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: 5c1629567172efd3e05e6b9629d18f8fb98c485e X-VCS-Branch: master Date: Sun, 22 Jul 2018 21:06:39 +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-Archives-Salt: 4bccf7ec-be3b-4ddd-bbf9-5411e83e341e X-Archives-Hash: 864534dcc5391352b58bcb04460320c7 commit: 5c1629567172efd3e05e6b9629d18f8fb98c485e Author: Sergei Trofimovich gentoo org> AuthorDate: Sun Jul 22 20:59:04 2018 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Sun Jul 22 21:06:31 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c162956 games-emulation/dolphin: fix crash on pie-by-default profiles Disable PIE-compatible code generation via CXXFLAGS+=-fno-pie. Before upstream fix: https://github.com/dolphin-emu/dolphin/commit/daa03cd1060cc826aca93a1dffc6e94bc6af6d5f dolphin assumed executable image to be in low addresses (<2GB) and hardcoded 32-bit absolute addresses during JIT phase. PIE-compatible code does not have this restriction and allows mapping binaries above 2GB area (and breaks dolphin's JIT). Strictly speaking -no-pie (link-time flag) does not or guarantee or require low address mapping for binary if it was already built as PIC/PIE. But -fno-pie imposes additional restrictions on generated code by GCC and makes -no-pie to take effect. We don't need this fix for live ebuild. Closes: https://bugs.gentoo.org/640124 Package-Manager: Portage-2.3.43, Repoman-2.3.10 games-emulation/dolphin/dolphin-5.0.ebuild | 1 + .../dolphin/files/dolphin-5.0-no-pie.patch | 26 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/games-emulation/dolphin/dolphin-5.0.ebuild b/games-emulation/dolphin/dolphin-5.0.ebuild index 65b49e8a79d..908b571cf42 100644 --- a/games-emulation/dolphin/dolphin-5.0.ebuild +++ b/games-emulation/dolphin/dolphin-5.0.ebuild @@ -73,6 +73,7 @@ DEPEND="${RDEPEND} PATCHES=( "${FILESDIR}"/${P}-CHAR_WIDTH-collision.patch "${FILESDIR}"/${P}-xgetbv.patch + "${FILESDIR}"/${P}-no-pie.patch ) src_prepare() { diff --git a/games-emulation/dolphin/files/dolphin-5.0-no-pie.patch b/games-emulation/dolphin/files/dolphin-5.0-no-pie.patch new file mode 100644 index 00000000000..949e42e50de --- /dev/null +++ b/games-emulation/dolphin/files/dolphin-5.0-no-pie.patch @@ -0,0 +1,26 @@ +Disable PIE-compatible code generation via -fno-pie. + +Before upstream fix: +https://github.com/dolphin-emu/dolphin/commit/daa03cd1060cc826aca93a1dffc6e94bc6af6d5f +dolphin assumed executable image to be in low addresses (<2GB) +and hardcoded 32-bit absolute addresses during JIT phase. + +PIE-compatible code does not have this restriction and +allows mapping binaries above 2GB area (and breaks dolphin's JIT). + +Strictly speaking -no-pie (link-time flag) does not or guarantee +or require low address mapping for binary if it was already built +as PIC/PIE. + +But -fno-pie imposes additional restrictions on generated code by GCC +and makes -no-pie to take effect. +Bug: https://bugs.gentoo.org/640124 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -189,4 +189,4 @@ if(NOT ENABLE_GENERIC) + set(_M_X86_64 1) +- add_definitions(-D_M_X86=1 -D_M_X86_64=1 -msse2) +- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fno-pie") ++ add_definitions(-D_M_X86=1 -D_M_X86_64=1 -msse2 -fno-pie) ++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fno-pie -no-pie") + else()