Compiling a non-pic glibc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux