Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Hinko Kocevar <hinko.kocevar@cetrtapot.si>
To: buildroot@busybox.net
Subject: [Buildroot] C double type problem - at91sam9263
Date: Tue, 05 Aug 2008 11:15:58 +0200	[thread overview]
Message-ID: <48981A4E.5010909@cetrtapot.si> (raw)
In-Reply-To: <48980FD8.1060406@cetrtapot.si>

Hinko Kocevar wrote:

> 
> But what about i386 toolchain with uClibc and locale enabled? It seem to work in my case.. I'll redo the test with clean buildroot just to be sure.
> 

As stated above - i386 + uClibc 0.9.29 locale works fine when dealing with floats and date output is fine too.
Tested inside the chrooted busybox environment with:

$ /tmp/buildroot/build_i386/staging_dir/usr/bin/i386-linux-uclibc-gcc -static -O0 -ggdb3 test.c -o float.i386
$ cat test.c 
#include <stdio.h>
#include <string.h>

int main (int argc, char *argv[])
{
	double test;
	test = 1.0;
	fprintf(stderr, "Test double = %f.\n", test);
	
	test /= 100;
	fprintf(stderr, "Test double = %f.\n", test);

	test = 10;
	fprintf(stderr, "Test double = %f.\n", test);

	while (test)
	{
		fprintf(stderr, "Test double = %f.\n", test);
		test -= 2;
	}

	return 0;
}
$ sudo chroot ./root /bin/sh
/ $ ./float.i386 
Test double = 1.000000.
Test double = 0.010000.
Test double = 10.000000.
Test double = 10.000000.
Test double = 8.000000.
Test double = 6.000000.
Test double = 4.000000.
Test double = 2.000000.

/ $ set
HISTFILE='/home/hinkok/.ash_history'
HOME='/home/hinkok'
IFS=' 	
'
LOGNAME='root'
PATH='/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin'
PPID='25055'
PS1='\w \$ '
PS2='> '
PS4='+ '
PWD='/'
SHELL='/bin/bash'
SUDO_COMMAND='/bin/chroot ./root /bin/sh'
SUDO_GID='1000'
SUDO_UID='1000'
SUDO_USER='hinkok'
TERM='xterm'
USER='root'
_='./float.i386'




Maybe is the pregenerated locale data that is causing problems?? I'll test with own homebuilt locale data instead ..

Regards,
Hinko

-- 
?ETRTA POT, d.o.o., Kranj
Planina 3
4000 Kranj
Slovenia, Europe
Tel. +386 (0) 4 280 66 03
E-mail: hinko.kocevar at cetrtapot.si
Http: www.cetrtapot.si

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: br2.config
Url: http://busybox.net/lists/buildroot/attachments/20080805/7f0d2514/attachment-0002.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: uClibc.config
Url: http://busybox.net/lists/buildroot/attachments/20080805/7f0d2514/attachment-0003.txt 

  reply	other threads:[~2008-08-05  9:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-04 13:58 [Buildroot] C double type problem - at91sam9263 Richard Hardy
2008-08-04 14:16 ` Hinko Kocevar
2008-08-04 21:27   ` Matthew Dombroski
2008-08-05  8:31     ` Hinko Kocevar
2008-08-05  9:15       ` Hinko Kocevar [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-08-06 13:16 Richard Hardy
2008-08-06 13:36 ` Hinko Kocevar
2008-08-06 16:37 ` Ulf Samuelsson
2008-08-05 10:51 Richard Hardy
2008-08-05 16:37 ` Christopher Taylor
2008-08-04 13:52 Richard Hardy
2008-08-04 10:29 Richard Hardy
2008-08-04 12:41 ` John Voltz
2008-08-04 12:43 ` Hinko Kocevar
2008-08-05 10:20 ` Ulf Samuelsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48981A4E.5010909@cetrtapot.si \
    --to=hinko.kocevar@cetrtapot.si \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox