Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Compiling a non-pic glibc
@ 2006-01-12 10:18 Alex Gonzalez
  2006-01-13 20:11 ` Ralf Baechle
  2006-01-14 21:34 ` Daniel Jacobowitz
  0 siblings, 2 replies; 3+ messages in thread
From: Alex Gonzalez @ 2006-01-12 10:18 UTC (permalink / raw)
  To: linux-mips

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Compiling a non-pic glibc
  2006-01-12 10:18 Compiling a non-pic glibc Alex Gonzalez
@ 2006-01-13 20:11 ` Ralf Baechle
  2006-01-14 21:34 ` Daniel Jacobowitz
  1 sibling, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2006-01-13 20:11 UTC (permalink / raw)
  To: Alex Gonzalez; +Cc: linux-mips

On Thu, Jan 12, 2006 at 10:18:03AM +0000, Alex Gonzalez wrote:

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

Forget it.  The non-PIC support for glibc is rotting away since ages.

Why do you want a non-PIC glibc?

  Ralf

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Compiling a non-pic glibc
  2006-01-12 10:18 Compiling a non-pic glibc Alex Gonzalez
  2006-01-13 20:11 ` Ralf Baechle
@ 2006-01-14 21:34 ` Daniel Jacobowitz
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2006-01-14 21:34 UTC (permalink / raw)
  To: Alex Gonzalez; +Cc: linux-mips

On Thu, Jan 12, 2006 at 10:18:03AM +0000, Alex Gonzalez wrote:
> Hi,
> 
> What is the correct way of cross-compiling a non-pic static glibc?

You can't.  MIPS/Linux userspace toolchains only support PIC out of the
box; if you want to mess around with non-PIC toolchains expect to have
to hack glibc (and possibly other places).  In this case it looks like
GCC's CRT files are PIC.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-01-17 12:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-12 10:18 Compiling a non-pic glibc Alex Gonzalez
2006-01-13 20:11 ` Ralf Baechle
2006-01-14 21:34 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox