MarcoFalke added the label Build system on Aug 23, 2016
MarcoFalke added the label Needs backport on Aug 23, 2016
MarcoFalke added this to the milestone 0.13.1 on Aug 23, 2016
laanwj assigned theuni on Aug 24, 2016
sipa
commented at 5:18 PM on August 26, 2016:
member
Concept ACK
luke-jr
commented at 3:58 AM on August 27, 2016:
member
Concept ACK, but I wonder if we should try to link with -latomic first, in case linking without it merely fails at runtime (or worse, works without providing the atomic guarantees).
laanwj
commented at 11:45 AM on August 30, 2016:
member
Hm, you have a point @luke-jr but I also like the approach of trying -latomic only when necessary. This will make sure that no spurious library is linked that happens to be called 'atomic' on completely unrelated platforms/compilers, and that the configure log clearly states why a certain library is linked.
without it merely fails at runtime (or worse, works without providing the atomic guarantees).
That would be really messed-up. Linking a library or not should not affect program behavior in itself (that's determined during compile time), and missing symbols give an error at link time.
(Maybe something could be concocted with ELF weak symbols that gives this kind of behavior, even making it dependent on the link order, but bleh)
laanwj
commented at 11:45 AM on August 30, 2016:
member
luke-jr
commented at 1:46 AM on August 31, 2016:
member
I agree, it would indeed be messed-up, but wasn't that almost exactly what happened in CVE-2012-1910?
theuni
commented at 3:24 AM on August 31, 2016:
member
Assuming we're only doing link tests, is an AC_SEARCH_LIBS not enough here?
laanwj
commented at 2:02 PM on August 31, 2016:
member
I agree, it would indeed be messed-up, but wasn't that almost exactly what happened in CVE-2012-1910?
IIRC there the problem was linking the wrong library, not forgetting to link a library.
laanwj
commented at 5:52 AM on September 9, 2016:
member
Assuming we're only doing link tests, is an AC_SEARCH_LIBS not enough here?
I think the problem is that it is unspecified which symbols are exported. The requirement is that the atomic library is linked when c++11 atomics are used. How these relate to ELF-level symbols is probably an implementation detail that may change over time.
luke-jr
commented at 6:16 AM on September 9, 2016:
member
main is always exported ;)
laanwj
commented at 6:20 AM on September 9, 2016:
member
I mean these symbols exported by atomic library:
libbitcoin_server.a(libbitcoin_server_a-main.o): In function `std::__atomic_base<long long>::store(long long, std::memory_order)':
/usr/include/c++/6/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
libbitcoin_server.a(libbitcoin_server_a-main.o): In function `std::__atomic_base<long long>::load(std::memory_order) const':
/usr/include/c++/6/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
/usr/include/c++/6/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
libbitcoin_server.a(libbitcoin_server_a-main.o): In function `std::__atomic_base<long long>::store(long
...
Would be easy enough to check for one of them using AC_SEARCH_LIBS, but I think the test in this pull is fine and less dependent on implementation details.
laanwj
commented at 6:58 AM on September 9, 2016:
member
ACK878faac, reproduced with a mipsel-unknown-linux-gnu toolchain (gcc 5.3.0) built with crosstool-ng.
Without this patch it fails, with this patch it proceeds. Haven't tested the executable, but it's a clear step forward at least.
laanwj merged this on Sep 9, 2016
laanwj closed this on Sep 9, 2016
laanwj referenced this in commit 7f8b677aeb on Sep 9, 2016
luke-jr referenced this in commit 147003c73e on Sep 21, 2016
luke-jr
commented at 10:40 PM on September 21, 2016:
member
Ugh, this m4 code is GPL licensed at best... checking with upstream if we can get MIT license on it.
ajtowns
commented at 5:16 AM on September 22, 2016:
member
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2026-04-26 09:16 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me