You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-full-overlay/app-crypt/rotix/files/rotix-0.83-cc-cflags-lflags...

62 lines
1.4 KiB

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