This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: readd crti/crtn to sparc-*-rtems*
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- Cc: Ralf Corsepius <ralf dot corsepius at rtems dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 10 Jan 2011 12:47:17 +0100
- Subject: Re: readd crti/crtn to sparc-*-rtems*
- References: <4D2792F7.6060301@oarcorp.com> <4D27D2B7.7040509@rtems.org> <4D288E6C.8070008@oarcorp.com>
> The sparc-rtems target currently uses init/fini for C++
> constructors and without crti/n, they do not have the symbols.
OK, this is indeed done the same way (hijacking the Solaris files) for i386.
> Longer term, both probably need to switch to how sparc-elf
> does it but I was just trying to fix the breakage. And I didn't
> build sparc64-rtems. This is how sparc-rtems has done it
> for at least 10 years.
The patch is OK modulo the following couple of changes:
1) copy and adjust (x86 -> SPARC) the lines:
# This file was based on t-sol2 - x68 Solaris implementation. Actually,
# the source code to create crti.o anf crtn.o are exactly the same
# as the ones for Solaris. Later, we might want to have a RTEMS's
# version of these files.
from config/i386/t-rtems-i386 to the new config/sparc/t-rtems.
2) apply the config.gcc changes to both sparc-*-rtems* and sparc64-*-rtems*.
Thanks in advance.
--
Eric Botcazou