This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: cross compile glibc-2.18 error: gcc must provide the <cpuid.h> header
- From: Leslie Zhai <xiangzhai83 at gmail dot com>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: "libc-help at sourceware dot org" <libc-help at sourceware dot org>
- Date: Sat, 8 Feb 2014 12:24:50 +0800
- Subject: Re: cross compile glibc-2.18 error: gcc must provide the <cpuid.h> header
- Authentication-results: sourceware.org; auth=none
- References: <52F48DBE dot 3060700 at gmail dot com> <52F48FB5 dot 4020605 at gmail dot com> <20140207230722 dot GB32075 at domone dot podge>
Hi ondrej,
Thanks for your reply, I source export.sh to set gcc include path and other environment variables, and I cross complied for MIPS arch, so perhaps there is no cpuid.h for gcc 4.8.x under MIPS arch.
Regards,
Leslie
> å 2014å2æ8æï7:07ïOndÅej BÃlka <neleai@seznam.cz> åéï
>
>> On Fri, Feb 07, 2014 at 03:48:05PM +0800, Leslie Zhai wrote:
>> Hi Glibc developers,
>>
>> I cross compiled binutils-2.24, gcc-4.8.2, linux-3.12.8 header, and
>> glibc-2.18
>> But glibc-2.18 ./configure error: gcc must provide the <cpuid.h> header
>>
>> I built glibc-2.18 shown as below:
>> CC=${TARGET}-gcc ../../src/glibc-2.18/configure --target=$TARGET
>> --prefix=$PREFIX --with-headers=${TARGET_PREFIX}/include
>> libc_cv_forced_unwind=yes -enable-add-ons
>> make all
>> make install_root=${TARGET_PREFIX} prefix="" install
>>
>> And source export.sh shown as below:
>> export TARGET=mips-pc-linux-gnu
>> export PREFIX=/home/zhaixiang/project/xiangzhai/lcross
>> export TARGET_PREFIX=$PREFIX/$TARGET
>> export PATH=$PATH:$PREFIX/bin
>>
>> I push the cross toolchain into
>> https://github.com/xiangzhai/lcross/tree/master/mips-pc-linux-gnu
>>
>> Please someone give me some advice or patch, thanks a lot!
>>
>> Regards,
>> Leslie
> You would need to set gcc include path. Did you tried to
> crosscompile in chroot?
>