summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Makefile.in2
-rw-r--r--aclocal.m44
-rw-r--r--config.make.in1
-rw-r--r--configure.ac2
5 files changed, 13 insertions, 3 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 a398d346..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])
@@ -563,7 +563,7 @@ dnl Determine whether the assembler takes powerpc registers with an "r" as
dnl in "r6", or as plain "6". The latter is standard, but NeXT, Rhapsody,
dnl and MacOS-X require the "r" forms.
dnl
-dnl See also mpn/powerpc32/powerpc-defs.m4 which uses the result of this
+dnl See also powerpc64/machine.m4 which uses the result of this
dnl test.
AC_DEFUN([GMP_ASM_POWERPC_R_REGISTERS],
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 c3f0bd8e..9533190a 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_*;"