This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Testing a glibc build


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]