This patch defines _ILP32 and __ILP32__ for the AArch64 port when the ILP32 ABI is in use.

This helps libraries, e.g. libgloss and glibc, recognize which model is being compiled.

OK for the trunk?

Thanks,
Yufeng


gcc/
        * config/aarch64/aarch64.h (TARGET_CPU_CPP_BUILTINS): Define _ILP32
        and __ILP32__ when the ILP32 model is in use.

diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
index d468dd8..e5dadb3 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -49,6 +49,11 @@
 	    break;					\
 	}						\
 							\
+      if (TARGET_ILP32)					\
+	{						\
+	  cpp_define (parse_in, "_ILP32");		\
+	  cpp_define (parse_in, "__ILP32__");		\
+	}						\
     } while (0)
 
 

Reply via email to