From: Mirek23 <miroslaw.dach@psi.ch>
To: linuxppc-embedded@ozlabs.org
Subject: Problem with 64-bit variables on ppc405
Date: Mon, 19 Nov 2007 12:37:01 -0800 (PST) [thread overview]
Message-ID: <13844837.post@talk.nabble.com> (raw)
Dear All,
I have successfully build crosstools (gcc-4.0.2-glibc-2.3.2) for my ppc 405
processor (part of xilinx virtex-4). I have compiled the Linux kernel
2.6.23rc2 and busy box 1.4.2.
All together works fin but I am facing the problem with the variables
declared in C as double and long long.
Doubles and long long are 8 bytes long but the byte order
differs on my host linux Intel PC from this what I have on the target linux
ppc 405.
double , long long byte order looks like below:
linux intel x86 ppc405
1,2,3,4,5,6,7,8 5,6,7,8,1,2,3,4
int and long types in 'C' (4 byte variables) have the same byte order on
both platforms.
It seems to be that 64-bit variables have different order. I do not know if
it comes from:
1. the configuration of the crosstools (ie. the way how the gcc and glibc is
built)
2. the kernel configuration.
The ppc 405 does not have the FPU built in so I have set in the kernel:
processor->math emulation
I did not set anything concerning FPU in Crosstools.
The Crosstools configuration file demo-powerpc-405.sh looks like:
#!/bin/sh
# This script has one line for each known working toolchain
# for this architecture. Uncomment the one you want.
# Generated by generate-demo.pl from buildlogs/all.dats.txt
set -ex
TARBALLS_DIR=$HOME/downloads
RESULT_TOP=/opt/crosstool
export TARBALLS_DIR RESULT_TOP
GCC_LANGUAGES="c,c++"
export GCC_LANGUAGES
# Really, you should do the mkdir before running this,
# and chown /opt/crosstool to yourself so you don't need to run as root.
mkdir -p $RESULT_TOP
eval `cat powerpc-405.dat gcc-4.0.2-glibc-2.3.2.dat` sh all.sh --notest
Does anybody have an idea how to sort out this problem to have byte order
for
64-bit variables on ppc405 the same as for linux on intel x86.
Best Regards
Mirek
--
View this message in context: http://www.nabble.com/Problem-with-64-bit-variables-on-ppc405-tf4839313.html#a13844837
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
next reply other threads:[~2007-11-19 20:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-19 20:37 Mirek23 [this message]
2007-11-19 20:46 ` Problem with 64-bit variables on ppc405 David Hawkins
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=13844837.post@talk.nabble.com \
--to=miroslaw.dach@psi.ch \
--cc=linuxppc-embedded@ozlabs.org \
/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;
as well as URLs for NNTP newsgroup(s).