[Gmp-commit] /var/hg/gmp: Simplify mini-gmp make variables.
mercurial at gmplib.org
mercurial at gmplib.org
Sat Nov 19 15:47:41 UTC 2016
details: /var/hg/gmp/rev/87a3c6696f15
changeset: 17118:87a3c6696f15
user: Niels M?ller <nisse at lysator.liu.se>
date: Sat Nov 19 16:47:01 2016 +0100
description:
Simplify mini-gmp make variables.
diffstat:
ChangeLog | 5 +++++
Makefile.am | 2 +-
mini-gmp/ChangeLog | 12 ++++++++++++
mini-gmp/tests/Makefile | 9 ++++-----
mini-gmp/tests/mini-random.h | 2 +-
5 files changed, 23 insertions(+), 7 deletions(-)
diffs (85 lines):
diff -r c028364bbdf0 -r 87a3c6696f15 ChangeLog
--- a/ChangeLog Fri Nov 18 03:35:20 2016 +0100
+++ b/ChangeLog Sat Nov 19 16:47:01 2016 +0100
@@ -1,3 +1,8 @@
+2016-11-19 Niels Möller <nisse at lysator.liu.se>
+
+ * Makefile.am (check-mini-gmp): Override CFLAGS and CPPFLAGS
+ instead of the deleted EXTRA_CFLAGS.
+
2016-11-18 Niels Möller <nisse at lysator.liu.se>
* Makefile.am (check-mini-gmp): Get CC and EXTRA_CFLAGS right.
diff -r c028364bbdf0 -r 87a3c6696f15 Makefile.am
--- a/Makefile.am Fri Nov 18 03:35:20 2016 +0100
+++ b/Makefile.am Sat Nov 19 16:47:01 2016 +0100
@@ -435,7 +435,7 @@
MINI_GMP_DIR="$$abs_srcdir/mini-gmp" \
LDFLAGS="-L../../.libs" \
LIBS="-lgmp -lm" \
- CC="$(CC)" EXTRA_CFLAGS="$(CFLAGS) -g -I../.." check
+ CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="-I../.." check
clean-mini-gmp:
if [ -d mini-gmp/tests ] ; then \
diff -r c028364bbdf0 -r 87a3c6696f15 mini-gmp/ChangeLog
--- a/mini-gmp/ChangeLog Fri Nov 18 03:35:20 2016 +0100
+++ b/mini-gmp/ChangeLog Sat Nov 19 16:47:01 2016 +0100
@@ -1,3 +1,15 @@
+2016-11-19 Niels Möller <nisse at lysator.liu.se>
+
+ * tests/mini-random.h: Use name "../mini-gmp.h" for include, so we
+ don't need any -I options to the compiler.
+
+ * tests/Makefile: Pass CFLAGS to the linker, as
+ recommended by the GNU coding standard.
+ (CPPFLAGS): New variable, with empty default value.
+ (CFLAGS): Remove the -I flag involving MINI_GMP_DIR, to leave free
+ for overriding on make command line.
+ (EXTRA_CFLAGS): Deleted variable, no longer needed.
+
2016-11-18 Torbjörn Granlund <tg at gmplib.org>
* tests/Makefile: Pass EXTRA_CFLAGS to linker as a intermediate fix.
diff -r c028364bbdf0 -r 87a3c6696f15 mini-gmp/tests/Makefile
--- a/mini-gmp/tests/Makefile Fri Nov 18 03:35:20 2016 +0100
+++ b/mini-gmp/tests/Makefile Sat Nov 19 16:47:01 2016 +0100
@@ -21,8 +21,8 @@
MINI_GMP_DIR=..
CC = gcc
-EXTRA_CFLAGS = -O -Wall -g
-CFLAGS = $(EXTRA_CFLAGS) -I$(MINI_GMP_DIR)
+CFLAGS = -O -Wall -g
+CPPFLAGS =
LDFLAGS =
LIBS = -lgmp -lm -lmcheck
@@ -49,13 +49,12 @@
.PRECIOUS: %.o
%.o: %.c $(MINI_GMP_DIR)/mini-gmp.h hex-random.h mini-random.h
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
testutils.o: $(MINI_GMP_DIR)/mini-gmp.c
-# FIXME: Pass EXTRA_CFLAGS as an emergency hack to solve massive failures.
%: %.o $(MISC_OBJS)
- $(CC) $(EXTRA_CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
# Missing tests include:
# mpz_cmp_d, mpz_popcount, mpz_hamdist, mpz_ui_pow_ui
diff -r c028364bbdf0 -r 87a3c6696f15 mini-gmp/tests/mini-random.h
--- a/mini-gmp/tests/mini-random.h Fri Nov 18 03:35:20 2016 +0100
+++ b/mini-gmp/tests/mini-random.h Sat Nov 19 16:47:01 2016 +0100
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with
the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */
-#include "mini-gmp.h"
+#include "../mini-gmp.h"
#include "hex-random.h"
void mini_urandomb (mpz_t, unsigned long);
More information about the gmp-commit
mailing list