Commit Graph
364 Commits
Author SHA1 Message Date
Frank Denis 180ee26d06 Add -Wno-unknown-pragmas if supported 2022-11-16 22:24:14 +01:00
Frank Denis 63a46474e4 Repair CFLAGS/ CWFLAGS mixup 2022-11-16 13:42:47 +01:00
Frank Denis d264b5cfe5 Nits 2022-11-14 23:44:21 +01:00
Frank Denis 0fc788d6af -mcpu=native -> -mtune=native 2022-11-14 23:23:34 +01:00
Jørgen P. TjernøandFrank Denis 100ccb452d Portability improvements (#1105)
* Move `raise` code to be behind an autoconf check

This moves the call to `raise` behind a `HAVE_RAISE` autoconf check,
in addition to `__wasm__`. This is intended to help porting to
other platforms that don't support `raise` (e.g. modern game consoles).

* Add autoconf check for `sysconf`

Only try to invoke `sysconf` if the target platform supports it, and
don't warn about unknown page size if `PAGE_SIZE` was defined. Add an
include for `sys/param.h` to increase likelihood of finding `PAGE_SIZE`.
This is intended to help porting to other platforms that don't support
`sysconf` (e.g. modern game consoles) that have a fixed hardware page
size.

* Don't try to use raise & sysconf in a WASI environment

Co-authored-by: Frank Denis <124872+jedisct1@users.noreply.github.com>
2021-10-09 18:39:02 +02:00
Frank Denis 4a64ce1836 WASI: remove wasi-sdk dependency; build module with zig 2021-07-19 12:36:29 +02:00
Frank Denis 54b8a00051 Update project URL and regen autoconf files 2021-05-25 19:18:43 +02:00
Frank Denis b5b62722b7 Autoconf update & regen 2021-05-22 12:21:15 +02:00
Frank Denis fd8215d29d wasi-libc exposes getpid() but it doesn't work without emulation 2021-05-22 11:57:23 +02:00
Ryan 2b5f8f2b68 s/eabi/eabi*/g in configure scripts to support eabihf (#977) 2020-07-03 11:45:52 +02:00
Frank Denis ecbe5316dd Disable PIE/PIC/SP/async-unwind on eabi 2020-06-30 07:43:28 +02:00
Frank Denis 6bae891702 Don't add linker flags with the emscripten target
Regen
2020-05-26 17:59:19 +02:00
Frank Denis b16da4f281 Move AC_USE_SYSTEM_EXTENSIONS up 2020-05-26 14:26:24 +02:00
Frank Denis b69159b5f8 Define _FORTIFY_SOURCE only on linux-gnu 2019-12-04 23:30:37 +01:00
Frank Denis 46afa6c3a9 Undefine _FORTIFY_SOURCE on MinGW - Required for current MinGW versions 2019-12-04 21:04:39 +01:00
Frank Denis ad9cb57a4e Use AX_ADD_FORTIFY_SOURCE
Include a workaround for newer versions of MingW
2019-11-11 01:07:05 +01:00
Frank Denis 5c804e1ac8 Better getentropy() usability checks 2019-10-23 18:23:31 +02:00
Frank Denis 146ce11b11 Use -fno-stack-check as an alternative to -ffreestanding 2019-09-17 15:43:25 +02:00
Frank Denis 0428e7baad Merge branch 'stable' of github.com:jedisct1/libsodium into stable
* 'stable' of github.com:jedisct1/libsodium:
  Add a workaround for broken Xcode 11 beta versions
2019-08-29 18:21:34 +02:00
Frank Denis 203220116a Temporarily disable getentropy()/getrandom() when using ASAN
ASAN assumes a recent version of the C library has been installed and
may end up intercepting functions that didn't exist if the actual C
library is old.
2019-08-29 17:48:20 +02:00
Frank Denis d1e33bbc71 Add a workaround for broken Xcode 11 beta versions 2019-08-26 15:35:12 +02:00
Frank Denis f7695fd634 Use AC_LINK_IFELSE for everything using inline assembly 2019-08-16 13:09:57 +02:00
Frank Denis 4b448b5095 Use AC_LINK_IFELSE instead of _COMPILE_IFELSE for cpuid detection
This apparently works around a bug on OpenSuSE on ARM and PPC when
LTO is enabled.

Still, as documented, LTO shouldn't be used when compiling the library.
2019-08-16 12:28:42 +02:00
Frank Denis 940ef42797 1.0.18 2019-05-30 21:57:51 +02:00
Frank Denis eebf2255ca Regen 2019-03-30 11:25:40 +01:00
Frank Denis dfa8222d27 POSIX threads can be available while mutexes are not implemented
This is the odd case of WASI right now
2019-03-30 11:23:20 +01:00
Frank Denis 697a371a42 Don't enable the stack protector on unknown operating systems 2019-03-16 00:21:31 +01:00
Luca Boccassi ecdcf55173 Add -pthread to pkgconfig's Libs.private if enabled
Allows static builds to correctly inherit the pthread dependency when
used with pkg-config --static --libs libsodium

AC_SUBST doesn't require explicit values

Regen autoconf

Fixes #800
2019-01-15 00:29:20 +01:00
Frank Denis c2a98a170f Try -ftree-vectorize and -ftree-slp-vectorize for optimized builds 2019-01-07 12:26:30 +01:00
Frank Denis 4adf25c39f Bump DLL version 2019-01-06 17:25:35 +01:00
Frank Denis 462e9a648b local-dynamic is enough 2019-01-06 05:04:34 +01:00
Frank Denis 79d6a211b2 Set tls-model only if TLS is supported 2019-01-06 04:52:41 +01:00
Frank Denis 0157a378ca Enable -ftls-model=global-dynamic if available 2019-01-06 04:45:50 +01:00
Frank Denis b7cb241eb9 Bump SODIUM_LIBRARY_VERSION_MINOR 2019-01-05 22:09:32 +01:00
Frank Denis a01c5f8fd8 Add a conditional to enable retpoline support
Using retpoline in userland code that doesn't run arbitrary code is
questionable to start with.

Linux is also getting SPECTRE v2 userspace-to-userspace protection.

In addition, some platforms have a gcc version that advertises
support for retpolines, but the resulting binaries simply don't work
or cannot be linked.

So, do not enable this by default. Let builders choose if they
really want to enable this in their builds.
2019-01-04 12:43:47 +01:00
Frank Denis ef3e5aadc7 Don't try to enable retpolines on Emscripten & pnacl 2018-12-30 13:45:09 +01:00
Frank Denis f3ce049a98 Bump to 1.0.17
Not released yet. This is just to encourage people to test the current
code.
2018-12-30 12:04:52 +01:00
Frank Denis b1b031106c ISODATE is not used 2018-12-26 23:10:56 +01:00
Frank Denis 762e5136ed Merge old compiler detection with AVX512f support detection
Maybe
fixes #786
2018-11-30 15:18:52 +01:00
Frank Denis e60bb52a33 Disable AVX512 when using ancient versions of GCC 2018-10-31 10:38:09 +01:00
David Carlier b3ba348d08 Provides explicit_memset supports/NetBSD.
Similar to explicit_bzero function is to defeat
compiler optimisation.
2018-09-29 19:19:23 +01:00
Frank Denis bc7eb925bb Clarify what --disable-asm does 2018-07-03 18:01:27 +02:00
Frank Denis 28e62a6c86 Use only -mindirect-branch=thunk / -mretpoline for now
Move the application of these flags up
2018-02-21 01:59:15 +01:00
Frank Denis 1655dede9f Add retpoline support for clang
Assembly implementations don't seem to be using any indirect calls
2018-02-21 01:52:43 +01:00
Loganaden Velvindron 1203d721ce Add spectre v2 migitations for GCC 2018-02-18 18:58:24 +04:00
Frank Denis 673b2b2b1e Revert "Check for -mretpoline / -zretpolineplt support"
This reverts commit 93887f179d.
2018-01-17 01:28:35 +01:00
Frank Denis 794ec886e7 Check for __aarch64__ instead of __ARM_NEON for 128-bit arithmetic 2018-01-07 15:40:27 +01:00
Frank Denis 93887f179d Check for -mretpoline / -zretpolineplt support 2018-01-04 18:04:39 +01:00
Frank Denis 764656443f Check if we can use inline asm code, not only on x86_64 2017-12-31 01:23:58 +01:00
Frank Denis fff87d50dd Restore the __EMSCRIPTEN__ check for 128-bit usage 2017-12-27 00:28:41 +01:00