- caused by https://github.com/bitcoin/secp256k1/commit/8881212ebc43e67052ec06dec8beb459769fbab7
- OSX's ar tool doesn't work for empty archives ("ar: no archive members specified")
- repaired by moving entire commit under USE_ASM
Fix build for 64bit field under OSX #70
pull peterdettman wants to merge 1 commits into bitcoin-core:master from peterdettman:osx-64bit changing 1 files +11 −6-
peterdettman commented at 2:54 AM on October 26, 2014: contributor
- peterdettman force-pushed on Oct 27, 2014
-
evoskuil commented at 8:26 PM on October 27, 2014: contributor
Verified compile on OSX 10.10
-
theuni commented at 8:55 PM on October 27, 2014: contributor
Well, the intention for the _common lib was for it to contain anything necessary for bench/test/lib. If we're going to change its meaning to just mean the asm bits, let's be explicit about that. Also, it can be stuffed into a var to avoid adding all the extra if's. Something like:
diff --git a/Makefile.am b/Makefile.am index a9df7d5..9207688 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,8 +1,16 @@ ACLOCAL_AMFLAGS = -I m4 INCLUDES = $(SECP_INCLUDES) lib_LTLIBRARIES = libsecp256k1.la -noinst_LTLIBRARIES = libsecp256k1_common.la -include_HEADERS = include/secp256k1.h +noinst_LTLIBRARIES= + +if USE_ASM +ASM_LIB=libsecp256k1_asm.la +noinst_LTLIBRARIES += $(ASM_LIB) +libsecp256k1_asm_la_SOURCES = src/field_5x52_asm.asm +else +ASM_LIB= +endif + noinst_HEADERS = noinst_HEADERS += src/group.h noinst_HEADERS += src/group_impl.h @@ -33,14 +41,9 @@ noinst_HEADERS += src/field_impl.h pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libsecp256k1.pc -libsecp256k1_common_la_SOURCES = -if USE_ASM -libsecp256k1_common_la_SOURCES += src/field_5x52_asm.asm -endif - libsecp256k1_la_SOURCES = src/secp256k1.c libsecp256k1_la_CPPFLAGS = -I$(top_srcdir)/include $(SECP_INCLUDES) -libsecp256k1_la_LIBADD = libsecp256k1_common.la $(SECP_LIBS) +libsecp256k1_la_LIBADD = $(ASM_LIB) $(SECP_LIBS) noinst_PROGRAMS = if USE_BENCHMARK @@ -54,7 +57,7 @@ if USE_TESTS noinst_PROGRAMS += tests tests_SOURCES = src/tests.c tests_CPPFLAGS = -DVERIFY $(SECP_TEST_INCLUDES) -tests_LDADD = libsecp256k1_common.la $(SECP_LIBS) $(SECP_TEST_LIBS) +tests_LDADD = $(ASM_LIB) $(SECP_LIBS) $(SECP_TEST_LIBS) tests_LDFLAGS = -static TESTS = tests endif -
peterdettman commented at 5:32 AM on October 28, 2014: contributor
@theuni I don't think the definition of common was changed; it's just that it currently only contains asm stuff, and so when not using asm, it would be empty (causing OSX's ar to choke). Adding COMMON_LIB variable would be fine.
- peterdettman force-pushed on Oct 30, 2014
- peterdettman force-pushed on Oct 31, 2014
-
peterdettman commented at 5:07 PM on October 31, 2014: contributor
COMMON_LIB added and rebased
-
e2d66a2c62
Fix build for 64bit field under OSX
- caused by https://github.com/bitcoin/secp256k1/commit/8881212ebc43e67052ec06dec8beb459769fbab7 - OSX's ar tool doesn't work for empty archives ("ar: no archive members specified") - introduce COMMON_LIB variable; leave empty when not using asm - peterdettman force-pushed on Nov 3, 2014
- sipa cross-referenced this on Nov 3, 2014 from issue First compiling with asm and then without leaves the asm code in the binary by sipa
- sipa merged this on Nov 3, 2014
- sipa closed this on Nov 3, 2014
- sipa referenced this in commit 49596769d4 on Nov 3, 2014
- peterdettman deleted the branch on Nov 6, 2014
- ysangkok referenced this in commit e7f4ff4c62 on Mar 19, 2020