This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] kernel/linux: change arch tuple to use -uclinux for uclinux toolchains


Mike Frysinger <vapier@gentoo.org> writes:

> On Tuesday 25 September 2012 12:41:42 Yann E. MORIN wrote:
>> Basically, 'bfin-elf' is for bare-metal, 'bfin-uclinux' if for
>> flat-binaries with no shared libs, and 'bfin-linux' for FDPIC-ELF that
>> allows shared libs.
>
> correct, the current convention is that "-uclinux" is for FLAT
> targets.  

Ok, but where does this convention come from.  Or rather, who follows
this convention?

It does not generally seem to be the convention used in GCC, at least
not for all archs.

If linux-gnu is linux with glibc, linux-uclibc is uClinux/FDPIC-ELF with
uClibc, and uclinux-uclibc is uClinux/FLAT with uClibc.  What arch tuple
should then be used for linux with uClibc?  I don't see the benefit of
not being able to tell it apart from uClinux/FDPIC-ELF with uClibc.

If you take a look at gcc/config.gcc

it has stuff like

--------
m68k-*-uclinuxoldabi*)          # Motorola m68k/ColdFire running uClinux
                                # with uClibc, using the original
                                # m68k-elf-based ABI
        default_m68k_cpu=68020
        default_cf_cpu=5206
        tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/uclinux-oldabi.h glibc-stdint.h"
        tm_defines="${tm_defines} MOTOROLA=1"
        tmake_file="m68k/t-floatlib m68k/t-uclinux"
        ;;
m68k-*-uclinux*)                # Motorola m68k/ColdFire running uClinux
                                # with uClibc, using the new GNU/Linux-style
                                # ABI.
        default_m68k_cpu=68020
        default_cf_cpu=5206
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h flat.h m68k/linux.h m68k/uclinux.h ./sysroot-suffix.h"
        tm_defines="${tm_defines} MOTOROLA=1 UCLIBC_DEFAULT=1"
        extra_options="${extra_options} linux.opt"
        tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
        ;;
m68k-*-linux*)          # Motorola m68k's running GNU/Linux
                                # with ELF format using glibc 2
                                # aka the GNU/Linux C library 6.
        default_m68k_cpu=68020
        default_cf_cpu=5475
        with_arch=${with_arch:-m68k}
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h m68k/linux.h ./sysroot-suffix.h"
        extra_options="${extra_options} m68k/ieee.opt"
        tm_defines="${tm_defines} MOTOROLA=1"
        tmake_file="${tmake_file} m68k/t-floatlib m68k/t-linux m68k/t-mlibs"
        # if not configured with --enable-sjlj-exceptions, bump the
        # libgcc version number
        if test x$sjlj != x1; then
            tmake_file="$tmake_file m68k/t-slibgcc-elf-ver"
        fi
        ;;
--------

I guess that mean that at least for m68k, the convention you mention is
not shared with GCC.

When building an m68k cross gcc, using *-*-linux-* will filter out any
target devices that does not have the FL_MMU flag set (in
gcc/config/m68k/m68k-devices.def).  When building with *-*-uclinux-*,
only those devices without FL_MMU flag set, or with FL_UCLINUX flag set
will be available.

As such, the convention does not work for m68k.

As for my current needs, this can be made conditional for m68k.

That said, I don't think the convention is the most sane one, as it
would be best to have "linux-uclibc" mean the same thing independent of
the cpu prefix, and also in line with the principle of least surprise,
it would make sense to use "uclinux-*" for uclinux archs :-)

/Esben




--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]