summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config.gcc5
-rw-r--r--gcc/config/arm/linux-eabi.h1
-rw-r--r--gcc/config/linux-android.h6
-rw-r--r--gcc/config/linux.h2
5 files changed, 20 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1f37815b0c5..5ce760f92ef 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2010-07-20 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * config.gcc (LIBC_GLIBC, LIBC_UCLIBC, LIBC_BIONIC): Move constants
+ to top level.
+ * config/linux.h (LINUX_TARGET_OS_CPP_BUILTINS): Move Android-specific
+ definitions ...
+ * config/linux-android.h (ANDROID_TARGET_OS_CPP_BUILTINS): ... here.
+ New macro.
+ * config/arm/linux-eabi.h (TARGET_OS_CPP_BUILTINS): Use it.
+
2010-07-19 Richard Sandiford <rdsandiford@googlemail.com>
* gengtype.c (start_root_entry): New function, split out from
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 31ea32e56f0..12b245d219d 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -405,6 +405,9 @@ case ${target} in
;;
esac
+# Common C libraries.
+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
+
# Common parts for widely ported systems.
case ${target} in
*-*-darwin*)
@@ -508,8 +511,6 @@ case ${target} in
*-*-gnu*)
tmake_file="$tmake_file t-gnu";;
esac
- # Common C libraries.
- tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
# glibc / uclibc / bionic switch.
# uclibc and bionic aren't usable for GNU/Hurd and neither for GNU/k*BSD.
case $target in
diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
index e69035e590d..1c034bc0496 100644
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
@@ -27,6 +27,7 @@
{ \
TARGET_BPABI_CPP_BUILTINS(); \
LINUX_TARGET_OS_CPP_BUILTINS(); \
+ ANDROID_TARGET_OS_CPP_BUILTINS(); \
} \
while (false)
diff --git a/gcc/config/linux-android.h b/gcc/config/linux-android.h
index a43bab5b035..94c52748fdb 100644
--- a/gcc/config/linux-android.h
+++ b/gcc/config/linux-android.h
@@ -20,6 +20,12 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define ANDROID_TARGET_OS_CPP_BUILTINS() \
+ do { \
+ if (OPTION_ANDROID) \
+ builtin_define ("__ANDROID__"); \
+ } while (0)
+
#if ANDROID_DEFAULT
# define NOANDROID "mno-android"
#else
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
index 241e65668f0..e283a9a3305 100644
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
@@ -96,8 +96,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
builtin_assert ("system=linux"); \
builtin_assert ("system=unix"); \
builtin_assert ("system=posix"); \
- if (OPTION_ANDROID) \
- builtin_define ("__ANDROID__"); \
} while (0)
#if defined(HAVE_LD_EH_FRAME_HDR)