Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Mar 2010 03:18:16 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r204996 - projects/ppc64/gnu/usr.bin/cc/cc_tools
Message-ID:  <201003110318.o2B3IGgl045102@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nwhitehorn
Date: Thu Mar 11 03:18:16 2010
New Revision: 204996
URL: http://svn.freebsd.org/changeset/base/204996

Log:
  Set up a multi-lib toolchain on powerpc64 and amd64. This lets cc -m32
  get working 32-bit binaries on powerpc64.

Modified:
  projects/ppc64/gnu/usr.bin/cc/cc_tools/Makefile

Modified: projects/ppc64/gnu/usr.bin/cc/cc_tools/Makefile
==============================================================================
--- projects/ppc64/gnu/usr.bin/cc/cc_tools/Makefile	Thu Mar 11 02:01:55 2010	(r204995)
+++ projects/ppc64/gnu/usr.bin/cc/cc_tools/Makefile	Thu Mar 11 03:18:16 2010	(r204996)
@@ -307,12 +307,22 @@ GENSRCS+=	gcov-iov.h
 
 # Multilib config file
 multilib.h:
+.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
+	echo 'static const char *const multilib_raw[] = { \
+	    ". !m64 !m32;", \
+	    "64:../lib m64 !m32;", \
+	    "32:../lib32 !m64 m32;", NULL };'			> ${.TARGET}
+	echo 'static const char *multilib_options = "m64/m32";'	>> ${.TARGET}
+	echo 'static const char *const multilib_matches_raw[] = { \
+	    "m64 m64;", "m32 m32;", NULL };'			>> ${.TARGET}
+.else
 	echo 'static const char *const multilib_raw[] = { \
 	    ". ;", NULL };'					> ${.TARGET}
+	echo 'static const char *multilib_options = "";'	>> ${.TARGET}
 	echo 'static const char *const multilib_matches_raw[] = { \
 	    NULL };'						>> ${.TARGET}
+.endif
 	echo 'static const char *multilib_extra = "";'		>> ${.TARGET}
-	echo 'static const char *multilib_options = "";'	>> ${.TARGET}
 	echo 'static const char *const multilib_exclusions_raw[] = { \
 	    NULL };'						>> ${.TARGET}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003110318.o2B3IGgl045102>