conf/96570: cc can't build 32-bit executables on amd64
Mikhail Teterin
mi+kde at aldan.algebra.com
Mon May 1 04:00:38 UTC 2006
The following reply was made to PR conf/96570; it has been noted by GNATS.
From: Mikhail Teterin <mi+kde at aldan.algebra.com>
To: bug-followup at 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--
More information about the freebsd-bugs
mailing list