summaryrefslogtreecommitdiff
path: root/app-crypt/rotix/files/rotix-0.83-cc-cflags-lflags.patch
blob: 2cb97fdc52acc0cd1b09cba70b2bba98be81acdd (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From 615eaabfa00cbef1b783bd3026fdfa3f45385e53 Mon Sep 17 00:00:00 2001
From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
Date: Thu, 14 Sep 2023 00:20:51 +0300
Subject: [PATCH] Respect CFLAGS, STRIP and CC, append LDFLAGS to linking

--- a/Makefile
+++ b/Makefile
@@ -22,12 +22,6 @@
 
 include Makefile.settings
 
-ifdef DEBUG
-CFLAGS += -g3
-else
-CFLAGS += -O3
-endif
-
 ifdef I18N
 CFLAGS += -DPACKAGE=\"${PACKAGE}\" -D LOCALEDIR=\"${LOCALE}\"
 endif
@@ -39,7 +33,7 @@ endif
 all : rotix po
 
 rotix : rot.o help.o rotix.o
-	$(CC) -Wall $(CFLAGS) -o rotix rot.o help.o rotix.o
+	$(CC) -Wall $(CFLAGS) $(LDFLAGS) $(LFLAGS) -o rotix rot.o help.o rotix.o
 ifdef STRIP
 ifndef DEBUG
 	$(STRIP) rotix
--- a/configure
+++ b/configure
@@ -82,14 +82,7 @@ if [ "$i18n" = "1" ]; then
 	fi;
 fi
 
-if type gcc > /dev/null 2> /dev/null; then
-	echo "CC=gcc" >> Makefile.settings;
-elif type cc > /dev/null 2> /dev/null; then
-	echo "CC=cc" >> Makefile.settings;
-else
-	echo 'Cannot find a C compiler, aborting.'
-	exit 1;
-fi
+echo "CC?=cc" >> Makefile.settings;
 
 if [ "$strip" = "1" ]; then
 	if type strip > /dev/null 2> /dev/null; then
@@ -101,10 +94,7 @@ if [ "$strip" = "1" ]; then
 	else
 		echo 'No strip utility found, cannot remove unnecessary parts from executable.'
 		echo ''
-		echo 'STRIP=0' >> Makefile.settings;
 	fi
-else
-	echo 'STRIP=0' >> Makefile.settings;
 fi
 
 case "$arch" in
-- 
2.41.0