diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c02e488d90c41953cd0795a1e4cd85fda3901d65..405bc38fb75b210f57776b32074b59d45317bac3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
 2019-03-05  Jakub Jelinek  <jakub@redhat.com>
 
+	PR target/89587
+	* config/rs6000/t-linux (MULTIARCH_DIRNAME): Set to non-empty only
+	if_multiarch.
+
 	PR middle-end/89590
 	* builtins.c (maybe_emit_free_warning): Punt if free doesn't have
 	exactly one argument.
diff --git a/gcc/config/rs6000/t-linux b/gcc/config/rs6000/t-linux
index acfde1f48aecfd658b11258d9fdeb2dfa9871db6..aeb7440c49206707f76ec1415365c0e823dac5a3 100644
--- a/gcc/config/rs6000/t-linux
+++ b/gcc/config/rs6000/t-linux
@@ -4,7 +4,7 @@ ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float)))
 ifneq (,$(findstring powerpc64,$(target)))
 MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
 else
-MULTIARCH_DIRNAME := powerpc-linux-gnu
+MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnu)
 endif
 ifneq (,$(findstring powerpcle,$(target)))
 MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME))