On Fri, 30 Nov 2018 05:59:48 +0100
Charlene Wendling <[email protected]> wrote:
> Hi David, ports,
>
> Here is a diff that unbreaks libtorrent [1], and thus rtorrent [2],
> with gcc-6.4 as ports-gcc on my macppc box [3]. It may help for sparc64
> as well.
Thank you for working on this problem. I'm waiting for my macppc
machine to rebuild gcc 6.4 again, so I can't try other packages.
In summary, your diff
- creates ${PROPERTIES:Mgcc6}, which is true for macppc and sparc64,
or false for all other platforms.
- edits lib/{libtorrent,rtorrent}/Makefile, which was applying our
C++11 fixes when ${PROPERTIES:Mclang}, to also apply them when
${PROPERTIES:Mgcc6}.
- fixes lib/rtorrent/Makefile, which was wrongly disabling ports-gcc
on all platforms except sparc64.
Upstream libtorrent has different C++11 fixes. Their rak_cxx.m4 [1]
checks the compiler. If it can `#include <unordered_map>`, then it's
C++11, else if it can `#include <tr1/unordered_map>`, then it's TR1.
I guess that gcc 4.9.4 would pass the C++11 check. Perhaps we can use
${PROPERTIES:Mgcc4} and don't need ${PROPERTIES:Mgcc6} yet. This
might help because macppc and sparc64 still use gcc 4.9.4 by default,
so it is wrong to add them to ${PROPERTIES:Mgcc6}.
In lib/rtorrent/Makefile, it might be better (I'm not sure) to delete
the gcc4 lines and use COMPILER to pick ports-gcc before base-gcc for
sparc64. The SIGBUS comment might go above the COMPILER line.
[1] https://github.com/rakshasa/libtorrent/blob/master/scripts/rak_cxx.m4#L44
--
George Koehler <[email protected]>