Summary: | ASTERISK-08987: [patch] OS X/gcc inline optimization incompatability in 1.2.16 | ||
Reporter: | darrell budic (darrell budic) | Labels: | |
Date Opened: | 2007-03-12 11:07:01 | Date Closed: | 2007-06-30 09:20:08 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Core/Configuration |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | utils.c fails to compile with machine:/Users/jeanyves/dev/asterisk/asterisk16/asterisk-16 root# gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -Iinclude -I../include -D_REENTRANT -D_GNU_SOURCE -O6 -fomit-frame-pointer -D__Darwin__ -DPOLLCOMPAT -c -o utils.o utils.c {standard input}:589:Can't relocate expression. Absolute 0 assumed. {standard input}:589:operands given don't match any known 386 instruction {standard input}:3019:Can't relocate expression. Absolute 0 assumed. {standard input}:3019:operands given don't match any known 386 instruction or gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -Iinclude -I../include -D_REENTRANT -D_GNU_SOURCE -O6 -fomit-frame-pointer -D__Darwin__ -DPOLLCOMPAT -c -o utils.o utils.c {standard input}:589:invalid character '%' in mnemonic {standard input}:3019:invalid character '%' in mnemonic A new inline assembly optimization was added in 1.2.16, apple's gcc doesn't like it for some reason I'm not qualified to track down. A work around is this: --- oldlock.h 2007-03-12 10:50:08.000000000 -0500 +++ lock.h 2007-03-12 10:43:41.000000000 -0500 @@ -670,7 +670,7 @@ #include "asterisk/inline_api.h" -#if defined (__i386__) +#if defined (__i386__) && !defined(__APPLE__) AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v), { __asm __volatile ( ****** ADDITIONAL INFORMATION ****** Disscussed on user forums here: http://forums.digium.com/viewtopic.php?t=14232 No disclaimer on file, but you can have the patch. | ||
Comments: | By: Joshua C. Colp (jcolp) 2007-03-12 11:50:15 Fixed in 1.2 as of revision 58832. |