Monday, December 31, 2018

Re: powerpc lang/gcc/6 can't build devel/llvm

On Sun, Dec 30 2018, George Koehler <kernigh@gmail.com> wrote:
> Hello OpenBSD ports list!

Hi!

> I want to report a problem with lang/gcc/6 on powerpc, where it can't
> build devel/llvm. I have reproduced the problem in a small C++ file
> that errors when the powerpc option -mlongcall is passed to eg++.
>
> $ cat loopy.cpp
> #include <functional>
>
> struct Thing {
> int get() const { return 0; }
> };
>
> int f(Thing t) {
> return std::mem_fn(&Thing::get)(t);
> }
> $ eg++ --version
> eg++ (GCC) 6.5.0
> ...
> $ eg++ -mlongcall -c loopy.cpp
> ...
> (see attached loopy-error.txt)
>
> The error goes away if I do any _one_ of the following:
> - remove -mlongcall

Using -mlongcall dates back from 2017, but it did not actually solve
relocation overflows, iirc due to code in /usr/src/lib/csu/. Later the
size of the llvm executables on powerpc was scaled down using

CONFIGURE_ARGS += -DLLVM_TARGETS_TO_BUILD="PowerPC"

so maybe -mlongcall is not needed at all now.

If you remove CFLAGS/CXXFLAGS = -mlongcall and restart the build from
scratch, are clang and friends properly linked? Do you get a working
llvm package?

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

No comments:

Post a Comment