https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82408
Bug ID: 82408 Summary: cross-compiling for arm64 problems Product: gcc Version: 7.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: peter.bohning at gmx dot com Target Milestone: --- Hi, I'm trying to compile gcc-7.2.0 for arm64, mostly for libstdc++ being required by libcrypt being required by glib. Probably I'm just doing something wrong, but nevertheless, I feel this should be far easier and cleaner. I do not want a compiler on the target system, I cannot chroot or reboot. It seems to me I should be able to install to whatever sysroot I choose. I am using linaro gcc 6.3.1-20017.05-x84_64_aarch64-linux-gnu toolchain. The first issue is no support "mode (HF)" in half.h... I changed this to be a simple float? soft-fp/half.h ... I tried removing the soft-fp targets from the target files for arm under the assumption that if there was a hard float, the soft-fp was simply unnecessary. But the targets didn't seem to affect the usage of soft-fp so eventually I just changed that mode line in half.h to float. Second issue, __builtin_addressof was not declared in scope, so I replaced it with: { return reinterpret_cast<_Tp*>(&const_cast<char&>(reinterpret_cast<const volatile char &>(__r))); } This is in bits/move.h in libstdc++ Third issue, std/type_traits has all these "inline" definitions and they wouldn't compile, so I removed all the "inline" qualifiers. This recent issue though has me a bit tired and stumped, and I worry that it was the type_traits inline removal somehow causing this problem. To start with, there are duplicate definitions of the "new, new[], delete, delete[] operators, and then there's this strange "expected declaration before } token" error on include/ccomplex... I tried to find out what it was from, it might be from sstream? I'm not sure. The error messages are just really unhelpful and it's hard for me to imagine that gcc-7.2.0 has a missing bracket somewhere, so I assume it's a combination of defines that aren't working but... I'm stumped as to what to do. Hopefully someone can help me out with this and then maybe it would be some bug for some arm64/toolchain combination. Thanks Peter PS: I also removed the "selftest" target which seemed like cross compiling should have disabled?