diff options
| author | Michael Forney <mforney@mforney.org> | 2018-02-16 01:11:53 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2018-02-16 02:52:34 -0800 |
| commit | 3441db2f4366273ea4bf6f00b663b95344ea40a0 (patch) | |
| tree | d7e9668738139582a3ff6ef746f12393275f7e10 /pkg/ffmpeg/gen.lua | |
| parent | e741f39ad218e529fdb69e3c877ad809ad62b35f (diff) | |
Add ability to build ffmpeg and libass into PIEs
Diffstat (limited to 'pkg/ffmpeg/gen.lua')
| -rw-r--r-- | pkg/ffmpeg/gen.lua | 10 |
1 files changed, 6 insertions, 4 deletions
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)}']], |
