This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/70464] New: [arch64] create a self hosting compiler
- From: "georg at schorsch-tech dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 30 Mar 2016 16:27:17 +0000
- Subject: [Bug target/70464] New: [arch64] create a self hosting compiler
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70464
Bug ID: 70464
Summary: [arch64] create a self hosting compiler
Product: gcc
Version: 5.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: georg@schorsch-tech.de
Target Milestone: ---
During our approach to get the raspberry pi3 and gentoo with an aarch64 kernel
and userland running i tried to cross compile a "native compiler for aarch64".
Our attempt succedded, as we got the userland cross compiled and the kernel.
Both are running and seem to be ok, as far as we can tell currently. There is
one core component for gentoo missing: The gcc.
I tried to cross compile with the added cross compiler script. I used crossdev
to create the amd64 to aarch64 cross compiler. With gcc 5.3.0 i could create a
toolchain which runs on aarch64 but only supports C. No C++. You can download
the folder here:
https://www.schorsch-tech.de/rpi3/cross.tar.bz2
As i got this up, i tried to compile the aarch64 gcc with c++ on the raspberry
pi but it failed at a for me very strange point:
checking for unsigned long long int... yes
checking for uintmax_t... yes
checking for uintptr_t... yes
checking for int64_t underlying type... long long
configure: error: error verifying int64_t uses long long
Makefile:4159: recipe for target 'configure-stage1-gcc' failed
make[2]: *** [configure-stage1-gcc] Error 1
make[2]: Leaving directory '/var/tmp/portage/sys-devel/gcc-5.3.0/work/build'
Makefile:19012: recipe for target 'stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory '/var/tmp/portage/sys-devel/gcc-5.3.0/work/build'
Makefile:19343: recipe for target 'bootstrap-lean' failed
make: *** [bootstrap-lean] Error 2
With this compiler i could compile flex and bison which are a dependency to
compile it with the gentoo tools. They seem both running.
As i had this issue, i tried with the added script to get the gcc with c and
c++ built. But it always failed at:
In file included from
/usr/aarch64-armv8a-linux-gnueabi/usr/include/stdio.h:936:0,
from ../../../gcc-5.3.0/libitm/util.cc:27:
/usr/aarch64-armv8a-linux-gnueabi/usr/include/bits/stdio2.h: In function 'void
GTM::gtm_verror(const char*, va_list)':
/usr/aarch64-armv8a-linux-gnueabi/usr/include/bits/stdio2.h:124:1: error:
inlining failed in call to always_inline 'int vfprintf(FILE*, const char*,
__gnuc_va_list)': function body can be overwritten at link time
vfprintf (FILE *__restrict __stream,
^
../../../gcc-5.3.0/libitm/util.cc:35:31: error: called from here
vfprintf (stderr, fmt, list);
^
Makefile:517: recipe for target 'util.lo' failed
make[4]: *** [util.lo] Error 1
I tried gcc 4.9.3 as cross chain and as target, 5.3.0 cross and target. But i
failed ....
All our attempts are documented in the gentoo forum.
https://forums.gentoo.org/viewtopic-p-7899614.html#7899614