Skip to content

Commit

Permalink
[Opus] Build for experimental platforms (#3097)
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano authored May 28, 2021
1 parent f91f1b4 commit e5c3306
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions O/Opus/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@ sources = [
"65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d"),
]

version = v"1.3.2" # <--- This version number is a lie to build for experimental platforms

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/opus-*/
# On musl, disable stack protection (https://www.openwall.com/lists/musl/2018/09/11/2)
if [[ ${target} == *musl* ]]; then
# On musl, disable stack protection (https://www.openwall.com/lists/musl/2018/09/11/2)
STACK_PROTECTOR="--disable-stack-protector"
elif [[ "${target}" == *-mingw* ]]; then
# Fix error
# /opt/x86_64-w64-mingw32/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld: src/opus_compare.o: in function `fread':
# /opt/x86_64-w64-mingw32/x86_64-w64-mingw32/sys-root/include/stdio.h:812: undefined reference to `__chk_fail'
# See https://github.com/msys2/MINGW-packages/issues/5868#issuecomment-544107564
export LDFLAGS="-lssp"
fi
./configure --prefix=$prefix --host=$target --build=${MACHTYPE} \
Expand All @@ -30,16 +38,16 @@ make install

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = supported_platforms()
platforms = supported_platforms(; experimental=true)

# The products that we will ensure are always built
products = [
LibraryProduct("libopus", :libopus),
]

# Dependencies that must be installed before this package can be built
dependencies = [
dependencies = Dependency[
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; preferred_gcc_version=v"8")
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; preferred_gcc_version=v"8", julia_compat="1.6")

0 comments on commit e5c3306

Please sign in to comment.