mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-20 02:25:14 -07:00
Use -O3 instead of -Ofast in dist-build scripts as well
This commit is contained in:
parent
7b5c887707
commit
9fe76acddd
@ -71,7 +71,7 @@ build_macos() {
|
|||||||
|
|
||||||
## macOS arm64
|
## macOS arm64
|
||||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
||||||
export CFLAGS="-Ofast -arch arm64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
export CFLAGS="-O3 -arch arm64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
||||||
export LDFLAGS="-arch arm64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
export LDFLAGS="-arch arm64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -81,7 +81,7 @@ build_macos() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
## macOS x86_64
|
## macOS x86_64
|
||||||
export CFLAGS="-Ofast -arch x86_64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
export CFLAGS="-O3 -arch x86_64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
||||||
export LDFLAGS="-arch x86_64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
export LDFLAGS="-arch x86_64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -96,7 +96,7 @@ build_ios() {
|
|||||||
export SDK="${BASEDIR}/SDKs/iPhoneOS.sdk"
|
export SDK="${BASEDIR}/SDKs/iPhoneOS.sdk"
|
||||||
|
|
||||||
## 32-bit iOS
|
## 32-bit iOS
|
||||||
export CFLAGS="-Ofast -mthumb -arch armv7 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
export CFLAGS="-O3 -mthumb -arch armv7 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||||
export LDFLAGS="-mthumb -arch armv7 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
export LDFLAGS="-mthumb -arch armv7 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -105,7 +105,7 @@ build_ios() {
|
|||||||
make -j${PROCESSORS} install || exit 1
|
make -j${PROCESSORS} install || exit 1
|
||||||
|
|
||||||
## 32-bit armv7s iOS
|
## 32-bit armv7s iOS
|
||||||
export CFLAGS="-Ofast -mthumb -arch armv7s -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
export CFLAGS="-O3 -mthumb -arch armv7s -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||||
export LDFLAGS="-mthumb -arch armv7s -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
export LDFLAGS="-mthumb -arch armv7s -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -114,7 +114,7 @@ build_ios() {
|
|||||||
make -j${PROCESSORS} install || exit 1
|
make -j${PROCESSORS} install || exit 1
|
||||||
|
|
||||||
## 64-bit iOS
|
## 64-bit iOS
|
||||||
export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
export CFLAGS="-O3 -arch arm64 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||||
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -130,7 +130,7 @@ build_ios_simulator() {
|
|||||||
|
|
||||||
## arm64 simulator
|
## arm64 simulator
|
||||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
||||||
export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
export CFLAGS="-O3 -arch arm64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||||
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -140,7 +140,7 @@ build_ios_simulator() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
## i386 simulator
|
## i386 simulator
|
||||||
export CFLAGS="-Ofast -arch i386 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
export CFLAGS="-O3 -arch i386 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||||
export LDFLAGS="-arch i386 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
export LDFLAGS="-arch i386 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -149,7 +149,7 @@ build_ios_simulator() {
|
|||||||
make -j${PROCESSORS} install || exit 1
|
make -j${PROCESSORS} install || exit 1
|
||||||
|
|
||||||
## x86_64 simulator
|
## x86_64 simulator
|
||||||
export CFLAGS="-Ofast -arch x86_64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
export CFLAGS="-O3 -arch x86_64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||||
export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -164,7 +164,7 @@ build_watchos() {
|
|||||||
export SDK="${BASEDIR}/SDKs/WatchOS.sdk"
|
export SDK="${BASEDIR}/SDKs/WatchOS.sdk"
|
||||||
|
|
||||||
# 32-bit watchOS
|
# 32-bit watchOS
|
||||||
export CFLAGS="-Ofast -mthumb -arch armv7k -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
export CFLAGS="-O3 -mthumb -arch armv7k -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||||
export LDFLAGS="-mthumb -arch armv7k -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
export LDFLAGS="-mthumb -arch armv7k -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -173,7 +173,7 @@ build_watchos() {
|
|||||||
make -j${PROCESSORS} install || exit 1
|
make -j${PROCESSORS} install || exit 1
|
||||||
|
|
||||||
## 64-bit arm64_32 watchOS
|
## 64-bit arm64_32 watchOS
|
||||||
export CFLAGS="-Ofast -mthumb -arch arm64_32 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
export CFLAGS="-O3 -mthumb -arch arm64_32 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||||
export LDFLAGS="-mthumb -arch arm64_32 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
export LDFLAGS="-mthumb -arch arm64_32 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -182,7 +182,7 @@ build_watchos() {
|
|||||||
make -j${PROCESSORS} install || exit 1
|
make -j${PROCESSORS} install || exit 1
|
||||||
|
|
||||||
## 64-bit arm64 watchOS
|
## 64-bit arm64 watchOS
|
||||||
export CFLAGS="-Ofast -mthumb -arch arm64 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
export CFLAGS="-O3 -mthumb -arch arm64 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||||
export LDFLAGS="-mthumb -arch arm64 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
export LDFLAGS="-mthumb -arch arm64 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -198,7 +198,7 @@ build_watchos_simulator() {
|
|||||||
|
|
||||||
## arm64 simulator
|
## arm64 simulator
|
||||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
||||||
export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
export CFLAGS="-O3 -arch arm64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||||
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -208,7 +208,7 @@ build_watchos_simulator() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
## i386 simulator
|
## i386 simulator
|
||||||
export CFLAGS="-Ofast -arch i386 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
export CFLAGS="-O3 -arch i386 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||||
export LDFLAGS="-arch i386 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
export LDFLAGS="-arch i386 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -217,7 +217,7 @@ build_watchos_simulator() {
|
|||||||
make -j${PROCESSORS} install || exit 1
|
make -j${PROCESSORS} install || exit 1
|
||||||
|
|
||||||
## x86_64 simulator
|
## x86_64 simulator
|
||||||
export CFLAGS="-Ofast -arch x86_64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
export CFLAGS="-O3 -arch x86_64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||||
export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -232,7 +232,7 @@ build_tvos() {
|
|||||||
export SDK="${BASEDIR}/SDKs/AppleTVOS.sdk"
|
export SDK="${BASEDIR}/SDKs/AppleTVOS.sdk"
|
||||||
|
|
||||||
## 64-bit tvOS
|
## 64-bit tvOS
|
||||||
export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK} -mtvos-version-min=${TVOS_VERSION_MIN}"
|
export CFLAGS="-O3 -arch arm64 -isysroot ${SDK} -mtvos-version-min=${TVOS_VERSION_MIN}"
|
||||||
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mtvos-version-min=${TVOS_VERSION_MIN}"
|
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mtvos-version-min=${TVOS_VERSION_MIN}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -248,7 +248,7 @@ build_tvos_simulator() {
|
|||||||
|
|
||||||
## arm64 simulator
|
## arm64 simulator
|
||||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
||||||
export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
|
export CFLAGS="-O3 -arch arm64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
|
||||||
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
|
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -258,7 +258,7 @@ build_tvos_simulator() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
## x86_64 simulator
|
## x86_64 simulator
|
||||||
export CFLAGS="-Ofast -arch x86_64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
|
export CFLAGS="-O3 -arch x86_64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
|
||||||
export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
|
export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -272,7 +272,7 @@ build_visionos() {
|
|||||||
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
|
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
|
||||||
export SDK="${BASEDIR}/SDKs/XROS.sdk"
|
export SDK="${BASEDIR}/SDKs/XROS.sdk"
|
||||||
|
|
||||||
export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK}"
|
export CFLAGS="-O3 -arch arm64 -isysroot ${SDK}"
|
||||||
export LDFLAGS="-arch arm64 -isysroot ${SDK}"
|
export LDFLAGS="-arch arm64 -isysroot ${SDK}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -287,7 +287,7 @@ build_visionos_simulator() {
|
|||||||
export SDK="${BASEDIR}/SDKs/XRSimulator.sdk"
|
export SDK="${BASEDIR}/SDKs/XRSimulator.sdk"
|
||||||
|
|
||||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
||||||
export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK}"
|
export CFLAGS="-O3 -arch arm64 -isysroot ${SDK}"
|
||||||
export LDFLAGS="-arch arm64 -isysroot ${SDK}"
|
export LDFLAGS="-arch arm64 -isysroot ${SDK}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -304,7 +304,7 @@ build_catalyst() {
|
|||||||
|
|
||||||
## arm64 catalyst
|
## arm64 catalyst
|
||||||
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
|
||||||
export CFLAGS="-Ofast -arch arm64 -target arm64-apple-ios13.1-macabi -isysroot ${SDK}"
|
export CFLAGS="-O3 -arch arm64 -target arm64-apple-ios13.1-macabi -isysroot ${SDK}"
|
||||||
export LDFLAGS="-arch arm64 -target arm64-apple-ios13.1-macabi -isysroot ${SDK}"
|
export LDFLAGS="-arch arm64 -target arm64-apple-ios13.1-macabi -isysroot ${SDK}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
@ -314,7 +314,7 @@ build_catalyst() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
## x86_64 catalyst
|
## x86_64 catalyst
|
||||||
export CFLAGS="-Ofast -arch x86_64 -target x86_64-apple-ios13.1-macabi -isysroot ${SDK}"
|
export CFLAGS="-O3 -arch x86_64 -target x86_64-apple-ios13.1-macabi -isysroot ${SDK}"
|
||||||
export LDFLAGS="-arch x86_64 -target x86_64-apple-ios13.1-macabi -isysroot ${SDK}"
|
export LDFLAGS="-arch x86_64 -target x86_64-apple-ios13.1-macabi -isysroot ${SDK}"
|
||||||
|
|
||||||
make distclean >/dev/null 2>&1
|
make distclean >/dev/null 2>&1
|
||||||
|
@ -14,7 +14,7 @@ PROCESSORS=${NPROCESSORS:-3}
|
|||||||
|
|
||||||
mkdir -p $PREFIX || exit 1
|
mkdir -p $PREFIX || exit 1
|
||||||
|
|
||||||
export CFLAGS="-mmacosx-version-min=${MACOS_VERSION_MIN} -Ofast"
|
export CFLAGS="-mmacosx-version-min=${MACOS_VERSION_MIN} -O3"
|
||||||
export LDFLAGS="-mmacosx-version-min=${MACOS_VERSION_MIN}"
|
export LDFLAGS="-mmacosx-version-min=${MACOS_VERSION_MIN}"
|
||||||
|
|
||||||
make distclean >/dev/null
|
make distclean >/dev/null
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
export CFLAGS="-Ofast -fomit-frame-pointer -m32 -march=pentium3 -mtune=westmere"
|
export CFLAGS="-O3 -fomit-frame-pointer -m32 -march=pentium3 -mtune=westmere"
|
||||||
export PREFIX="$(pwd)/libsodium-win32"
|
export PREFIX="$(pwd)/libsodium-win32"
|
||||||
|
|
||||||
if (i686-w64-mingw32-gcc --version >/dev/null 2>&1); then
|
if (i686-w64-mingw32-gcc --version >/dev/null 2>&1); then
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
export CFLAGS="-Ofast -fomit-frame-pointer -m64 -mtune=westmere"
|
export CFLAGS="-O3 -fomit-frame-pointer -m64 -mtune=westmere"
|
||||||
export PREFIX="$(pwd)/libsodium-win64"
|
export PREFIX="$(pwd)/libsodium-win64"
|
||||||
|
|
||||||
if (x86_64-w64-mingw32-gcc --version >/dev/null 2>&1); then
|
if (x86_64-w64-mingw32-gcc --version >/dev/null 2>&1); then
|
||||||
|
Loading…
Reference in New Issue
Block a user