zlib with -fPIC patch

Ken Moffat ken at linuxfromscratch.org
Sat Jan 14 06:08:55 PST 2006

  This patch introduces a problem for me (trying to build for ppc)

powerpc-unknown-linux-gnu-gcc -O3 -fPIC -DUSE_MMAP   -c -o inffast.o 
powerpc-unknown-linux-gnu-ar libz.a adler32.o compress.o crc32.o gzio.o 
uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o 
powerpc-unknown-linux-gnu-ar: illegal option -- z
Usage: powerpc-unknown-linux-gnu-ar [emulation options] 
[-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...
        powerpc-unknown-linux-gnu-ar -M [<mri-script]
   d            - delete file(s) from the archive
   m[ab]        - move file(s) in the archive
   p            - print file(s) found in the archive
   q[f]         - quick append file(s) to the archive
   r[ab][f][u]  - replace existing or insert new file(s) into the archive
   t            - display contents of archive
   x[o]         - extract file(s) from the archive
  command specific modifiers:
   [a]          - put file(s) after [member-name]
   [b]          - put file(s) before [member-name] (same as [i])
   [N]          - use instance [count] of name
   [f]          - truncate inserted file names
   [P]          - use full path names when matching
   [o]          - preserve original dates
   [u]          - only replace files that are newer than current archive 
  generic modifiers:
   [c]          - do not warn if the library had to be created
   [s]          - create an archive index (cf. ranlib)
   [S]          - do not build a symbol table
   [v]          - be verbose
   [V]          - display the version number
  emulation options:
   No emulation specific options
powerpc-unknown-linux-gnu-ar: supported targets: elf32-powerpc 
aixcoff-rs6000 elf32-powerpcle ppcboot elf64-powerpc elf64-powerpcle 
elf64-little elf64-big elf32-little elf32-big srec symbolsrec tekhex 
binary ihex
make: *** [libz.a] Error 1

  At the moment, I haven't found where ar is getting the '-z' from, but I 
have confirmed that the shared library builds ok without the patch.

  I can see that I'll probably  need to fix this if I want to buil libz.a 
in the final system, but for the temporary system, why would we want 
libz.a ?  We seem to have only built the shared libz until this patch 
was added.

  das eine Mal als Tragödie, das andere Mal als Farce

More information about the cross-lfs mailing list