Skip to content

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Apr 9, 2023

  • introduce src/crypto.c as an umbrella source that does nothing else
    than include the selected crypto backend source. Moving this job from
    the built-tool to the C preprocessor.

  • this allows dropping the various techniques to pick the correct crypto backend
    sources in autotools, CMake and other build method. Including the per-backend
    Makefile.<crypto-backend>.inc makefiles.

  • copy a trick from curl and instead of maintaining duplicate source lists for CMake,
    convert the GNU Makefile kept for autotools automatically. Do this in docs,
    examples and src.

    Ref: https://github.com/curl/curl/blob/dfabe8bca218d2524af052bd551aa87e13b8a10b/CMakeLists.txt#L1399-L1413

    Also fixes missing libssh2_setup.h from src/CMakeFiles.txt after 59666e0.

  • move Makefile.inc from root to src.

  • reformat src/Makefile.inc to list each source in separate lines, re-align the
    continuation character and sort the lists alphabetically.

  • update docs/HACKING-CRYPTO accordingly.

  • autotools: update the way we add crypto-backends to LIBS.

  • delete old CSV headers, indent, and merge two lines in docs/Makefile.am and src/Makefile.am.

  • add libssh2.pc to .gitignore, while there.

Closes #941

@vszakats vszakats closed this in 4f0f4bf Apr 10, 2023
@vszakats vszakats deleted the make-unify branch April 10, 2023 09:26
vszakats added a commit to vszakats/libssh2 that referenced this pull request Jun 1, 2023
We repositioned crypto libs in 4f0f4bf
via libssh2#941 and subsequently in d4f58f0
from d93ccf4 via libssh2#1013.

This patch also moves libz accordingly, to unbreak certain build
scenarios.

Reported-by: Kenneth Davidson
Fixes libssh2#1075
Closes #xxxx
vszakats added a commit that referenced this pull request Jun 1, 2023
We repositioned crypto libs in 4f0f4bf
via #941 and subsequently in d4f58f0
from d93ccf4 via #1013.

This patch moves libz accordingly, to unbreak certain build scenarios.

Reported-by: Kenneth Davidson
Regression from 4f0f4bf #941
Fixes #1075
Closes #1077
lampmanyao pushed a commit to lampmanyao/libssh2 that referenced this pull request Jul 16, 2023
We repositioned crypto libs in 4f0f4bf
via libssh2#941 and subsequently in d4f58f0
from d93ccf4 via libssh2#1013.

This patch moves libz accordingly, to unbreak certain build scenarios.

Reported-by: Kenneth Davidson
Regression from 4f0f4bf libssh2#941
Fixes libssh2#1075
Closes libssh2#1077
agreppin pushed a commit to agreppin/libssh2 that referenced this pull request Jul 14, 2024
- introduce `src/crypto.c` as an umbrella source that does nothing else
  than include the selected crypto backend source. Moving this job from
  the built-tool to the C preprocessor.

- this allows dropping the various techniques to pick the correct crypto
  backend sources in autotools, CMake and other build method. Including
  the per-backend `Makefile.<crypto-backend>.inc` makefiles.

- copy a trick from curl and instead of maintaining duplicate source
  lists for CMake, convert the GNU Makefile kept for autotools
  automatically. Do this in `docs`, `examples` and `src`.

  Ref: https://github.com/curl/curl/blob/dfabe8bca218d2524af052bd551aa87e13b8a10b/CMakeLists.txt#L1399-L1413

  Also fixes missing `libssh2_setup.h` from `src/CMakeFiles.txt` after
  59666e0.

- move `Makefile.inc` from root to `src`.

- reformat `src/Makefile.inc` to list each source in separate lines,
  re-align the continuation character and sort the lists alphabetically.

- update `docs/HACKING-CRYPTO` accordingly.

- autotools: update the way we add crypto-backends to `LIBS`.

- delete old CSV headers, indent, and merge two lines in
  `docs/Makefile.am` and `src/Makefile.am`.

- add `libssh2.pc` to `.gitignore`, while there.

Closes libssh2#941
agreppin pushed a commit to agreppin/libssh2 that referenced this pull request Jul 14, 2024
We repositioned crypto libs in 4f0f4bf
via libssh2#941 and subsequently in d4f58f0
from d93ccf4 via libssh2#1013.

This patch moves libz accordingly, to unbreak certain build scenarios.

Reported-by: Kenneth Davidson
Regression from 4f0f4bf libssh2#941
Fixes libssh2#1075
Closes libssh2#1077
vszakats added a commit to vszakats/libssh2 that referenced this pull request Mar 19, 2025
Instead build all crypto backend sources always, and exclude the
inactive ones with guards.

To play better with code checkers and compilers that are blind to
included C sources, e.g. clang with certain compiler warnings and
clang-tidy.

Follow-up to 4f0f4bf libssh2#941
vszakats added a commit to vszakats/libssh2 that referenced this pull request Mar 19, 2025
Instead build all crypto backend sources always, and exclude the
inactive ones with guards.

To play better with code checkers and compilers that are blind to
included C sources, e.g. clang with certain compiler warnings and
clang-tidy.

Follow-up to 4f0f4bf libssh2#941
vszakats added a commit to vszakats/libssh2 that referenced this pull request Mar 19, 2025
Instead build all crypto backend sources always, and exclude the
inactive ones with guards.

To play better with code checkers and compilers that are blind to
included C sources, e.g. clang with certain compiler warnings and
clang-tidy.

We continue to include blowfish.c.

Follow-up to 4f0f4bf libssh2#941
vszakats added a commit to vszakats/libssh2 that referenced this pull request Mar 21, 2025
Instead build all crypto backend sources always, and exclude the
inactive ones with guards.

To play better with code checkers and compilers that are blind to
included C sources, e.g. clang with certain compiler warnings and
clang-tidy.

We continue to include blowfish.c.

Follow-up to 4f0f4bf libssh2#941
vszakats added a commit that referenced this pull request Mar 24, 2025
To play better with code checkers and compilers that are blind to
included C sources, e.g. clang with certain compiler warnings and
clang-tidy.

Follow-up to 4f0f4bf #941
Cherry-picked from #1561
vszakats added a commit that referenced this pull request Mar 24, 2025
Instead build all crypto backend sources always, and exclude inactive
ones with guards.

To play better with code checkers and compilers that are blind to
included C sources, e.g. clang with certain compiler warnings and
clang-tidy.

We continue to include `blowfish.c`.

Follow-up to 4f0f4bf #941
Cherry-picked from #1561
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant