Subject: Compiling with -m32 on amd64
To: None <tech-toolchain@NetBSD.org>
From: Thomas Klausner <wiz@NetBSD.org>
List: tech-toolchain
Date: 10/26/2006 15:54:12
Hi!

I'm trying to compile biew on amd64.
Compilation seems to work fine, but ld refuses to link the resulting
library:

gcc -s  -o biew addendum.o bconsole.o biew.o biewhelp.o biewutil.o bin_util=
.o bmfile.o codeguid.o colorset.o dialogs.o editors.o events.o fileutil.o i=
nfo_win.o mainloop.o refs.o search.o setup.o sysinfo.o tstrings.o addons/sy=
s/ascii.o addons/sys/consinfo.o addons/sys/cpu_perf.o addons/sys/inview.o a=
ddons/tools/dig_conv.o addons/tools/eval.o plugins/bin/aout.o plugins/bin/a=
rch.o plugins/bin/bin.o plugins/bin/coff386.o plugins/bin/dos_sys.o plugins=
/bin/elf386.o plugins/bin/jvmclass.o plugins/bin/le.o plugins/bin/lmf.o plu=
gins/bin/lx.o plugins/bin/mz.o plugins/bin/ne.o plugins/bin/nlm386.o plugin=
s/bin/opharlap.o plugins/bin/pe.o plugins/bin/pharlap.o plugins/bin/rdoff.o=
 plugins/bin/rdoff2.o plugins/binmode.o plugins/disasm.o plugins/hexmode.o =
plugins/textmode.o plugins/nls/russian.o plugins/disasm/null_da.o plugins/d=
isasm/avr/avr.o plugins/disasm/java/java.o plugins/disasm/ix86/ix86.o plugi=
ns/disasm/ix86/ix86_fpu.o plugins/disasm/ix86/ix86_fun.o -L./biewlib -lbiew=
 -L/usr/X11R6/lib -lcurses=20
ld: skipping incompatible ./biewlib/libbiew.a when searching for -lbiew
ld: cannot find -lbiew

I assume that this happens because of various -m32 on the
compiler link lines. I'm told this works on Linux/amd64.

To reproduce:
cvs -d:pserver:anonymous@biew.cvs.sourceforge.net:/cvsroot/biew login
cvs -z3 -d:pserver:anonymous@biew.cvs.sourceforge.net:/cvsroot/biew co -P b=
iew
=2E/configure
gmake

Is there a way to get this to compile, link, and run correctly on NetBSD/am=
d64?
(If so, how?)

Is there further work on NetBSD needed before this can work? If so, what?

Cheers,
 Thomas