This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Testing a glibc build
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Christer Solskogen <christer dot solskogen at gmail dot com>
- Cc: "libc-help at sourceware dot org" <libc-help at sourceware dot org>
- Date: Thu, 13 Jun 2013 10:35:47 -0400
- Subject: Re: Testing a glibc build
- References: <kp7qui$jb6$1 at ger dot gmane dot org> <51B7880D dot 7040007 at redhat dot com> <kp82j7$782$1 at ger dot gmane dot org> <51B79C29 dot 4080406 at redhat dot com> <CAMVU60bpKA4UNUTFP4hDk58nt3kKQ136rMjTjX69UeC=8PY3QA at mail dot gmail dot com> <51B8886A dot 6010704 at redhat dot com> <CAMVU60aQXmCf0kL1_c1Vy4JQZufUWUs8jms+-kbC+99gNmu==Q at mail dot gmail dot com> <51B8D4D3 dot 2080608 at redhat dot com> <CAMVU60Ydh3PwZsynsFba-=B6H057gRF2HTmpiYzQSiQiXLcrWQ at mail dot gmail dot com>
On 06/12/2013 05:08 PM, Christer Solskogen wrote:
> On Wed, Jun 12, 2013 at 10:06 PM, Carlos O'Donell <carlos@redhat.com> wrote:
>
>> Works fine for me, so it must be a difference in the build tools or the
>> sysroot setup.
>>
>
> Okay, thanks for trying it out. Can you post your instructions?
>
>> I'm using upstream binutils compiled with --with-sysroot=${SYSROOT}.
>>
>
> I did not do that, but I'll try that as well. Thanks!
Untested, but roughly:
Download linux master
Defconfig it.
make headers_install INSTALL_HDR_PATH=/home/carlos/install-linux
Download binutils cvs head.
configure --prefix=/usr --with-sysroot=/home/carlos/install-glibc
make
make install
make install DESTDIR=/home/carlos/install-glibc/
Download glibc master
/home/carlos/src/glibc/configure \
--with-headers="/home/carlos/install-linux/include" \
--prefix=/usr \
--enable-add-ons=nptl,ports
make -j4
make install DESTDIR=/home/carlos/install-glibc
Build test application:
# Need access to new ld for --sysroot support.
export PATH=/home/carlos/install-glibc/usr/bin:$PATH
gcc -g3 -O0 --sysroot=/home/carlos/install-glibc/ \
-Wl,-rpath=/home/carlos/install-glibc/lib:\
/home/carlos/install-glibc/usr/lib:\
/home/carlos/install-glibc/usr/lib64:\
/home/carlos/install-glibc/lib64 \
-Wl,--dynamic-linker=/home/carlos/install-glibc/lib64/ld-linux-x86-64.so.2 \
-o test test.c -Wl,-Map,linkmap.txt
Reconfigure and rebuild glibc:
/home/carlos/src/glibc/configure \
--with-headers="/home/carlos/install-linux/include" \
--prefix=/usr \
--enable-add-ons=nptl,ports
make -j4
make install DESTDIR=/home/carlos/install-glibc
Rerun previously built test application.
Cheers,
Carlos.