-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-libs/randomx: remove -fPIE from compilation flags
Closes: https://bugs.gentoo.org/907872 Signed-off-by: Filip Kobierski <fkobi@pm.me>
- Loading branch information
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
From: Filip Kobierski <fkobi@pm.me> | ||
Date: Wed, 18 Sep 2024 23:16:54 +0200 | ||
Removes -fPIE from the C{,XX}FLAGS | ||
https://bugs.gentoo.org/907872 | ||
--- | ||
CMakeLists.txt | 4 ---- | ||
1 file changed, 4 deletions(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index ebbdff2..539e91b 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -217,7 +217,6 @@ if(TARGET generate-asm) | ||
add_dependencies(randomx generate-asm) | ||
endif() | ||
|
||
-set_property(TARGET randomx PROPERTY POSITION_INDEPENDENT_CODE ON) | ||
set_property(TARGET randomx PROPERTY CXX_STANDARD 11) | ||
set_property(TARGET randomx PROPERTY CXX_STANDARD_REQUIRED ON) | ||
set_property(TARGET randomx PROPERTY PUBLIC_HEADER src/randomx.h) | ||
@@ -232,7 +231,6 @@ add_executable(randomx-tests | ||
src/tests/tests.cpp) | ||
target_link_libraries(randomx-tests | ||
PRIVATE randomx) | ||
-set_property(TARGET randomx-tests PROPERTY POSITION_INDEPENDENT_CODE ON) | ||
set_property(TARGET randomx-tests PROPERTY CXX_STANDARD 11) | ||
|
||
add_executable(randomx-codegen | ||
@@ -240,7 +238,6 @@ add_executable(randomx-codegen | ||
target_link_libraries(randomx-codegen | ||
PRIVATE randomx) | ||
|
||
-set_property(TARGET randomx-codegen PROPERTY POSITION_INDEPENDENT_CODE ON) | ||
set_property(TARGET randomx-codegen PROPERTY CXX_STANDARD 11) | ||
|
||
if(NOT Threads_FOUND AND UNIX AND NOT APPLE) | ||
@@ -268,5 +265,4 @@ if(NOT HAVE_CXX_ATOMICS) | ||
target_link_libraries(randomx-benchmark | ||
PRIVATE "atomic") | ||
endif() | ||
-set_property(TARGET randomx-benchmark PROPERTY POSITION_INDEPENDENT_CODE ON) | ||
set_property(TARGET randomx-benchmark PROPERTY CXX_STANDARD 11) | ||
-- | ||
2.44.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright 1999-2024 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
inherit cmake flag-o-matic | ||
|
||
DESCRIPTION="Proof of work algorithm based on random code execution" | ||
HOMEPAGE="https://github.com/tevador/RandomX" | ||
SRC_URI="https://github.com/tevador/RandomX/archive/v${PV}.tar.gz -> ${P}.tar.gz" | ||
S="${WORKDIR}"/RandomX-${PV} | ||
|
||
LICENSE="BSD" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~arm ~arm64 ~x86" | ||
|
||
PATCHES=( "${FILESDIR}"/${PN}-1.2.1_remove-fPIE.patch ) | ||
|
||
src_configure() { | ||
append-ldflags -Wl,-z,noexecstack | ||
cmake_src_configure | ||
} |