Skip to content

Commit d0bd269

Browse files
committed
Merge #936: Fix gen_context/ASM build on ARM
c848352 Makefile.am: Don't pass a variable twice (Tim Ruffing) 2161f31 Makefile.am: Honor config when building gen_context (Tim Ruffing) 99f47c2 gen_context: Don't use external ASM because it complicates the build (Tim Ruffing) Pull request description: Obsoletes #935. ACKs for top commit: gmaxwell: ACK c848352 looks good and works here. Undefign is kinda yuck, but it is already doing it and it's cleaner than the obvious alternatives. sipa: utACK c848352. I verified that building still works on ARM64, but without asm of course. Tree-SHA512: fc5500688b2aecc4238e21c32f65559bcbfd1e83d1ae4d2c8e15573e94613667731064d8b5f2b9e4209016d88118263802ff4b9a73c1f37c224ccf2a4a1d6536
2 parents 98e0358 + c848352 commit d0bd269

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Makefile.am

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ if VALGRIND_ENABLED
101101
tests_CPPFLAGS += -DVALGRIND
102102
noinst_PROGRAMS += valgrind_ctime_test
103103
valgrind_ctime_test_SOURCES = src/valgrind_ctime_test.c
104-
valgrind_ctime_test_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_LIBS) $(COMMON_LIB)
104+
valgrind_ctime_test_LDADD = libsecp256k1.la $(SECP_LIBS) $(COMMON_LIB)
105105
endif
106106
if !ENABLE_COVERAGE
107107
tests_CPPFLAGS += -DVERIFY
@@ -129,7 +129,7 @@ CPPFLAGS_FOR_BUILD +=-I$(top_srcdir) -I$(builddir)/src
129129
gen_context_OBJECTS = gen_context.o
130130
gen_context_BIN = gen_context$(BUILD_EXEEXT)
131131
gen_%.o: src/gen_%.c src/libsecp256k1-config.h
132-
$(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c $< -o $@
132+
$(CC_FOR_BUILD) $(DEFS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c $< -o $@
133133

134134
$(gen_context_BIN): $(gen_context_OBJECTS)
135135
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $^ -o $@

src/gen_context.c

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
/* We can't require the precomputed tables when creating them. */
1414
#undef USE_ECMULT_STATIC_PRECOMPUTATION
1515

16+
/* In principle we could use external ASM, but this yields only a minor speedup in
17+
build time and it's very complicated. In particular when cross-compiling, we'd
18+
need to build the external ASM for the build and the host machine. */
19+
#undef USE_EXTERNAL_ASM
20+
1621
#include "include/secp256k1.h"
1722
#include "assumptions.h"
1823
#include "util.h"

0 commit comments

Comments
 (0)