All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Ostrowski <mostrows@watson.ibm.com>
To: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>
Cc: Jerone Young <jyoung5@us.ibm.com>,
	"Subrahmanian, Raj" <raj.subrahmanian@unisys.com>,
	xen-devel <xen-devel@lists.sourceforge.net>,
	ian.pratt@cl.cam.ac.uk
Subject: RE: cross compiling 32 bit Xen on an x86_64 system
Date: Mon, 21 Mar 2005 18:42:10 -0500	[thread overview]
Message-ID: <1111448530.4293.182.camel@brick.watson.ibm.com> (raw)
In-Reply-To: <A95E2296287EAD4EB592B5DEEFCE0E9D1E37B1@liverpoolst.ad.cl.cam.ac.uk>

I came across a variant of this problem trying to cross-compile myself. 
Python's distutils.core package seem to have "gcc" hardcoded in it, and
there is no way to redirect it to another compiler when trying to build
these modules.  In other words, python seems not to be able to
cross-compile these things.

On Mon, 2005-03-21 at 23:00 +0000, Ian Pratt wrote:
> > Here is the gcc line it comes up with:
> > gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m64 -
> > D_GNU_SOURCE -fPIC -m32 -march=i686 -fPIC -
> > I../../tools/python/xen/lowlevel/xu -I../../tools/libxc -
> > I../../tools/libxutil -I../../tools/xcs -Ixen/lowlevel/xc -
> > I/usr/include/python2.3 -c xen/lowlevel/xc/xc.c -o build/temp.linux-
> > x86_64-2.3/xen/lowlevel/xc/xc.o -fno-strict-aliasing -Wall -Werror
> > In file included from /usr/include/python2.3/Python.h:48,
> >                  from xen/lowlevel/xc/xc.c:7:
> > /usr/include/python2.3/pyport.h:554:2: #error "LONG_BIT definition
> > appears wrong for platform (bad gcc/glibc config?).
> > 
> > You will notice both "-m64" & "-m32 -march=i686" ("-m32 & -march=i686"
> > are the CFLAGS we are specifying). This is were the problem is. The
> > first set of CFLAGS with "-m64" are assumed by python.
> > 
> > On a normal x86-64 compile you get: 
> > gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m64 -
> > D_GNU_SOURCE -fPIC -m64 -fPIC -I../../tools/python/xen/lowlevel/xu -
> > I../../tools/libxc -I../../tools/libxutil -I../../tools/xcs -
> > Ixen/lowlevel/xc -I/usr/include/python2.3 -c xen/lowlevel/xc/xc.c -o
> > build/temp.linux-x86_64-2.3/xen/lowlevel/xc/xc.o 
> > -fno-strict-aliasing -
> > Wall -Werror
> > 
> > So it's figuring out where python is getting these CFLAGS.
> 
> Interesting.
> 
> It seems to be coming from the following lines in
> /usr/lib64/python2.3/config/Makefile
> Not sure how to fix it...
> 
> # Compiler options
> OPT=            -DNDEBUG -O2 -g -pipe -m64 -D_GNU_SOURCE -fPIC
> BASECFLAGS=      -fno-strict-aliasing
> CFLAGS=         $(BASECFLAGS) $(OPT)
> 
> 
> 
> Ian

-- 
Michal Ostrowski <mostrows@watson.ibm.com>



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

  reply	other threads:[~2005-03-21 23:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-21 23:00 cross compiling 32 bit Xen on an x86_64 system Ian Pratt
2005-03-21 23:42 ` Michal Ostrowski [this message]
2005-03-22  0:12   ` Jacob Gorm Hansen
2005-03-22  1:57     ` Anthony Liguori
2005-03-22  9:18 ` Keir Fraser
  -- strict thread matches above, loose matches on Subject: below --
2005-03-21 20:37 Subrahmanian, Raj
2005-03-21 21:55 ` Jerone Young
2005-03-22  9:07 ` Keir Fraser
2005-03-22 15:44   ` Jerone Young

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=1111448530.4293.182.camel@brick.watson.ibm.com \
    --to=mostrows@watson.ibm.com \
    --cc=ian.pratt@cl.cam.ac.uk \
    --cc=jyoung5@us.ibm.com \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=raj.subrahmanian@unisys.com \
    --cc=xen-devel@lists.sourceforge.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.