Tracking issue for manual (non-autotools) builds #929

issue real-or-random openend this issue on May 2, 2021
  1. real-or-random commented at 10:16 am on May 2, 2021: contributor

    The current method to build a static library manually (using default options) is:

    0gcc -O2 -c src/secp256k1.c src/precomputed_*.c 
    1ar rcs libsecp256k1.a secp256k1.o precomputed_*.o
    

    (clang also works)

    The goal is to get rid of most of the command line arguments, at least on GCC and clang:

    • -DSECP256K1_BUILD: #928
    • -I #925
    • -D ECMULT_GEN_PREC_BITS=4 -D ECMULT_WINDOW_SIZE=15: See discussion in #918. We could even print the config using #pragma message)
    • -D DUSE_EXTERNAL_ASM: #929 (comment)
    • -Wno-unused-function: We could add a #pragma or better add __attribute__ ((unsused)) to the relevant functions.
    • -Wall -Wextra: We could set this via #pragmas but maybe we should leave this to the user.
    • -O2: I think we should really leave this to the user.
    • Add section to README
    • Add CI jobs to test these builds
  2. real-or-random commented at 8:34 pm on May 2, 2021: contributor

    -Wno-unused-function: We could add a #pragma or better add attribute ((unsused)) to the relevant functions.

    There are no unused functions except for ones that are unneeded because of test harness or module configuration options.

    Sure? I think at least the multimultiplication functions and the scratch space functions are currently unused.

  3. real-or-random cross-referenced this on May 13, 2021 from issue Various improvements related to CFLAGS by real-or-random
  4. real-or-random renamed this:
    Tracking issue for non-autotool builds
    Tracking issue for non-autotools builds
    on Dec 9, 2021
  5. real-or-random commented at 10:56 am on December 20, 2021: contributor

    Now that #1042 has been merged, we need to build multiple modules:

    0gcc -c src/secp256k1.c src/precomputed_*.c -DECMULT_GEN_PREC_BITS=4 -DECMULT_WINDOW_SIZE=15
    1ar rcs libsecp256k1.a secp256k1.o precomputed_*.o
    
  6. real-or-random cross-referenced this on Dec 31, 2021 from issue Signed-digit multi-comb ecmult_gen algorithm by sipa
  7. real-or-random cross-referenced this on Feb 8, 2022 from issue WIP: Add 1:1 CMake File by DesWurstes
  8. elichai cross-referenced this on Apr 3, 2022 from issue How to use the library? by ShaliDaliHaliDa
  9. real-or-random cross-referenced this on Jun 30, 2022 from issue build: Add CMake-based build system by hebasto
  10. real-or-random referenced this in commit d63719fb10 on Jun 30, 2022
  11. real-or-random cross-referenced this on Jun 30, 2022 from issue build: Fix #include "..." paths to get rid of further -I arguments by real-or-random
  12. real-or-random referenced this in commit ac39773ba9 on Jun 30, 2022
  13. real-or-random referenced this in commit 40a3473a9d on Jul 1, 2022
  14. real-or-random referenced this in commit af65d30cc8 on Jul 1, 2022
  15. real-or-random cross-referenced this on Jul 6, 2022 from issue SECP256K1_BUILD sanity checking and USE_FIELD_INV_BUILTIN/USE_SCALAR_INV_BUILTIN simplification. by gmaxwell
  16. real-or-random renamed this:
    Tracking issue for non-autotools builds
    Tracking issue for manual (non-autotools) builds
    on Jul 6, 2022
  17. real-or-random referenced this in commit d0cf55e13a on Jul 6, 2022
  18. real-or-random cross-referenced this on Jul 6, 2022 from issue config: Set preprocessor defaults for ECMULT_* config values by real-or-random
  19. real-or-random cross-referenced this on Dec 7, 2022 from issue Fix backport of bitcoin-core/secp256k1#925 (drop 'include/' prefix from -I) by mattiaferrari02
  20. real-or-random cross-referenced this on Dec 21, 2022 from issue Symbol visibility by real-or-random
  21. real-or-random cross-referenced this on Jan 5, 2023 from issue Create a document for embedded use by gmaxwell
  22. real-or-random added the label documentation on Jan 5, 2023
  23. real-or-random added the label build on Jan 5, 2023
  24. dderjoel referenced this in commit 16062f8875 on May 23, 2023
  25. dderjoel referenced this in commit c65199ef4a on May 23, 2023
  26. hebasto commented at 10:41 am on July 2, 2023: member
    • -Wall -Wextra: We could set this via #pragmas but maybe we should leave this to the user.

    • -O2: I think we should really leave this to the user.

    Agreed, both options should be left to the user.

    When building a shared library, providing the -Wl,--no-undefined option might be a good way to ensure that the resulted library is OK:

    0gcc -O2 -fPIC -c src/secp256k1.c src/precomputed_*.c
    1gcc secp256k1.o precomputed_*.o -shared -Wl,--no-undefined -o libsecp256k1.so
    

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-30 01:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me