Skip to content

Commit

Permalink
odgi: Apply a patch to be able to build on Linux ARM64
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
  • Loading branch information
martin-g committed Jun 24, 2024
1 parent 85959ce commit 627cffa
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions recipes/odgi/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ package:
source:
url: https://github.com/pangenome/{{ name }}/releases/download/v{{ version }}/{{ name }}-v{{ version }}.tar.gz
sha256: a6db190b782608082b14b42c660389aa18010791de1e2d07e29f7f61d8787754
patches:
- odgi-linux-aarch64.patch # [linux and aarch64]

build:
skip: True # [osx]
Expand Down
26 changes: 26 additions & 0 deletions recipes/odgi/odgi-linux-aarch64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git i/CMakeLists.txt w/CMakeLists.txt
index dc6e9b44..1c34379c 100644
--- i/CMakeLists.txt
+++ w/CMakeLists.txt
@@ -52,7 +52,7 @@ endif()

# Set optimization through command line; see INSTALL.md
if (${CMAKE_BUILD_TYPE} MATCHES Release)
- set(EXTRA_FLAGS "-Ofast -march=native -pipe -msse4.2 -funroll-all-loops") # -fprofile-generate=../pgo")
+ set(EXTRA_FLAGS "-Ofast -march=native -pipe -funroll-all-loops") # -fprofile-generate=../pgo")
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG") # reset CXX_FLAGS to be able to replace -O3 with -Ofast
endif ()

diff --git i/src/main.cpp w/src/main.cpp
index 0300dbd1..68e512d4 100644
--- i/src/main.cpp
+++ w/src/main.cpp
@@ -29,7 +29,7 @@ void odgi_help(char** argv) {

// We make sure to compile main for the lowest common denominator architecture.
// This works on GCC and Clang. But we have to declare main and then define it.
-int main(int argc, char *argv[]) __attribute__((__target__("arch=x86-64")));
+//int main(int argc, char *argv[]) __attribute__((__target__("arch=x86-64")));

int main(int argc, char *argv[]) {
// set a higher value for tcmalloc warnings

0 comments on commit 627cffa

Please sign in to comment.