From 3441db2f4366273ea4bf6f00b663b95344ea40a0 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Fri, 16 Feb 2018 01:11:53 -0800 Subject: Add ability to build ffmpeg and libass into PIEs --- pkg/ffmpeg/gen.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'pkg/ffmpeg/gen.lua') diff --git a/pkg/ffmpeg/gen.lua b/pkg/ffmpeg/gen.lua index f6ca6e68..c8e38dc5 100644 --- a/pkg/ffmpeg/gen.lua +++ b/pkg/ffmpeg/gen.lua @@ -1,5 +1,4 @@ local arch = 'x86' - cflags{ '-Wno-deprecated-declarations', '-Wno-discarded-qualifiers', @@ -11,14 +10,17 @@ cflags{ '-I $builddir/pkg/alsa-lib/include', '-I $builddir/pkg/libressl/include', } - -set('nasmflags', { +nasmflags{ '-i $srcdir/', '-i $srcdir/libavcodec/'..arch..'/', '-i $srcdir/libavutil/'..arch..'/', '-f elf64', '-P $outdir/config.asm', -}) +} +if config.target.pie then + cflags{'-D PIC'} + nasmflags{'-D PIC'} +end build('awk', '$outdir/config.asm', '$dir/options.h', { expr=[['{print "%define " substr($$0, length("#define ") + 1)}']], -- cgit v1.2.3