[PATCH] Fix ppc64-linux --with-cpu=default32 build

Jakub Jelinek jakub@redhat.com
Wed Mar 17 14:42:00 GMT 2004


Hi!

Recent t-linux64 changes broke ppc64-linux --with-cpu=default32.
If -m32 is the default, it doesn't appear on the command line and so
%{!m32:-mlong-double-128} expands to -mlong-double-128 for both 32-bit
and 64-bit libgcc (which means ICEs when trying to expand TImode
shifts in 32-bit mode).
Bootstrapped on ppc64-linux and ppc64-linux --with-cpu=default32.
Ok for trunk/3.4?

2004-03-17  Jakub Jelinek  <jakub@redhat.com>

	* config/rs6000/t-linux64 (bispecs): Don't add -mlong-double-128 for
	32-bit builds when defaulting to 32-bit.

--- gcc/config/rs6000/t-linux64.jj	2004-03-12 14:14:33.000000000 +0100
+++ gcc/config/rs6000/t-linux64	2004-03-16 21:08:04.533718637 +0100
@@ -37,5 +37,8 @@ fp-bit32.c: $(srcdir)/config/fp-bit.c
 mklibgcc: bispecs
 
 bispecs: specs
-	sed -e '/cc1_options/{ n; s/$$/ %{!m32:-mlong-double-128}/; }' < specs > $@
-
+	if [ x`$(GCC_FOR_TARGET) -print-multi-os-directory` = x../lib ]; then \
+	  sed -e '/cc1_options/{ n; s/$$/ %{m64:-mlong-double-128}/; }' < specs > $@; \
+	else \
+	  sed -e '/cc1_options/{ n; s/$$/ %{!m32:-mlong-double-128}/; }' < specs > $@; \
+	fi

	Jakub



More information about the Gcc-patches mailing list