diff mbox

[powerpc] add multiarch definitions for powerpc-linux-gnu

Message ID 50A41CA2.4090908@ubuntu.com
State New
Headers show

Commit Message

Matthias Klose Nov. 14, 2012, 10:35 p.m. UTC
The following patch adds the multiarch definitions for -linux-gnu. Tested using
a Debian/Ubuntu package build. Ok for the trunk?

  Matthias

Comments

Joseph Myers Nov. 14, 2012, 10:41 p.m. UTC | #1
Your t-linux setting fails to allow for the possibility of the compiler 
being configured to default to soft-float (whether --with-float=soft, or 
--with-cpu etc. for a CPU that implies soft-float).  soft-float (only 
supported for 32-bit) is ABI-incompatible with hard-float and needs its 
own multiarch name.
Matthias Klose Nov. 14, 2012, 11:42 p.m. UTC | #2
Am 14.11.2012 23:41, schrieb Joseph S. Myers:
> Your t-linux setting fails to allow for the possibility of the compiler 
> being configured to default to soft-float (whether --with-float=soft, or 
> --with-cpu etc. for a CPU that implies soft-float).  soft-float (only 
> supported for 32-bit) is ABI-incompatible with hard-float and needs its 
> own multiarch name.

checking for --with-float=soft is ok, but I'm a bit lost which cpu's imply
soft-float. rs6000/t-fprules MULTILIB_MATCHES_FLOAT has a list of such cpu's.
Are these all cpu's which imply soft-float?

  Matthias
Joseph Myers Nov. 14, 2012, 11:55 p.m. UTC | #3
On Thu, 15 Nov 2012, Matthias Klose wrote:

> Am 14.11.2012 23:41, schrieb Joseph S. Myers:
> > Your t-linux setting fails to allow for the possibility of the compiler 
> > being configured to default to soft-float (whether --with-float=soft, or 
> > --with-cpu etc. for a CPU that implies soft-float).  soft-float (only 
> > supported for 32-bit) is ABI-incompatible with hard-float and needs its 
> > own multiarch name.
> 
> checking for --with-float=soft is ok, but I'm a bit lost which cpu's imply
> soft-float. rs6000/t-fprules MULTILIB_MATCHES_FLOAT has a list of such cpu's.
> Are these all cpu's which imply soft-float?

The CPUs implying soft-float are the ones using MASK_SOFT_FLOAT in 
rs6000-cpus.def.  If you follow MULTILIB_MATCHES_FLOAT, at least you won't 
be making things wrong in any case that currently works properly (but 
confirming the correctness of MULTILIB_MATCHES_FLOAT would certainly be 
good).
diff mbox

Patch

2012-11-14  Matthias Klose  <doko@ubuntu.com>

	* config/rs6000/t-linux64: Add multiarch names in MULTILIB_OSDIRNAMES.
	* config/rs6000/t-linux: New file; define MULTIARCH_DIRNAME.
	* config/rs6000/t-spe: Define MULTIARCH_DIRNAME.
	* config.gcc <powerpc-*-linux* | powerpc64-*-linux*> (tmake_file):
	Include rs6000/t-linux for 32bit non-biarch configurations.

Index: config/rs6000/t-linux64
===================================================================
--- config/rs6000/t-linux64	(revision 193508)
+++ config/rs6000/t-linux64	(working copy)
@@ -29,4 +29,5 @@ 
 MULTILIB_OPTIONS        = m64/m32
 MULTILIB_DIRNAMES       = 64 32
 MULTILIB_EXTRA_OPTS     = fPIC
-MULTILIB_OSDIRNAMES	= ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
+MULTILIB_OSDIRNAMES	= ../lib64$(call if_multiarch,:powerpc64-linux-gnu)
+MULTILIB_OSDIRNAMES    += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
Index: config/rs6000/t-spe
===================================================================
--- config/rs6000/t-spe	(revision 193508)
+++ config/rs6000/t-spe	(working copy)
@@ -71,3 +71,6 @@ 
 			  mabi=altivec/mlittle \
 			  maltivec/mlittle \
 			  maltivec/mabi=altivec/mlittle
+
+MULTIARCH_DIRNAME = powerpc-linux-gnuspe$(if $(findstring rs6000/e500-double.h, $(tm_file)),,v1)
+
Index: config/rs6000/t-linux
===================================================================
--- config/rs6000/t-linux	(revision 0)
+++ config/rs6000/t-linux	(revision 0)
@@ -0,0 +1 @@ 
+MULTIARCH_DIRNAME = powerpc-linux-gnu
Index: config.gcc
===================================================================
--- config.gcc	(revision 193508)
+++ config.gcc	(working copy)
@@ -2057,6 +2060,7 @@ 
 		;;
 	    *)
 		tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
+		tmake_file="$tmake_file rs6000/t-linux"
 		;;
 	esac
 	case ${target} in