Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Opus] Build for experimental platforms #3097

Merged
merged 1 commit into from
May 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")