]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/65286 (When building on powerpc64le-unknown-linux-gnu, --disable-multili...
authorAlan Modra <amodra@gmail.com>
Mon, 9 Mar 2015 23:19:44 +0000 (09:49 +1030)
committerAlan Modra <amodra@gcc.gnu.org>
Mon, 9 Mar 2015 23:19:44 +0000 (09:49 +1030)
PR target/65286
* config.gcc (powerpc*-*-linux*): Arrange for powerpc64le-linux
to be single-arch by default.  Set cpu_is_64bit for powerpc64
given --with-cpu=native.
* config/rs6000/t-fprules: Do not set default MULTILIB vars.
* config/rs6000/t-linux (MULTIARCH_DIRNAME): Support powerpc64
and powerpc64le.
* config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Test
rs6000_isa_flags rather than TARGET_64BIT.

From-SVN: r221290

gcc/ChangeLog
gcc/config.gcc
gcc/config/rs6000/linux64.h
gcc/config/rs6000/t-fprules
gcc/config/rs6000/t-linux

index 67d89de92a070ae8ba6ed79b320fdffbaa047cee..3e516203c60cf153f3e0ce6ff58e50897288c09d 100644 (file)
@@ -1,3 +1,15 @@
+2015-03-10  Alan Modra  <amodra@gmail.com>
+
+       PR target/65286
+       * config.gcc (powerpc*-*-linux*): Arrange for powerpc64le-linux
+       to be single-arch by default.  Set cpu_is_64bit for powerpc64
+       given --with-cpu=native.
+       * config/rs6000/t-fprules: Do not set default MULTILIB vars.
+       * config/rs6000/t-linux (MULTIARCH_DIRNAME): Support powerpc64
+       and powerpc64le.
+       * config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Test
+       rs6000_isa_flags rather than TARGET_64BIT.
+
 2015-03-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
        Backport from trunk
index 57a415ba7db67abdc1266c8182eb604b3c9396c0..35695539772ea0174ff438a406a460d29ac6fc9b 100644 (file)
@@ -2078,27 +2078,31 @@ powerpc-*-rtems*)
 powerpc*-*-linux*)
        tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
        extra_options="${extra_options} rs6000/sysv4.opt"
-       tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
+       tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
        case ${target} in
            powerpc*le-*-*)
                tm_file="${tm_file} rs6000/sysv4le.h" ;;
        esac
-       maybe_biarch=yes
+       case ${target}:${with_cpu} in
+           powerpc64*: | powerpc64*:native) cpu_is_64bit=yes ;;
+       esac
+       maybe_biarch=${cpu_is_64bit}
+       case ${enable_targets} in
+           *powerpc64*) maybe_biarch=yes ;;
+       esac
        case ${target} in
            powerpc64*-*-linux*spe* | powerpc64*-*-linux*paired*)
-               echo "*** Configuration ${target} not supported" 1>&2
+               echo "*** Configuration ${target} not supported" 1>&2
                exit 1
                ;;
            powerpc*-*-linux*spe* | powerpc*-*-linux*paired*)
                maybe_biarch=
                ;;
-           powerpc64*-*-linux*)
-               test x$with_cpu != x || cpu_is_64bit=yes
-               maybe_biarch=always
-               ;;
        esac
-       case ${maybe_biarch}:${enable_targets}:${cpu_is_64bit} in
-           always:* | yes:*powerpc64* | yes:all:* | yes:*:yes)
+       case ${target}:${enable_targets}:${maybe_biarch} in
+           powerpc64-* | powerpc-*:*:yes | *:*powerpc64-*:yes | *:all:yes \
+           | powerpc64le*:*powerpcle* | powerpc64le*:*powerpc-* \
+           | powerpcle-*:*powerpc64le*:yes)
                if test x$cpu_is_64bit = xyes; then
                    tm_file="${tm_file} rs6000/default64.h"
                fi
@@ -2119,9 +2123,14 @@ powerpc*-*-linux*)
                esac
                extra_options="${extra_options} rs6000/linux64.opt"
                ;;
+           powerpc64*)
+               tm_file="${tm_file} rs6000/default64.h rs6000/linux64.h glibc-stdint.h"
+               extra_options="${extra_options} rs6000/linux64.opt"
+               tmake_file="${tmake_file} rs6000/t-linux"
+               ;;
            *)
                tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
-               tmake_file="$tmake_file rs6000/t-linux"
+               tmake_file="${tmake_file} rs6000/t-ppcos rs6000/t-linux"
                ;;
        esac
        case ${target} in
index 8371fb7e5c841e0ebabe1ba50c53e3f2c2e20ccf..aa74e68393e81f6507debcb404b76922a932d3d1 100644 (file)
@@ -97,7 +97,7 @@ extern int dot_symbols;
     {                                                          \
       if (!global_options_set.x_rs6000_alignment_flags)                \
        rs6000_alignment_flags = MASK_ALIGN_NATURAL;            \
-      if (TARGET_64BIT)                                                \
+      if (rs6000_isa_flags & OPTION_MASK_64BIT)                        \
        {                                                       \
          if (DEFAULT_ABI != ABI_AIX)                           \
            {                                                   \
index 2ae04da27a3702824588bacaf4ebf8c0ee298605..46f581a90938a244464eb6833535e34262fd7794 100644 (file)
@@ -18,9 +18,3 @@
 
 SOFT_FLOAT_CPUS = e300c2 401 403 405 440 464 476 ec603e 801 821 823 860
 MULTILIB_MATCHES_FLOAT = $(foreach cpu, $(SOFT_FLOAT_CPUS), msoft-float=mcpu?$(cpu))
-
-# Build the libraries for both hard and soft floating point by default
-
-MULTILIB_OPTIONS = msoft-float
-MULTILIB_DIRNAMES = soft-float
-MULTILIB_MATCHES       = ${MULTILIB_MATCHES_FLOAT}
index 017a293cde3095b8a3dcda80cff6951ee05077cc..61aced6ae0ee348a7c8a3245b396a506ca3e519d 100644 (file)
@@ -1,9 +1,16 @@
 # do not define the multiarch name if configured for a soft-float cpu
 # or soft-float.
 ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float)))
+ifneq (,$(findstring powerpc64,$(target)))
+MULTIARCH_DIRNAME := powerpc64-linux-gnu
+else
 ifneq (,$(findstring spe,$(target)))
-MULTIARCH_DIRNAME = powerpc-linux-gnuspe$(if $(findstring rs6000/e500-double.h, $(tm_file_list)),,v1)
+MULTIARCH_DIRNAME := powerpc-linux-gnuspe$(if $(findstring rs6000/e500-double.h, $(tm_file_list)),,v1)
 else
-MULTIARCH_DIRNAME = powerpc-linux-gnu
+MULTIARCH_DIRNAME := powerpc-linux-gnu
+endif
+endif
+ifneq (,$(findstring powerpcle,$(target))$(findstring powerpc64le,$(target)))
+MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME))
 endif
 endif