From owner-freebsd-bugs@FreeBSD.ORG Sat Sep 26 00:10:02 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02338106566C for ; Sat, 26 Sep 2009 00:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B94F18FC18 for ; Sat, 26 Sep 2009 00:10:01 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8Q0A1EL092984 for ; Sat, 26 Sep 2009 00:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8Q0A1p2092983; Sat, 26 Sep 2009 00:10:01 GMT (envelope-from gnats) Resent-Date: Sat, 26 Sep 2009 00:10:01 GMT Resent-Message-Id: <200909260010.n8Q0A1p2092983@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, "Philip M. Gollucci" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 212B0106566C for ; Sat, 26 Sep 2009 00:00:12 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 106698FC17 for ; Sat, 26 Sep 2009 00:00:12 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n8Q007hw037258 for ; Sat, 26 Sep 2009 00:00:07 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n8Q007bt037257; Sat, 26 Sep 2009 00:00:07 GMT (envelope-from nobody) Message-Id: <200909260000.n8Q007bt037257@www.freebsd.org> Date: Sat, 26 Sep 2009 00:00:07 GMT From: "Philip M. Gollucci" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/139146: gcc -m32 doesn't quite work 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: Sat, 26 Sep 2009 00:10:02 -0000 >Number: 139146 >Category: bin >Synopsis: gcc -m32 doesn't quite work >Confidential: no >Severity: critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Sep 26 00:10:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Philip M. Gollucci >Release: FreeBSD 7.2-STABLE >Organization: Apache Software Foundation >Environment: FreeBSD minotaur.apache.org 7.2-STABLE FreeBSD 7.2-STABLE #0: Wed Aug 5 01:05:27 UTC 2009 root@loki.apache.org:/usr/obj/usr/src/sys/MINOTAUR amd64 >Description: https://issues.apache.org/jira/browse/INFRA-2077 gcc can successfully generate 64-bit binaries but when invoked with the -m32 option to generate 32-bit code the linker fails to find the corresponding 32-bit libgcc.so (see below). It appears as though the compiler driver doesn't pass -L/usr/lib32 (the location of the 32-bit libgcc) to the linker. Unfortunately, specifying -L/usr/lib32 manually gives the error: /usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for -lgcc. >How-To-Repeat: $ uname -sr && echo "int main () { }" > t.c && gcc -v --help 2>&1 | grep m32 && gcc -m32 t.c FreeBSD 7.2-STABLE -m32 Generate 32bit i386 code /usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for -lgcc /usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for -lgcc /usr/bin/ld: cannot find -lgcc >Fix: >Release-Note: >Audit-Trail: >Unformatted: