[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ltib] a's in integer output
From: |
Tobias Simon |
Subject: |
Re: [Ltib] a's in integer output |
Date: |
Tue, 23 Jan 2007 13:58:09 +0100 (MET) |
User-agent: |
KMail/1.8 |
Hello Stuart,
Here comes my CONFIG_TOOLCHAIN:
"mtwk-lnx-cfv4e-gcc-3.4.0-glibc-2.3.2-v4e-0.28-8.i686.rpm"
and my CONFIG_TOOLCHAIN_CFLAGS:
"-mcfv4e"
These settings were stolen from an earlier version of the "mcf547x_8x"
platform. I will now try it with the 4.1 toolchain.
Regards,
Tobi
> Hi Tobi,
>
> Can you send me a copy of your config/platform/<target>/.config, or let
> me know what the values of CONFIG_TOOLCHAIN and CONFIG_TOOLCHAIN_CFLAGS
>
> I notice in CVS that for the cobra5475 it is
> mtwk-lnx-cfv4e-gcc-3.4.0-glibc-2.3.2-v4e-0.28-8.i686.rpm, if you're
> using that, you could try adding a later toolchain that we have for the
> mcf547x_8x with a patch like this:
>
> diff -u -r1.6 -r1.9
> --- config/platform/mcf547x_8x/main.lkc 24 May 2006 15:41:23 -0000 1.6
> +++ config/platform/mcf547x_8x/main.lkc 11 Dec 2006 10:42:58 -0000 1.9
> @@ -42,7 +42,7 @@
> comment "Choose your toolchain"
> choice
> prompt "Toolchain"
> - default TOOLCHAIN1
> + default TOOLCHAIN2
> help
> This menu will help you choose the cross toolchain to use to build
> your packages with. If you choose none, you can enter the
> @@ -51,6 +51,8 @@
>
> config TOOLCHAIN1
> bool "gcc-3.4.0-glibc-2.3.2 (for v4e)" if GLIBC
> + config TOOLCHAIN2
> + bool "gcc-4.1 for v4e" if GLIBC
> config TOOLCHAIN_CUSTOM
> bool "custom"
> endchoice
> @@ -58,10 +60,12 @@
> config TOOLCHAIN
> string
> default mtwk-lnx-cfv4e-gcc-3.4.0-glibc-2.3.2-v4e-0.28-8.i686.rpm if
> TOOLCHAIN1 + default freescale-coldfire-m68k-linux-gnu-4.1-30.i686.rpm
> if TOOLCHAIN2
>
> config TOOLCHAIN_PATH
> string
> default "/opt/mtwk/usr/local/m68k-linux/gcc-3.4.0-glibc-2.3.2-v4e" if
> TOOLCHAIN1 + default
> "/opt/freescale/usr/local/gcc-4.1-glibc-2.3/m68k-glibc/freescale-coldfire-4
>.1" if TOOLCHAIN2 string "Supply your toolchain path" if TOOLCHAIN_CUSTOM
>
> config CUSTOM_TOOLCHAIN_PREFIX
> @@ -73,6 +77,7 @@
> config TOOLCHAIN_PREFIX
> string
> default "m68k-linux-" if TOOLCHAIN1
> + default "m68k-linux-gnu-" if TOOLCHAIN2
> default CUSTOM_TOOLCHAIN_PREFIX if TOOLCHAIN_CUSTOM
>
> config TOOLCHAIN_CFLAGS
>
>
> It you add this toolchain you'll need to run ./ltib --configure and
> select the new toolchain. It will force a full rebuilt.
>
> If this is the fix, then I'll let the Coldfire team know that there is a
> problem with that toolchain.
>
> Regards, Stuart
>
> On Tue, 2007-01-23 at 09:05 +0100, Tobias Simon wrote:
> > Hello List,
> >
> > I found out that the a's replace the 0's. I was able to write two
> > programs (one not working correctly, one working correctly):
> >
> > not working (prints a's):
> >
> > int main(void)
> > {
> > unsigned int i, size = 100;
> > for (i = 0; i < 100; i++)
> > printf("%2llu %% complete\n", (unsigned long long)i * 100 / size);
> > return(0);
> > }
> >
> >
> > working:
> >
> > int main(void)
> > {
> > unsigned int i, size = 100;
> > for (i = 0; i < 100; i++)
> > printf("%2lu %% complete\n", (unsigned long)i * 100 / size);
> > return(0);
> > }
> >
> > I use linux-2.6.10-cf-COBRA5475 but I don't think it's a Kernel Problem.
> > It seems to be the compiler or glibc.
> >
> > Regards,
> > Tobi
--
Tobias Simon
senTec Elektronik GmbH
address@hidden