From owner-freebsd-bugs@FreeBSD.ORG Mon May 1 04:00:38 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 0867C16A403 for ; Mon, 1 May 2006 04:00:38 +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 8C3B843D45 for ; Mon, 1 May 2006 04:00:37 +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 k4140b4e080859 for ; Mon, 1 May 2006 04:00:37 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k4140bO5080857; Mon, 1 May 2006 04:00:37 GMT (envelope-from gnats) Date: Mon, 1 May 2006 04:00:37 GMT Message-Id: <200605010400.k4140bO5080857@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Mikhail Teterin Cc: Subject: Re: 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 Reply-To: Mikhail Teterin List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 May 2006 04:00:38 -0000 The following reply was made to PR conf/96570; it has been noted by GNATS. From: Mikhail Teterin To: bug-followup@freebsd.org Cc: Subject: Re: conf/96570: cc can't build 32-bit executables on amd64 Date: Sun, 30 Apr 2006 23:52:38 -0400 --Boundary-00=_HYYVEiAWkBPnnPv Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline The attached patch is a little dirty, but works. It may be an acceptable stop-gap for the upcoming release, until a knowledgeable person comes up with something cleaner. The gcc produced with this patch, for example, allows to compile lame with -m32, thus utilizing i386-only assembler optimizations. -mi --Boundary-00=_HYYVEiAWkBPnnPv Content-Type: text/x-diff; charset="us-ascii"; name="cc-m32.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="cc-m32.diff" Index: Makefile =================================================================== RCS file: /home/ncvs/src/gnu/usr.bin/cc/cc_tools/Makefile,v retrieving revision 1.81 diff -d -U2 -r1.81 Makefile --- Makefile 3 Jun 2005 04:21:04 -0000 1.81 +++ Makefile 1 May 2006 03:34:43 -0000 @@ -371,8 +371,15 @@ multilib.h: +.if ${TARGET_ARCH} == "amd64" + echo 'static const char *const multilib_raw[] = { \ + "aout maout;", "../lib32 32;", "elf !maout;", NULL };' > ${.TARGET} + echo 'static const char *const multilib_matches_raw[] = { \ + "maout maout;", "m32 32;", "melf melf;", NULL };' >> ${.TARGET} +.else echo 'static const char *const multilib_raw[] = { \ "aout maout;", "elf !maout;", NULL };' > ${.TARGET} echo 'static const char *const multilib_matches_raw[] = { \ "maout maout;", "melf melf;", NULL };' >> ${.TARGET} +.endif echo 'static const char *multilib_extra = "";' >> ${.TARGET} echo 'static const char *multilib_options = "";'>> ${.TARGET} --Boundary-00=_HYYVEiAWkBPnnPv--