-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 05/12/13 17:07, Ben Pfaff wrote:
> 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 had a specific problem with GCC 4.8.2 on powerpc architecture for
Ubuntu 14.04:

https://launchpadlibrarian.net/155235096/buildlog_ubuntu-trusty-powerpc.openvswitch_2.0.0-0ubuntu1_FAILEDTOBUILD.txt.gz

this was fixed by adding -latomic for the test-atomic link; however
when I backported this package back to 12.04 (gcc 4.6.3) it fails to
find libatomic and breaks.

I reworked the fix into this patch today.

> 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.

yes indeed... I'll update.

- -- 
James Page
Ubuntu and Debian Developer
james.p...@ubuntu.com
jamesp...@debian.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSoLbiAAoJEL/srsug59jDO6UP/R2W0NqO/lzxhs74hmA6FKr9
5n57RZqx9qeNErAk4pEwBxghPpo5DzWvrBWXdPN/mey0NyX2ZV75Er8OfivIpNAg
A7jn6tzaHRJz3xGGjyOIvV1f69P974KcGwi6NUxiFbt6ziGepaKn+8ULUhQDul6X
xAP9b0D1Irk0ig0+nS3ihweTW6GdMHh5Q4Y/nWnXUPkgGIL5uwDNVYrpAFig0agV
rgvKRVfFFjRvObyiMCA06dGGKy6B5vr37Kx0S01AsbSIVlSONRM3Oa18b2LsC+iN
QtpzefhUZ9lIzQR2ZRgHJIyofqVO2DlV13oli7IqqsjxPsVsRW4jKfjQRGC7/Z8D
VT0dKwNnecx7L6xFvxOcLMfJHPEC0b2jho12m6rwKH1jvytGvHoQPDUKnSIoG9K9
5A27m3pM3HLNIQTBp3Ium2zvtmZwtnzlCBCyDEZTUMj0vV4NRmRYPCv6WCDlJzuW
13kctyueB2QVO8EsQ7k+S2JnwuUSVfjJaxdO5h7EFwyEophFVF9cXspZ2g/1MPdu
/qeJ5NNI8I6wzn1K6Rijr4gz0MxWGU6RWHqeSF29mA4e/PNKypJhKH65640xK+lh
vjvsfJRBstwpXvvfszsae/69HwUZMUs7+mAcm/q9rWLJQhbl4rfvq0/PCTs9BMhT
mTMFQRTt71otExBLEype
=1vBx
-----END PGP SIGNATURE-----
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to