Created attachment 176229 [details] fix build of net-im/qTox on 9i386 qTox was recently marked BROKEN on 9 i386 due to a compilation error that I happen to recognize. I don't run 9 so this doesn't affect me, but I know the solution from using it on other ports; GCC defaults to 486 compatibility on i386 so 64bit atomic ops are not available unless specifying arch as 586 or better. The attached patch does just that, it sets march=586 when gcc is the compiler, arch is i386, and no march was set already by CPUTYPE. I verified this builds clean in a 9i386 jail with poudriere.
Thanks!
A commit references this bug: Author: jhale Date: Mon Oct 31 07:00:10 UTC 2016 New revision: 424975 URL: https://svnweb.freebsd.org/changeset/ports/424975 Log: Fix build for 9.x i386 Quarterly branch has a different version, but suffers from the same error, so the fix should be backported. videoframe.o: In function `VideoFrame::VideoFrame(unsigned long long, AVFrame*, QRect, int, bool)': videoframe.cpp:(.text+0x19db): undefined reference to `__atomic_fetch_add_8' camerasource.o: In function `CameraSource::CameraSource()': camerasource.cpp:(.text+0x327): undefined reference to `__atomic_fetch_add_8' corevideosource.o: In function `CoreVideoSource::CoreVideoSource()': corevideosource.cpp:(.text+0x121): undefined reference to `__atomic_fetch_add_8' collect2: error: ld returned 1 exit status gmake: *** [Makefile:793: qtox] Error 1 PR: 213841 Submitted by: <matthew@reztek.cz> Approved by: <yuri@rawbw.com> (maintainer) MFH: 2016Q4 Changes: head/net-im/qTox/Makefile
A commit references this bug: Author: jhale Date: Mon Oct 31 21:47:44 UTC 2016 New revision: 425030 URL: https://svnweb.freebsd.org/changeset/ports/425030 Log: MFH: r424975 Fix build for 9.x i386 Quarterly branch has a different version, but suffers from the same error, so the fix should be backported. videoframe.o: In function `VideoFrame::VideoFrame(unsigned long long, AVFrame*, QRect, int, bool)': videoframe.cpp:(.text+0x19db): undefined reference to `__atomic_fetch_add_8' camerasource.o: In function `CameraSource::CameraSource()': camerasource.cpp:(.text+0x327): undefined reference to `__atomic_fetch_add_8' corevideosource.o: In function `CoreVideoSource::CoreVideoSource()': corevideosource.cpp:(.text+0x121): undefined reference to `__atomic_fetch_add_8' collect2: error: ld returned 1 exit status gmake: *** [Makefile:793: qtox] Error 1 PR: 213841 Submitted by: <matthew@reztek.cz> Approved by: <yuri@rawbw.com> (maintainer) Approved by: ports-secteam (feld) Changes: _U branches/2016Q4/ branches/2016Q4/net-im/qTox/Makefile
Fixed in head and 2016Q4, thanks!