This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ColdFire 16/63] Bring *-uclinux configurations closer to *-linux-gnu
On Wed, 2007-01-10 at 11:10 +0000, Richard Sandiford wrote:
> The next patch in the series will make some major changes to the
> uClinux support. The idea is to make it seem more like a full
> ELF (GNU or non-GNU) linux target.
>
> However, the current uClinux configuration is a form of *-elf rather
> than *-linux-gnu. This leads to two important incompatibilities:
>
> - *-linux-gnu returns pointers in %a0 while *-uclinux returns then
> in %d0.
>
> - *-linux-gnu uses %a1 as the incoming return address while
> *-uclinux uses %a0.
>
> It seems odd to have this sort of difference. I would generally have
> expected *-uclinux and *-linux* to have the same calling convention,
> as the two are often source-compatible otherwise (even at the assembly
> level). If we're making the major changes mentioned above anyway, and if
> we're changing the ABI by redefining long double, it seems like a good
> idea to remove this incompatibility too, and make *-linux-gnu and
> *-uclinux variants of one another.
>
> This patch therefore makes *-uclinux include the linux headers and
> makefiles, then override the uClinux-specific bits.
>
> As well as removing the incompabilities just mentioned, the patch
> pulls in some useful things from the linux support. For example,
> the linux trampoline code uses a cacheflush syscall, whereas the
> current uClinux configuration is not cache-friendly.
>
> Richard
>
>
> gcc/
> * config.gcc (m68k-*-uclinux*): Base the port on the common
> and m68k GNU/Linux files rather than on the generic ELF ones.
> * config/m68k/uclinux.h (TARGET_VERSION): Override.
> (TARGET_OS_CPP_BUILTINS): Use LINUX_TARGET_OS_CPP_BUILTINS.
I'm OK with this as long as we document this ABI change as well so that
uclinux users aren't caught off guard.
jeff