Browse Source

Update a few libs, set clang vs gcc, env tweaks

master
falkTX 4 months ago
parent
commit
3d508a9728
10 changed files with 49 additions and 82 deletions
  1. +1
    -1
      bootstrap-common.sh
  2. +1
    -2
      bootstrap-plugins.sh
  3. +0
    -1
      patches/artyfx/macos-old
  4. +0
    -23
      patches/flac/0020-libFLAC-bitreader.c-Fix-out-of-bounds-read.patch
  5. +12
    -8
      patches/flac/9002-hidden-flac-api.patch
  6. +0
    -11
      patches/lv2/01_plugin-is-project.patch
  7. +0
    -14
      patches/mod-sdk/01_add-makefile.patch
  8. +19
    -3
      setup/check_target.sh
  9. +6
    -6
      setup/env.sh
  10. +10
    -13
      setup/versions.sh

+ 1
- 1
bootstrap-common.sh View File

@@ -204,7 +204,7 @@ fi
# otherwise tests fail
export EXTRA_CFLAGS="-fno-associative-math -frounding-math"

if [ "${MACOS}" -eq 1 ] || [ "${WASM}" -eq 1 ]; then
if [ "${CLANG}" -eq 1 ]; then
export EXTRA_CFLAGS+=" -fno-reciprocal-math"
else
export EXTRA_CFLAGS+=" -fsignaling-nans"


+ 1
- 2
bootstrap-plugins.sh View File

@@ -82,8 +82,7 @@ fi

FFTWF_EXTRAFLAGS="${FFTW_EXTRAFLAGS} --enable-single"

if [ "${TOOLCHAIN_PREFIX}" = "aarch64-linux-gnu" ] || [ "${TOOLCHAIN_PREFIX}" = "arm-linux-gnueabihf" ]; then
FFTWF_EXTRAFLAGS+=" --with-slow-timer"
if [ "${TOOLCHAIN_PREFIX}" = "arm-linux-gnueabihf" ]; then
FFTWF_EXTRAFLAGS+=" --enable-neon"
fi



+ 0
- 1
patches/artyfx/macos-old View File

@@ -1 +0,0 @@
macos

+ 0
- 23
patches/flac/0020-libFLAC-bitreader.c-Fix-out-of-bounds-read.patch View File

@@ -1,23 +0,0 @@
From 2e7931c27eb15e387da440a37f12437e35b22dd4 Mon Sep 17 00:00:00 2001
From: Erik de Castro Lopo <erikd@mega-nerd.com>
Date: Mon, 7 Oct 2019 12:55:58 +1100
Subject: [PATCH 20/63] libFLAC/bitreader.c: Fix out-of-bounds read

Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17069
Testcase: fuzzer_decoder-5670265022840832
---
src/libFLAC/bitreader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/src/libFLAC/bitreader.c
+++ b/src/libFLAC/bitreader.c
@@ -864,7 +864,7 @@ incomplete_lsbs:
cwords = br->consumed_words;
words = br->words;
ucbits = FLAC__BITS_PER_WORD - br->consumed_bits;
- b = br->buffer[cwords] << br->consumed_bits;
+ b = cwords < br->capacity ? br->buffer[cwords] << br->consumed_bits : 0;
} while(cwords >= words && val < end);
}

+ 12
- 8
patches/flac/9002-hidden-flac-api.patch View File

