Skip to content

Commit

Permalink
set O2 as optimization flag to fix runtime error
Browse files Browse the repository at this point in the history
  • Loading branch information
zpc0 committed May 20, 2024
1 parent 340ccb6 commit 5464236
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions monero.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Source0: https://downloads.getmonero.org/cli/%{name}-source-v%{version}.tar.bz2
Source1: https://www.getmonero.org/downloads/hashes.txt
Source2: binaryfate.asc

Patch0: optimize-o2.patch

# for source tarball verification
BuildRequires: coreutils
BuildRequires: gnupg2
Expand Down Expand Up @@ -104,6 +106,7 @@ install -m 0755 build/release/bin/* %{buildroot}%{_bindir}/
%changelog
* Mon May 20 2024 zpc <[email protected]>
- remove broken patch
- set O2 as optimization flag to fix runtime error
* Sun May 19 2024 zpc <[email protected]>
- try to fix runtime error
- print build host cpu info to debug problems
Expand Down
7 changes: 7 additions & 0 deletions optimize-o2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -340,3 +340,3 @@
else()
- set(OPT_FLAGS_RELEASE "-Ofast")
+ set(OPT_FLAGS_RELEASE "-O2")
endif()

0 comments on commit 5464236

Please sign in to comment.