# HG changeset patch # User diego # Date 1155427106 0 # Node ID 829b824a7d338663fd7083cbd20b3e97e13e81f8 # Parent cd9ece839751861df0cf60e5d61aab445c5b0c89 Port ASMALIGN preprocessor macro for .align handling from FFmpeg. diff -r cd9ece839751 -r 829b824a7d33 configure --- a/configure Sat Aug 12 18:33:19 2006 +0000 +++ b/configure Sat Aug 12 23:58:26 2006 +0000 @@ -1698,6 +1698,7 @@ _pthreads=yes _ass=auto _rpath=no +_asmalign_pot=auto for ac_option do case "$ac_option" in # Skip 1st pass @@ -2217,7 +2218,24 @@ echores "failed" die "obsolete binutils version" fi -fi + +echocheck ".align is a power of two" +if test "$_asmalign_pot" = auto ; then +_asmalign_pot=no +cat > $TMPC << EOF +asm (".align 3"); +EOF +cc_check && _asmalign_pot=yes +fi +if test "$_asmalign_pot" = "yes" ; then + _def_asmalign_pot='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"' +else + _def_asmalign_pot='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"' +fi +echores $_asmalign_pot + +fi #if x86 + #FIXME: This should happen before the check for CFLAGS.. if ppc ; then @@ -7642,6 +7660,9 @@ $_def_map_memalign $_def_memalign_hack +/* assembler handling of .align */ +$_def_asmalign_pot + /* Define this if your system has the "alloca.h" header file */ $_def_alloca