On Thu, Dec 05, 2013 at 04:16:39PM +0000, James Page wrote:
> Later versions of gcc on some architectures push atomic functions
> out into a separate atomic library; add a check to see when this
> is required and add it to LIBS if need be.
> 
> Signed-off-by: James Page <james.p...@ubuntu.com>

May I assume that you have tested this and it fixes the problem with the
GCC versions and architectures that have the problems?  Can you give an
example of a GCC version and architecture that has the problem?

I am curious because with Debian's GCC 4.7.2 on i386, which does not
have a libatomic, I would expect the configure test to succeed without
adding any library.  In fact, the test fails both with and without
-latomic.  Here is an excerpt from config.log:

    configure:6828: checking for library containing __atomic_load_8
    configure:6859: gcc -o conftest -g -O2   conftest.c -lrt -lm  >&5
    conftest.c:56:6: warning: conflicting types for built-in function 
'__atomic_load_8' [enabled by default]
    /tmp/ccUqBiDK.o: In function `main':
    /home/blp/nicira/ovs/_build/conftest.c:60: undefined reference to 
`__atomic_load_8'
    collect2: error: ld returned 1 exit status
    configure:6859: $? = 1

...

    configure:6859: gcc -o conftest -g -O2   conftest.c -latomic  -lrt -lm  >&5
    conftest.c:56:6: warning: conflicting types for built-in function 
'__atomic_load_8' [enabled by default]
    /usr/bin/ld: cannot find -latomic
    collect2: error: ld returned 1 exit status
    configure:6859: $? = 1

You can remove the assignment to ATOMIC_LIBS from openvswitch.m4, by the
way, since nothing uses its value anymore.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to