summarylogtreecommitdiffstats
path: root/0001-makefile-fix-build-for-Arch-Linux.patch
blob: 5e3e2a481965fb20bb15d8c383090abba4c12879 (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 da7641d4be383e1170ab39bc162480cb1836591e Mon Sep 17 00:00:00 2001
From: graysky <therealgraysky AT proton DOT me>
Date: Sat, 24 Sep 2022 14:12:44 -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 | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/linux64/makefile b/linux64/makefile
index 420801f..a319fc1 100644
--- a/linux64/makefile
+++ b/linux64/makefile
@@ -18,15 +18,17 @@
 #	LFLAGS = -Wl,-M
 #	LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic $(shell pkg-config --static --libs libhwloc) -Wl,-Bstatic $(shell pkg-config --static --libs libcurl) -lstdc++ -Wl,-Bdynamic -ldl

+ALFLAGS = -I.. -I../gwnum -march=x86-64 -DX86_64 -O2 -Wno-unused-result -march=x86-64 -DPORT=8
+
 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 -Wl,-L/usr/local/lib
+LFLAGS = -Wl,-M
 #LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld ../gwnum/polymult.a -lm -lpthread -Wl,-Bstatic -lhwloc -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -lz -lxml2 -ldl -lgmp
-LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld ../gwnum/polymult.a -lm -lpthread -Wl,-Bstatic -lhwloc -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -ldl -lgmp
+LIBS= ../gwnum/gwnum.a ../gwnum/gwnum.ld ../gwnum/polymult.a -lm -lpthread $(shell pkg-config --libs libcurl) -lstdc++ $(shell pkg-config --static --libs hwloc) -lgmp

 FACTOROBJ = factor64.o
 LINUXOBJS = prime.o menu.o cJSON.o ecm.o exponentiate.o pair.o pm1prob.o
--
2.37.3