Date: Sun, 30 Apr 2006 21:07:41 -0400 (EDT) From: "Mikhail T." <mi@aldan.algebra.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: re@FreeBSD.org Subject: conf/96570: cc can't build 32-bit executables on amd64 Message-ID: <200605010107.k4117fFP015742@aldan.algebra.com> Resent-Message-ID: <200605010110.k411AHkB071179@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 96570
>Category: conf
>Synopsis: cc can't build 32-bit executables on amd64
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon May 01 01:10:17 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Mikhail T.
>Release: FreeBSD 6.1-RC amd64
>Organization:
Virtual Estates, Inc.
>Environment:
System: FreeBSD aldan.algebra.com 6.1-RC FreeBSD 6.1-RC #4: Sat Apr 15 14:53:29 EDT 2006 root@aldan.algebra.com:/meow/obj/var/src/sys/SILVER amd64
>Description:
``cc -m32'' currently succeeds _compiling_, but fails linking
the program, because it looks for libgcc.a in /usr/lib, where
it finds the 64-bit flavor.
This is a shame, because the 32-bit library is built and
available in /usr/lib32 -- cc just needs to know to look
there, when given the ``-m32'' flag.
>How-To-Repeat:
echo 'main() {}' > t.c
cc -m32 t.c
/usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when
searching for -lgcc
/usr/bin/ld: cannot find -lgcc
>Fix:
The details of the contrib/gcc/gcc.c appear hairy to a novice
like myself, but it should not be too difficult for a seasoned
developer to fix this configuration problem. Or so I think :-)
Renaming /usr/lib to /usr/lib64 and /usr/lib32 to /usr/lib
allows creation of 32-bit executables, but, obviously, prevents
creation of the 64-bit ones (and starting many programs).
This has been a nuissance since the beginning of the
FreeBSD/amd64, I guess. It would be nice to see it resolved
in the upcoming 6.1.
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605010107.k4117fFP015742>