@@ -1,5 +1,7 @@
--- flac-static-1.3.3.orig/include/FLAC++/export.h
+++ flac-static-1.3.3/include/FLAC++/export.h
diff --git a/include/FLAC++/export.h b/include/FLAC++/export.h
index d8dccf5..9728e8a 100644
--- a/include/FLAC++/export.h
+++ b/include/FLAC++/export.h
@@ -56,24 +56,8 @@
* \{
*/
@@ -7,7 +9,7 @@
-#if defined(FLAC__NO_DLL)
#define FLACPP_API
-#elif defined(_MSC_VER)
-#elif defined(_WIN32)
-#ifdef FLACPP_API_EXPORTS
-#define FLACPP_API __declspec(dllexport)
-#else
@@ -22,11 +24,13 @@
-
-#endif
-
/* These #defines will mirror the libtool-based library version number, see
/* These \#defines will mirror the libtool-based library version number, see
* http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning
*/
--- flac-static-1.3.3.orig/include/FLAC/export.h
+++ flac-static-1.3.3/include/FLAC/export.h
diff --git a/include/FLAC/export.h b/include/FLAC/export.h
index 3e3e764..d148a4b 100644
--- a/include/FLAC/export.h
+++ b/include/FLAC/export.h
@@ -56,24 +56,8 @@
* \{
*/
@@ -34,7 +38,7 @@
-#if defined(FLAC__NO_DLL)
#define FLAC_API
-#elif defined(_MSC_VER)
-#elif defined(_WIN32)
-#ifdef FLAC_API_EXPORTS
-#define FLAC_API __declspec(dllexport)
-#else
@@ -49,6 +53,6 @@
-
-#endif
-
/** These #defines will mirror the libtool-based library version number, see
/** These \#defines will mirror the libtool-based library version number, see
* http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning
*/

+ 0
- 11
patches/lv2/01_plugin-is-project.patch View File

@@ -1,11 +0,0 @@
--- lv2-1.12.1+git20151117.orig/lv2/core/lv2core.ttl
+++ lv2-1.12.1+git20151117/lv2/core/lv2core.ttl
@@ -139,7 +139,7 @@ hosts and other tools already <q>underst
lv2:Plugin
a rdfs:Class ,
owl:Class ;
- rdfs:subClassOf lv2:PluginBase ;
+ rdfs:subClassOf lv2:PluginBase , doap:Project ;
rdfs:label "Plugin" ;
rdfs:subClassOf [
a owl:Restriction ;

+ 0
- 14
patches/mod-sdk/01_add-makefile.patch View File

@@ -1,14 +0,0 @@
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..d0dc367
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,8 @@
+PREFIX ?= /usr/local
+
+all:
+clean:
+
+install:
+ install -d $(DESTDIR)$(PREFIX)/lib/lv2
+ cp -rv *.lv2 $(DESTDIR)$(PREFIX)/lib/lv2/

+ 19
- 3
setup/check_target.sh View File

@@ -1,7 +1,11 @@
#!/bin/bash

CLANG=0
GCC=0

CROSS_COMPILING=0
INVALID_TARGET=0

LINUX=0
MACOS=0
MACOS_UNIVERSAL=0
@@ -12,25 +16,32 @@ WIN64=0
function check_target() {
case "${target}" in
"macos"|"Darwin")
CLANG=1
MACOS=1
PAWPAW_SKIP_FORTIFY=1
;;
"macos-universal")
CLANG=1
MACOS=1
MACOS_UNIVERSAL=1
PAWPAW_SKIP_FORTIFY=1
;;
"wasm")
WASM=1
CLANG=1
CROSS_COMPILING=1
WASM=1
PAWPAW_SKIP_FORTIFY=1
PAWPAW_SKIP_LTO=1
;;
"win32"|"MINGW32"*)
GCC=1
WIN32=1
if [ "$(uname -o)" != "Msys" ] && [ "$(uname -o)" != "Cygwin" ]; then
CROSS_COMPILING=1
fi
;;
"win64"|"MINGW64"*)
GCC=1
WIN32=1
WIN64=1
if [ "$(uname -o)" != "Msys" ] && [ "$(uname -o)" != "Cygwin" ]; then
@@ -38,27 +49,32 @@ function check_target() {
fi
;;
"CYGWIN"*|"MSYS"*)
GCC=1
WIN32=1
if [ "$(uname -m)" = "x86_64" ]; then
WIN64=1
fi
;;
"linux"|"Linux")
GCC=1
LINUX=1
;;
"linux-aarch64")
LINUX=1
GCC=1
CROSS_COMPILING=1
LINUX=1
TOOLCHAIN_PREFIX="aarch64-linux-gnu"
TOOLCHAIN_PREFIX_="${TOOLCHAIN_PREFIX}-"
;;
"linux-armhf")
LINUX=1
GCC=1
CROSS_COMPILING=1
LINUX=1
TOOLCHAIN_PREFIX="arm-linux-gnueabihf"
TOOLCHAIN_PREFIX_="${TOOLCHAIN_PREFIX}-"
;;
"linux-i686")
GCC=1
LINUX=1
EXTRA_FLAGS="-m32"
# TOOLCHAIN_PREFIX="i686-linux-gnu"


+ 6
- 6
setup/env.sh View File

@@ -63,8 +63,9 @@ BUILD_FLAGS+=" -fomit-frame-pointer -ftree-vectorize -funroll-loops"
BUILD_FLAGS+=" -fPIC -DPIC -DNDEBUG"
BUILD_FLAGS+=" -fdata-sections -ffunction-sections -fno-common -fvisibility=hidden"

if [ "${MACOS}" -eq 0 ] && [ "${WASM}" -eq 0 ]; then
if [ "${GCC}" -eq 1 ]; then
BUILD_FLAGS+=" -fprefetch-loop-arrays"
BUILD_FLAGS+=" -fno-gnu-unique"
fi

if [ -z "${PAWPAW_SKIP_FORTIFY}" ] || [ "${PAWPAW_SKIP_FORTIFY}" -eq 0 ]; then
@@ -112,8 +113,6 @@ elif [ "${WIN32}" -eq 1 ]; then
BUILD_FLAGS+=" -D__STDC_FORMAT_MACROS=1"
BUILD_FLAGS+=" -D__USE_MINGW_ANSI_STDIO=1"
BUILD_FLAGS+=" -DPTW32_STATIC_LIB"
else
BUILD_FLAGS+=" -fno-gnu-unique"
fi

# anything that talks to db should have this
@@ -138,14 +137,15 @@ elif [ "${WASM}" -eq 1 ]; then
else
LINK_FLAGS+=" -Wl,-O1,--as-needed,--gc-sections,--no-undefined,--strip-all"
if [ "${WIN32}" -eq 1 ]; then
LINK_FLAGS+=" -static -static-libgcc -static-libstdc++ -Wl,-Bstatic"
LINK_FLAGS+=" -static"
fi
LINK_FLAGS+=" -static-libgcc -static-libstdc++ -Wl,-Bstatic"
if [ "${WIN32}" -eq 1 ]; then
if [ "${CROSS_COMPILING}" -eq 0 ] && [ -e "/usr/lib/libssp.a" ]; then
LINK_FLAGS+=" -lssp"
else
LINK_FLAGS+=" -lssp_nonshared"
fi
else
LINK_FLAGS+=" -static-libgcc -static-libstdc++"
fi
fi



+ 10
- 13
setup/versions.sh View File

@@ -21,7 +21,7 @@ LIBOGG_URL=${XIPH_URL}/ogg
LIBVORBIS_VERSION=1.3.7
LIBVORBIS_URL=${XIPH_URL}/vorbis

FLAC_VERSION=1.3.3
FLAC_VERSION=1.3.4
FLAC_URL=${XIPH_URL}/flac

OPUS_VERSION=1.3.1
@@ -64,7 +64,7 @@ GLIB_URL=https://download.gnome.org/sources/glib/${GLIB_MVERSION}
LIBLO_VERSION=0.31
LIBLO_URL=http://download.sourceforge.net/liblo

LV2_VERSION=d97a1a4daff228bdd62c68859959d13077e47026
LV2_VERSION=d97a1a4daff228bdd62c68859959d13077e47026 # 1.18.4
LV2_URL=https://gitlab.com/lv2/lv2.git

SERD_VERSION=0.30.8
@@ -76,17 +76,17 @@ SORD_URL=${DROBILLA_URL}
SRATOM_VERSION=0.6.8
SRATOM_URL=${DROBILLA_URL}

LILV_VERSION=0.24.12
LILV_VERSION=0.24.14
LILV_URL=${DROBILLA_URL}

LV2LINT_VERSION=0.14.0
LV2LINT_VERSION=0.16.2
LV2LINT_URL=https://gitlab.com/OpenMusicKontrollers/lv2lint/-/archive/${LV2LINT_VERSION}

KXSTUDIO_LV2_EXTENSIONS_VERSION=4f6802f9f0ac9f5e2a909e4ab2cfbf71648a1b1d
KXSTUDIO_LV2_EXTENSIONS_VERSION=58010323797754dc6cd50084d456e5ac2e7c034c
KXSTUDIO_LV2_EXTENSIONS_URL=https://github.com/KXStudio/LV2-Extensions.git

MOD_SDK_VERSION=21a80729dde1439dcea03bfafbc42981fb503d8a
MOD_SDK_URL=https://github.com/moddevices/mod-sdk.git
MOD_SDK_VERSION=60abe7176b4e4f46f20a41cdf3d65d909c8d8a34
MOD_SDK_URL=https://github.com/moddevices/mod-lv2-extensions.git

FLUIDSYNTH_VERSION=f65c6ba25fb2c7e37c89fc6a4afc5aa645e208c2 # 1.1.11
FLUIDSYNTH_URL=https://github.com/FluidSynth/fluidsynth.git
@@ -94,7 +94,7 @@ FLUIDSYNTH_URL=https://github.com/FluidSynth/fluidsynth.git
MXML_VERSION=38b044ed8ca2a611ed9ed3e26c4b46416335194e # 3.2
MXML_URL=https://github.com/michaelrsweet/mxml.git

CARLA_VERSION=613e6950581ad0cb3c037fac7f0db89633e099e6
CARLA_VERSION=08af009062d1e542162e7f071f7f667a721235a5 # 2.5.0pre
CARLA_URL=https://github.com/falkTX/Carla.git

# ---------------------------------------------------------------------------------------------------------------------
@@ -105,9 +105,6 @@ LV2LINT_SUPPORTED=1
if [ "${CROSS_COMPILING}" -eq 1 ]; then
LV2LINT_SUPPORTED=0
fi
if [ "${MACOS}" -eq 1 ] && [ "$(uname -r)" = "12.6.0" ]; then
LV2LINT_SUPPORTED=0
fi

# ---------------------------------------------------------------------------------------------------------------------
# bootstrap qt stuff
@@ -123,7 +120,7 @@ fi
QT5_URL=https://download.qt.io/archive/qt/${QT5_MVERSION}/${QT5_VERSION}/submodules

# ---------------------------------------------------------------------------------------------------------------------
# bootstrap carla
# bootstrap carla stuff

FILE_VERSION=5.34
FILE_URL=ftp://ftp.astron.com/pub/file
@@ -156,7 +153,7 @@ else
fi

# ---------------------------------------------------------------------------------------------------------------------
# bootstrap jack
# bootstrap jack stuff

AFTEN_VERSION=0.0.8
AFTEN_URL=http://downloads.sourceforge.net/aften


Loading…
Cancel
Save