diff mbox series

[RS6000] PR91135, __linux__ not defined with -mcall-aixdesc on 9.x and ppc64

Message ID 20190727053618.GQ3379@bubble.grove.modra.org
State New
Headers show
Series [RS6000] PR91135, __linux__ not defined with -mcall-aixdesc on 9.x and ppc64 | expand

Commit Message

Alan Modra July 27, 2019, 5:36 a.m. UTC
This patch makes the obvious fix for PR91135, and deletes extraneous
copies of GNU_USER_TARGET_D_OS_VERSIONS that appear in rs6000/linux.h
and rs6000/linux64.h.  Since all configurations using either of these
files also inclue linux.h there is no need to duplicate the macro.

Bootstrapped and regression tested powerpc64le-linux.  OK for
mainline and backporting?

	PR target/91135
	* config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Don't
	define.
	* config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Invoke
	GNU_USER_TARGET_OS_CPP_BUILTINS for aixdesc abi.
	(GNU_USER_TARGET_D_OS_VERSIONS): Don't define.

Comments

Segher Boessenkool July 27, 2019, 6:25 p.m. UTC | #1
On Sat, Jul 27, 2019 at 03:06:18PM +0930, Alan Modra wrote:
> This patch makes the obvious fix for PR91135, and deletes extraneous
> copies of GNU_USER_TARGET_D_OS_VERSIONS that appear in rs6000/linux.h
> and rs6000/linux64.h.  Since all configurations using either of these
> files also inclue linux.h there is no need to duplicate the macro.
> 
> Bootstrapped and regression tested powerpc64le-linux.  OK for
> mainline and backporting?

Okay for trunk.  Okay for backports after a week or so.  Thanks!


Segher
diff mbox series

Patch

diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h
index 96b97877989..ffceb32bf65 100644
--- a/gcc/config/rs6000/linux.h
+++ b/gcc/config/rs6000/linux.h
@@ -59,19 +59,6 @@ 
     }							\
   while (0)
 
-#define GNU_USER_TARGET_D_OS_VERSIONS()		\
-    do {					\
-	builtin_version ("linux");		\
-	if (OPTION_GLIBC)			\
-	  builtin_version ("CRuntime_Glibc");	\
-	else if (OPTION_UCLIBC)			\
-	  builtin_version ("CRuntime_UClibc");	\
-	else if (OPTION_BIONIC)			\
-	  builtin_version ("CRuntime_Bionic");	\
-	else if (OPTION_MUSL)			\
-	  builtin_version ("CRuntime_Musl");	\
-    } while (0)
-
 #undef	CPP_OS_DEFAULT_SPEC
 #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
 
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index ba5f640efc8..4d329b544ad 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -372,7 +372,8 @@  extern int dot_symbols;
 #define TARGET_OS_CPP_BUILTINS()			\
   do							\
     {							\
-      if (strcmp (rs6000_abi_name, "linux") == 0)	\
+      if (strcmp (rs6000_abi_name, "linux") == 0	\
+	  || strcmp (rs6000_abi_name, "aixdesc") == 0)	\
 	GNU_USER_TARGET_OS_CPP_BUILTINS();		\
       if (TARGET_64BIT)					\
 	{						\
@@ -396,19 +397,6 @@  extern int dot_symbols;
     }							\
   while (0)
 
-#define GNU_USER_TARGET_D_OS_VERSIONS()		\
-    do {					\
-	builtin_version ("linux");		\
-	if (OPTION_GLIBC)			\
-	  builtin_version ("CRuntime_Glibc");	\
-	else if (OPTION_UCLIBC)			\
-	  builtin_version ("CRuntime_UClibc");	\
-	else if (OPTION_BIONIC)			\
-	  builtin_version ("CRuntime_Bionic");	\
-	else if (OPTION_MUSL)			\
-	  builtin_version ("CRuntime_Musl");	\
-    } while (0)
-
 #undef  CPP_OS_DEFAULT_SPEC
 #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux) %(include_extra)"