From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hollis Blanchard Date: Thu, 06 Nov 2008 15:39:01 +0000 Subject: RE: cross-compiling flags? Message-Id: <1225985941.8620.22.camel@localhost.localdomain> List-Id: References: <1225814193.15410.17.camel@localhost.localdomain> In-Reply-To: <1225814193.15410.17.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org On Thu, 2008-11-06 at 15:44 +0800, Liu Yu wrote: > > > > When I cross-compile qemu, it's using the cross-toolchain > > glibc headers. Since > > my toolchain is from crosstool, those headers are > > at > > /opt/crosstool/gcc-3.4.5-glibc-2.3.6/powerpc-440-linux-gnu/pow > > erpc-440-linux-gnu > > Yes, me too. > > > > > > In my case, the libc headers are already appointed to a > > > toolchain-combined version in LTIB(assume you know it). > > > But zlib.h is not existing so I had to use qemu-cflag to > > appoint another > > > dir > > > > If your zlib headers are mixed in with the target libc > > headers, then why do > > you need any -I at all? > > The zlib headers are mixed in powerpc local libc headers not the toolchain cross libc headers. > And it seems the local libc headers is unfit for cross building. Since I'm not familiar with LTIB, I chatted with Kumar Gala about this briefly, and he suggested that you post your issue to the internal Freescale LTIB list. My understanding is that you have a special directory for target headers, which is used by the cross toolchain. Without understanding the details, my suggestion would be to build a second copy of zlib from source, and configure it with --prefix=/target/specific/directory. -- Hollis Blanchard IBM Linux Technology Center