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

pull/503/head
Rick V 5 years ago
parent 3150791c5a
commit d4fdffc9c3
No known key found for this signature in database
GPG Key ID: C0EDC8723FDC3465

@ -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) $(CC) -fPIC $(CFLAGS) $^ -s -shared -o $@ -static -lmbedx509 -lmbedtls -lmbedcrypto $(LIBS)
libhttp.so: cacerts.o miniz.o libhttp.o uri.o internal.o 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: clean:
-@rm base64enc -@rm base64enc

@ -4,19 +4,23 @@
### requirements ### requirements
- mbedtls 2.13.0 or later, for both host and windows - mbedtls 2.13.0 or later, for both host and target (if cross-compiling)
- wget for host (to download Netscape CA bundle from cURL website) - 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` - 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: 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 ## Usage
- include libhttp.h in your source - include libhttp.h in your source
- link against libhttp.[so|dll] - link against libhttp.[so|dll]
-rick -rick

Loading…
Cancel
Save