From owner-freebsd-bugs@FreeBSD.ORG Mon May 1 01:10:19 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7794C16A400 for ; Mon, 1 May 2006 01:10:19 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D2E7143D53 for ; Mon, 1 May 2006 01:10:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k411AH8T071180 for ; Mon, 1 May 2006 01:10:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k411AHkB071179; Mon, 1 May 2006 01:10:17 GMT (envelope-from gnats) Resent-Date: Mon, 1 May 2006 01:10:17 GMT Resent-Message-Id: <200605010110.k411AHkB071179@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Mikhail T." Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C0D5816A400; Mon, 1 May 2006 01:07:43 +0000 (UTC) (envelope-from mi@aldan.algebra.com) Received: from aldan.algebra.com (aldan.algebra.com [216.254.65.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 523A843D53; Mon, 1 May 2006 01:07:43 +0000 (GMT) (envelope-from mi@aldan.algebra.com) Received: from aldan.algebra.com (aldan [127.0.0.1]) by aldan.algebra.com (8.13.6/8.13.6) with ESMTP id k4117gRV015743 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 30 Apr 2006 21:07:42 -0400 (EDT) (envelope-from mi@aldan.algebra.com) Received: (from mi@localhost) by aldan.algebra.com (8.13.6/8.13.6/Submit) id k4117fFP015742; Sun, 30 Apr 2006 21:07:41 -0400 (EDT) (envelope-from mi) Message-Id: <200605010107.k4117fFP015742@aldan.algebra.com> Date: Sun, 30 Apr 2006 21:07:41 -0400 (EDT) From: "Mikhail T." To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: re@FreeBSD.org Subject: conf/96570: cc can't build 32-bit executables on amd64 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 May 2006 01:10:19 -0000 >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: