fi
elif [ "$SYS" = WINDOWS -o "$SYS" = CYGWIN ]; then
ASFLAGS="$ASFLAGS -f win64"
- # only the GNU toolchain is inconsistent in prefixing function names with _
- [ $compiler = GNU ] && cc_check "" "-S" && grep -q "_main:" conftest && ASFLAGS="$ASFLAGS -DPREFIX"
- [ $compiler = GNU ] && LDFLAGS="$LDFLAGS -Wl,--dynamicbase,--nxcompat,--tsaware"
- [ $compiler = GNU ] && RCFLAGS="--target=pe-x86-64 $RCFLAGS"
+ if [ $compiler = GNU ]; then
+ # only the GNU toolchain is inconsistent in prefixing function names with _
+ cc_check "" "-S" && grep -q "_main:" conftest && ASFLAGS="$ASFLAGS -DPREFIX"
+ cc_check "" "-Wl,--high-entropy-va" && LDFLAGS="$LDFLAGS -Wl,--high-entropy-va"
+ LDFLAGS="$LDFLAGS -Wl,--dynamicbase,--nxcompat,--tsaware"
+ LDFLAGSCLI="$LDFLAGSCLI -Wl,--image-base,0x140000000"
+ SOFLAGS="$SOFLAGS -Wl,--image-base,0x180000000"
+ RCFLAGS="--target=pe-x86-64 $RCFLAGS"
+ fi
else
ASFLAGS="$ASFLAGS -f elf64"
fi
if [ $compiler_style = GNU ]; then
if cc_check '' -std=gnu99 'for( int i = 0; i < 9; i++ );' ; then
- CFLAGS="$CFLAGS -std=gnu99"
+ CFLAGS="$CFLAGS -std=gnu99 -D_POSIX_C_SOURCE=200112L -D_GNU_SOURCE"
elif cc_check '' -std=c99 'for( int i = 0; i < 9; i++ );' ; then
CFLAGS="$CFLAGS -std=c99 -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE"
elif ! cc_check '' '' 'for( int i = 0; i < 9; i++ );' ; then
fi
if [ "$ffms" = "auto" ] ; then
- ffms_major="2"; ffms_minor="16"; ffms_micro="2"; ffms_bump="0"
+ ffms_major="2"; ffms_minor="21"; ffms_micro="0"; ffms_bump="0"
ffms="no"
if ${cross_prefix}pkg-config --exists ffms2 2>/dev/null; then
grep "extern.*x264" ${SRCPATH}/x264.h | sed -e "s/.*\(x264\w*\)\W.*/\1 DATA/;" >> x264.def
else
echo 'IMPLIBNAME=libx264.dll.a' >> config.mak
- echo "SOFLAGS=-shared -Wl,--out-implib,\$(IMPLIBNAME) -Wl,--enable-auto-image-base $SOFLAGS" >> config.mak
+ echo "SOFLAGS=-shared -Wl,--out-implib,\$(IMPLIBNAME) $SOFLAGS" >> config.mak
fi
elif [ "$SYS" = "MACOSX" ]; then
echo "SOSUFFIX=dylib" >> config.mak