linux-mips
[Top] [All Lists]

Compiling a non-pic glibc

To: linux-mips <linux-mips@linux-mips.org>
Subject: Compiling a non-pic glibc
From: Alex Gonzalez <langabe@gmail.com>
Date: Thu, 12 Jan 2006 10:18:03 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=gPxCBSUvwNgh9bxaqBqCk9Re1QztVkkArI9NFZTo2BGzOT3FopmT04N4xXdhs82ca7aPfEYoTeIQzuwy1DpLXhLFIsJoEl6jzDv5jZ/9TrxMVpvNHo2KsEou0vx278d1LRaPIOhBAVwWe1lmW0t6gXMEXiT6Xqd5k/D0SrZwwys=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Hi,

What is the correct way of cross-compiling a non-pic static glibc?

I thought something like,

env CC="mips64-linux-gnu-gcc -mabi=n32 -mno-abicalls -fno-pic -mips4"
../glibc-src/configure --host=mips64-linux-gnu
--build=i686-pc-linux-gnulibc2.2 --prefix=/usr
--with-headers=/mips64-linux-gnu/sys-root/usr/include/
--enable-add-ons=linuxthreads --without-cvs --with-fp --disable-shared

and 'make' will do it, but it fails with,

make[2]: Entering directory `/home/alex/projects/glibc-src/iconv'
/opt/redhat/mips64linux-031001/H-i686-pc-linux-gnulibc2.2/bin/mips64-linux-gnu-gcc
-mabi=n32 -mno-abicalls -fno-pic -mips4 -nostdlib -nostartfiles -o
/home/alex/projects/glibc-build/iconv/iconvconfig     
/home/alex/projects/glibc-build/csu/crt1.o
/home/alex/projects/glibc-build/csu/crti.o
`/opt/redhat/mips64linux-031001/H-i686-pc-linux-gnulibc2.2/bin/mips64-linux-gnu-gcc
-mabi=n32 -mno-abicalls -fno-pic -mips4 --print-file-name=crtbegin.o`
/home/alex/projects/glibc-build/iconv/iconvconfig.o
/home/alex/projects/glibc-build/iconv/strtab.o
/home/alex/projects/glibc-build/iconv/xmalloc.o 
/home/alex/projects/glibc-build/libc.a  -lgcc
/home/alex/projects/glibc-build/libc.a -lgcc
`/opt/redhat/mips64linux-031001/H-i686-pc-linux-gnulibc2.2/bin/mips64-linux-gnu-gcc
-mabi=n32 -mno-abicalls -fno-pic -mips4 --print-file-name=crtend.o`
/home/alex/projects/glibc-build/csu/crtn.o
/opt/redhat/mips64linux-031001/H-i686-pc-linux-gnulibc2.2/lib/gcc-lib/mips64-linux-gnu/3.3-mips64linux-031001/../../../../mips64-linux-gnu/bin/ld:
/opt/redhat/mips64linux-031001/H-i686-pc-linux-gnulibc2.2/lib/gcc-lib/mips64-linux-gnu/3.3-mips64linux-031001/32/crtbegin.o:
warning: linking PIC files with non-PIC files
/opt/redhat/mips64linux-031001/H-i686-pc-linux-gnulibc2.2/lib/gcc-lib/mips64-linux-gnu/3.3-mips64linux-031001/../../../../mips64-linux-gnu/bin/ld:
/home/alex/projects/glibc-build/iconv/iconvconfig.o: warning: linking
PIC files with non-PIC files

Just in case, I am trying to build glibc-2.3.1 with a gcc 3.3 based toolchain.

Thanks,
Alex

<Prev in Thread] Current Thread [Next in Thread>