summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2022-11-07 20:18:20 +0100
committerNiels Möller <nisse@lysator.liu.se>2022-11-07 20:18:20 +0100
commit0cecedba16a7f5fd6d87ea49871afd64983cdf44 (patch)
treef62bffd0ffd9677ea48434485ab7c6b6ce5b5cd0
parent42db8e0cccc3b36d422ea5eaf094efccedb625a4 (diff)
downloadnettle-0cecedba16a7f5fd6d87ea49871afd64983cdf44.tar.gz
Add ASM_FLAGS variable to configure.
-rw-r--r--ChangeLog7
-rw-r--r--Makefile.in2
-rw-r--r--aclocal.m42
-rw-r--r--config.make.in1
-rw-r--r--configure.ac2
5 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0246a7dc..33f917e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-11-07 Niels Möller <nisse@lysator.liu.se>
+
+ * configure.ac (ASM_FLAGS): New configure environment variable.
+ * aclocal.m4 (GMP_TRY_ASSEMBLE): Use $ASM_FLAGS.
+ * config.make.in (ASM_FLAGS): Add substitution.
+ * Makefile.in: Use $(ASM_FLAGS) when compiling .asm files.
+
2022-10-31 Niels Möller <nisse@lysator.liu.se>
* configure.ac: (asm_file_list): Add HAVE_NATIVE_poly1305_blocks.
diff --git a/Makefile.in b/Makefile.in
index f4069ab7..16ae452f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -298,7 +298,7 @@ libhogweed.a: $(hogweed_OBJS)
%.$(OBJEXT): %.asm $(srcdir)/m4-utils.m4 $(srcdir)/asm.m4 config.m4 machine.m4
$(M4) $(srcdir)/m4-utils.m4 $(srcdir)/asm.m4 config.m4 machine.m4 $< >$*.s
- $(COMPILE) -c $*.s
+ $(COMPILE) $(ASM_FLAGS) -c $*.s
%.$(OBJEXT): %.c
$(COMPILE) -c $< \
diff --git a/aclocal.m4 b/aclocal.m4
index 15977f10..c87c3fa8 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -302,7 +302,7 @@ AC_DEFUN([GMP_TRY_ASSEMBLE],
[cat >conftest.s <<EOF
[$1]
EOF
-gmp_assemble="$CC $CFLAGS $CPPFLAGS -c conftest.s >conftest.out 2>&1"
+gmp_assemble="$CC $CFLAGS $CPPFLAGS $ASM_FLAGS -c conftest.s >conftest.out 2>&1"
if AC_TRY_EVAL(gmp_assemble); then
cat conftest.out >&AC_FD_CC
ifelse([$2],,:,[$2])
diff --git a/config.make.in b/config.make.in
index f8e1f74e..6aec7c73 100644
--- a/config.make.in
+++ b/config.make.in
@@ -8,6 +8,7 @@ CCPIC = @CCPIC@
CPPFLAGS = @CPPFLAGS@
DEFS = @DEFS@
LDFLAGS = @LDFLAGS@
+ASM_FLAGS = @ASM_FLAGS@
LIBS = @LIBS@
LIBOBJS = @LIBOBJS@
EMULATOR = @EMULATOR@
diff --git a/configure.ac b/configure.ac
index 4e9dceda..d1f30ae8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,6 +121,8 @@ AC_ARG_ENABLE(mini-gmp,
AC_HELP_STRING([--enable-mini-gmp], [Enable mini-gmp, used instead of libgmp.]),,
[enable_mini_gmp=no])
+AC_ARG_VAR(ASM_FLAGS, [Extra flags for processing assembly source files])
+
if test "x$enable_mini_gmp" = xyes ; then
NETTLE_USE_MINI_GMP=1
HOGWEED_EXTRA_SYMBOLS="mpz_*;gmp_*;mpn_*;mp_*;"