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
Jeffrey Law <law@redhat.com> writes:
> On Wed, 2007-01-10 at 22:03 +0000, Richard Sandiford wrote:
>> >
>> > I don't think you can simply change the uclinux ABI. If you're going
>> > for this transition it needs to be done carefully, for example you
>> > should probably still support the old abi as -uclinux-oldabi targets
>> > as systems with the traditional ABI won't simply go away.
>>
>> OK. Does that sound reasonable to you Jeff? Split off a copy
>> of the current uclinux configuration as m68k-*-uclinux-oldabi?
>> The copied uclinux.h could restore the original long double
>> type too for maximum compatibility.
>>
>> If so, I'll prepare a patch.
> It sounds quite reasonable to me.
I eneded up calling it m68k-uclinuxoldabi as m68k-uclinux-oldabi
would require config.sub changes. (This would be an issue for
users too, if they're trying to use --host=m68k-uclinux-oldabi
to configure some external package.)
I spot-checked the new configuration by building gcc/ and
checking that it was using the right headers. I don't have
a way of really testing uclinux without the later ABI changes.
OK to install?
(The patch doesn't include the new uclinux-oldabi.h file because
I'd create it using "svn cp".)
Richard
* doc/install.texi: Document m68k-uclinuxoldabi.
* config.gcc (m68k-*-uclinuxoldabi): New configuration.
* config/m68k/uclinux-oldabi.h: New file, copied from...
* config/m68k/uclinux.h: ...here.
Index: gcc/doc/install.texi
===================================================================
--- gcc/doc/install.texi (revision 120718)
+++ gcc/doc/install.texi (working copy)
@@ -2397,6 +2397,8 @@ information are.
@item
@uref{#m68k-hp-hpux,,m68k-hp-hpux}
@item
+@uref{#m68k-uclinux,,m68k-uclinux}
+@item
@uref{#mips-x-x,,mips-*-*}
@item
@uref{#mips-sgi-irix5,,mips-sgi-irix5}
@@ -3447,6 +3449,14 @@ to look like:
#!/bin/ksh
@end smallexample
+@heading @anchor{m68k-x-uclinux}m68k-*-uclinux
+GCC 4.3 changed the uClinux configuration so that it uses the
+@samp{m68k-linux-gnu} ABI rather than the @samp{m68k-elf} ABI.
+It also added improved support for C++ and flat shared libraries,
+both of which were ABI changes. However, you can still use the
+original ABI by configuring for @samp{m68k-uclinuxoldabi} or
+@samp{m68k-@var{vendor}-uclinuxoldabi}.
+
@html
<hr />
@end html
Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc (revision 120713)
+++ gcc/config.gcc (working copy)
@@ -1510,7 +1510,18 @@ m68k*-*-openbsd*)
# we need collect2 until our bug is fixed...
use_collect2=yes
;;
-m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc
+m68k-*-uclinuxoldabi*) # Motorola m68k/ColdFire running uClinux
+ # with uClibc, using the original
+ # m68k-elf-based ABI
+ default_m68k_cpu=68020
+ tm_file="m68k/m68k.h m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/uclinux-oldabi.h"
+ tm_defines="${tm_defines} MOTOROLA USE_GAS"
+ tmake_file=m68k/t-uclinux
+ use_fixproto=no
+ ;;
+m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux
+ # with uClibc, using the new GNU/Linux-style
+ # ABI.
default_m68k_cpu=68020
tm_file="m68k/m68k.h m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/uclinux.h"
tm_defines="${tm_defines} MOTOROLA USE_GAS"