-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clean up linkage of libsecp256k1 into libwallycore and Python extension
We have two levels of library embedding: * libsecp256k1.la is linked into libwallycore.la via LIBADD. The FIXME comment in configure.ac contained an assertion that seems to be irrelevant: passing libsecp256k1.la to libtool when linking libwallycore.la indeed does not embed the objects from libsecp256k1.a into libwallycore.a, but it does add a dependency on libsecp256k1.la in libwallycore.la, so any future links against libwallycore.la will automagically pull in libsecp256k1.la. This is exactly the scenario that libtool was conceived to facilitate. Do note one caveat: if both --enable-shared and --enable-static are passed to configure, then libwallycore.la will *not* specify a dependency on libsecp256k1.la, but this is irrelevant since any future links against libwallycore.la will link against libwallycore.so, which *does* contain all of the symbols from libsecp256k1.a, so there is no additional dependency. * libwallycore.la is linked into the Python native extension library. Previously this wasn't really being done at all; rather, all of the libwally-core code was being recompiled into some "combined" objects that would then be linked into the Python extension. This was a needless duplication of work since the compiled objects already exist in libwallycore.a and libsecp256k1.a. Simply link those libraries into the extension. Note that libwally-core does need to be compiled as PIC for this to work, so setup.py passes --with-pic to configure. Additional cleanup: adjust several #include directives to reference libsecp256k1 headers in the configured header search path rather than explicitly specifying paths to the instances beneath src/secp256k1/.
- Loading branch information
Showing
10 changed files
with
23 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters