Closed dmik closed 8 years ago
One of the programs that needs this is fontconfig: http://trac.netlabs.org/ports/ticket/82.
You should use '-march=i486' or later. Atomic builtins are not enabled on i386 which is default.
Great! I confirm that it works. I really wonder though why this isn't mentioned in the GCC docs (e.g. the link above). Closing. Thanks @komh.
Well, I just found that I already used this switch (-march=i486
) in mozilla for exactly the same reason. Fun. Perhaps, we should make our GCC generate i686 code by default.
On 12/13/15 01:09 PM, Dmitriy Kuminov wrote:
Well, I just found that I already used this switch (|-march=i486|) in mozilla for exactly the same reason. Fun. Perhaps, we should make our GCC generate i686 code by default.
Possibly just by updating uname, which on mingw and I believe many Linux dists reports i686 rather then i386. I also understand that i686 is superiour as some i486s have a broken CMPXCHG instruction and GCC works around this as well as i686 doing better alignment (4 byte) and adding more instructions such as cmov though some processors (P4?) have a crappy slow cmov.
@dryeo These are good points, I created #20 for this task.
Somehow our GCC builds lack the built-in __sync functions described there: https://gcc.gnu.org/onlinedocs/gcc-4.4.5/gcc/Atomic-Builtins.html. We need to implement them as this will save us from doing that again and again in applications.