Skip to content

Commit 93a99cd

Browse files
lneelylkn
andauthored
doc: update MBEDTLS-3.x sed commands for current Makefile (#398)
* fix makefile for gentoo systems * doc: update MBEDTLS-3.x sed commands for current Makefile --------- Co-authored-by: lkn <lkn@users.noreply.github.com>
1 parent 4f21980 commit 93a99cd

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

doc/MBEDTLS-3.x.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2026.05.06 Notice
2+
3+
This guide is probably losing relevance in most cases, as the latest distributions have now migrated to (or at least support) `mbedtls` 3.x. If you run an older distribution, you can still follow the guide below to install `mbedtls` 3.x side-by-side with any existing 2.x installations.
4+
15
## mbedtls 3.x Migration Notice
26

37
`pcloudcc` now uses `mbedtls` version 3.x. This may already be included in your distribution, and if it is, you can ignore this section. If you're unlucky enough that your distribution still ships with `mbedtls` 2.x *(looking at you, Debian...)*, then try the following instructions. This has been tested on debian bookworm, **but you may have to adjust for your own distribution -- the command sequence below uses `apt` to install known build dependencies.**
@@ -24,9 +28,9 @@ The symbolic link at the end resolves the ambiguity between `/usr/include/mbedtl
2428
```
2529
# run from the source root directory (e.g., pcloudcc-lneely)
2630
27-
sed -i 's/-lmbedtls/-l:libmbedtls.a/;s/-lmbedcrypto/-l:libmbedcrypto.a/;s/-lmbedx509/-l:libmbedx509.a/' Makefile
28-
sed -i 's/LIBLDFLAGS\t= \$(COMMONFLAGS)/LIBLDFLAGS\t= $(COMMONFLAGS) -L\/usr\/local\/lib\//' Makefile
29-
sed -i '5s/$/ -I\/usr\/local\/include/' Makefile
31+
sed -i 's|[$](shell pkg-config --cflags.*|-I/usr/local/include|' Makefile
32+
sed -i '/^\tMBEDTLS_PKG/,/^\tfi)/d' Makefile
33+
sed -i 's|[$](shell \\$|-L/usr/local/lib -l:libmbedtls.a -l:libmbedx509.a -l:libmbedcrypto.a|' Makefile
3034
find . -type f -name "*.[ch]" -exec sed -i 's/#include <mbedtls/#include <mbedtls3/' {} +
3135
make clean all
3236
```

0 commit comments

Comments
 (0)