build fixes: using -s on Sun strips the ELF export symbol table, which leads to Bad Things if yer using the GNU linker for some godforsaken reason

This commit is contained in:
Rick V 2019-04-10 04:21:26 -05:00
parent 3150791c5a
commit d4fdffc9c3
No known key found for this signature in database
GPG Key ID: C0EDC8723FDC3465
2 changed files with 10 additions and 6 deletions

View File

@ -49,7 +49,7 @@ libhttp.dll: cacerts.o miniz.o libhttp.o uri.o internal.o
$(CC) -fPIC $(CFLAGS) $^ -s -shared -o $@ -static -lmbedx509 -lmbedtls -lmbedcrypto $(LIBS)
libhttp.so: cacerts.o miniz.o libhttp.o uri.o internal.o
$(CC) -fPIC $(CFLAGS) $^ -s -shared -o $@ -static -lmbedx509 -lmbedtls -lmbedcrypto $(LIBS)
$(CC) $^ -fPIC $(CFLAGS) -shared -o $@ $(LIBS) -lmbedx509 -lmbedtls -lmbedcrypto $(SYS_LIBS)
clean:
-@rm base64enc

View File

@ -4,19 +4,23 @@
### requirements
- mbedtls 2.13.0 or later, for both host and windows
- wget for host (to download Netscape CA bundle from cURL website)
- mbedtls 2.13.0 or later, for both host and target (if cross-compiling)
- wget for host (to download Netscape root certificate store from cURL website)
- Also included is a patch that can be applied to the mbedtls source to enable features like AES-NI in protected mode, plus some networking fixes for win32, see `../contrib/lokinet-bootstrap-winnt/mbedtls-win32.patch`
build:
$ [g]make prepare; [g]make libhttp.[so|dll]
$ make prepare; make libhttp.[so|dll]
if you have installed mbedtls in a different path, define INCLUDE and LIBS with the path to the mbedtls headers, library search path, and any extra system libraries required (libsocket/libnsl on Sun, `ws2_32.lib` on Windows)
## Useful build-time variables
- INCLUDE: path to mbedtls headers
- LIBS: path to mbedtls libraries
- SYS_LIBS: system-specific link libraries (`-lsocket -lnsl` on Sun systems, `-lws2_32` [or `-lwsock32` if IPv6 is disabled] on Windows)
## Usage
- include libhttp.h in your source
- link against libhttp.[so|dll]
-rick
-rick