summarylogtreecommitdiffstats
path: root/0001-makefile-fix-build-for-Arch-Linux.patch
blob: fb7c17f5a206dabc62799f91e5e3bba644019ab6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From 7542155615e1af7f4ea45df986659c41085441e5 Mon Sep 17 00:00:00 2001
From: graysky <therealgraysky AT proton DOT me>
Date: Thu, 14 Mar 2024 15:33:41 -0400
Subject: [PATCH] makefile: fix build for Arch Linux

Fix up for Arch Linux build.  Thanks to Prime95 for the tip around polymult.a lib[1].

1. https://www.mersenneforum.org/showthread.php?t=28094
---
 linux64/makefile | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/linux64/makefile b/linux64/makefile
index 61d130e..639c1bd 100644
--- a/linux64/makefile
+++ b/linux64/makefile
@@ -20,14 +20,17 @@
 #	LIBS = ../gwnum/gwnum.a -lm -lpthread -Wl,-Bstatic $(shell pkg-config --static --libs libhwloc) -Wl,-Bstatic $(shell pkg-config --static --libs libcurl) -lstdc++ -Wl,-Bdynamic -ldl
 
 CC = gcc
-CFLAGS = -I.. -I../gwnum -I/usr/local/include -std=gnu99 -DX86_64 -Wno-unused-result -O2 -DPORT=8
+CFLAGS = ${ALFLAGS}
 
 CPP = g++
-CPPFLAGS = -I.. -I../gwnum -I../../boost_1_76_0 -DX86_64 -std=c++11 -O2 -DPORT=8
+CPPFLAGS = ${ALFLAGS} -std=c++11
+
+LFLAGS = -Wl,-M
 
-LFLAGS = -Wl,-M -Wl,-L/usr/local/lib
 #LIBS = ../gwnum/gwnum.a ../gwnum/polymult.a -lm -lpthread -Wl,-Bstatic -lhwloc -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -lz -lxml2 -ldl -lgmp
-LIBS = ../gwnum/gwnum.a ../gwnum/polymult.a -lm -lpthread -Wl,-Bstatic -lhwloc -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -ldl -lgmp
+LIBS = ../gwnum/gwnum.a ../gwnum/polymult.a -lm -lpthread $(shell pkg-config --libs libcurl) -lstdc++ $(shell pkg-config --static --libs hwloc) -lgmp
+
+ALFLAGS = -I.. -I../gwnum -march=x86-64 -DX86_64 -O2 -Wno-unused-result -march=x86-64 -DPORT=8
 
 FACTOROBJ = factor64.o
 LINUXOBJS = prime.o menu.o cJSON.o ecm.o exponentiate.o pair.o pm1prob.o
-- 
2.44.0