Subject: Re: linking PIC files with non-PIC files (ssh package)
To: Tracy J. Di Marco White <gendalia@iastate.edu>
From: Simon Burge <simonb@netbsd.org>
List: port-pmax
Date: 04/27/1999 14:42:56
"Tracy J. Di Marco White" wrote:
>
> This is using 1.4_ALPHA, I'me installing 1.4_BETA in the morning, but
> I expect nothng should change much. Is there something I should set
> for this to work?
>
> cc -pipe -Wl,-R/usr/pkg/lib -Wl,-R/usr/pkg/lib -o ssh ssh.o sshconnect.o log-client.o readconf.o hostfile.o readpass.o tildexpand.o clientloop.o c
anohost.o idea.o rsa.o randoms.o md5.o buffer.o emulate.o packet.o compress.o xmalloc.o ttymodes.o newchannels.o bufaux.o authfd.o authfile.o crc
32.o rsaglue.o cipher.o des.o match.o arcfour.o mpaux.o userfile.o signals.o blowfish.o deattack.o -Lgmp-2.0.2-ssh-2 -lgmp -L/usr/lib -lz -L/usr/
pkg/lib -lrsaref -lcrypt -L/usr/local/lib -lutil
> /usr/bin/ld: mpn_add_n.o: linking PIC files with non-PIC files
> Bad value: failed to merge target specific data of file gmp-2.0.2-ssh-2/libgmp.a(mpn_add_n.o)
> [[ more PIC/non-PIC errors deleted ]]
Put this in pkgsrc/security/ssh/patches/patch-ap, do a "make clean" and
start again:
---------------------------------- cut here ----------------------------------
--- gmp-2.0.2-ssh-2/configure.in.orig Mon Apr 26 19:50:09 1999
+++ gmp-2.0.2-ssh-2/configure.in Mon Apr 26 20:06:07 1999
@@ -222,6 +222,10 @@
sh2-*-*)
path="sh/sh2 sh"
;;
+ mips*-*-netbsd*)
+ path="mips2"
+ SFLAGS="-Wa,-KPIC"
+ ;;
mips[34]*-*-*)
path="mips3"
;;
--- gmp-2.0.2-ssh-2/configure.orig Thu Jul 9 02:40:44 1998
+++ gmp-2.0.2-ssh-2/configure Mon Apr 26 20:06:12 1999
@@ -1955,6 +1955,10 @@
sh2-*-*)
path="sh/sh2 sh"
;;
+ mips*-*-netbsd*)
+ path="mips2"
+ SFLAGS="-Wa,-KPIC"
+ ;;
mips[34]*-*-*)
path="mips3"
;;
---------------------------------- cut here ----------------------------------
This works for me, and should be included in pkgsrc soon (I'm just
waiting for an OK). If you wanted to install devel/gmp, you'd need
something similar (but not quite :-).
Simon.