This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [buildrobot] gcc/config/linux-android.c:40:7: error: ‘OPTION_BIONIC’ was not declared in this scope
- From: Alexander Ivchenko <aivchenk at gmail dot com>
- To: Jan-Benedict Glaw <jbglaw at lug-owl dot de>, gcc <gcc at gcc dot gnu dot org>
- Date: Tue, 20 Aug 2013 11:24:31 +0400
- Subject: Re: [buildrobot] gcc/config/linux-android.c:40:7: error: ‘OPTION_BIONIC’ was not declared in this scope
- References: <20130819151335 dot GL8269 at lug-owl dot de>
Hi, thanks for cathing this.
I certainly missed that OPTION_BIONIC is not defined for linux targets
that do not include config/linux.h in their tm.h.
This patch fixed build for powerpc64le-linux and mn10300-linux.
linux_libc, LIBC_GLIBC, LIBC_BIONIC should be defined for all targets.
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 56e6fd4..6bb18f8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2013-08-20 Alexander Ivchenko <alexander.ivchenko@intel.com>
+
+ * config/linux-android.c (linux_android_libc_has_function): Fix
+ checks for libc.
+
2013-08-20 Zhouyi Zhou <yizhouzhou@ict.ac.cn>
* tree-ssa-ccp.c (get_default_value): Remove redundant condition
diff --git a/gcc/config/linux-android.c b/gcc/config/linux-android.c
index 4a4b48d..e9d9e9a 100644
--- a/gcc/config/linux-android.c
+++ b/gcc/config/linux-android.c
@@ -35,9 +35,9 @@ linux_android_has_ifunc_p (void)
bool
linux_android_libc_has_function (enum function_class fn_class)
{
- if (OPTION_GLIBC)
+ if (linux_libc == LIBC_GLIBC)
return true;
- if (OPTION_BIONIC)
+ if (linux_libc == LIBC_BIONIC)
if (fn_class == function_c94
|| fn_class == function_c99_misc
|| fn_class == function_sincos)
is it OK?
thanks,
Alexander
2013/8/19 Jan-Benedict Glaw <jbglaw@lug-owl.de>:
> Hi!
>
> My build robot[1] catched this error[2] while cross-building for
> powerpc64le-linux:
>
> g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -I. -I../../../../gcc/gcc -I../../../../gcc/gcc/. -I../../../../gcc/gcc/../include -I../../../../gcc/gcc/../libcpp/include -I../../../../gcc/gcc/../libdecnumber -I../../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../../../gcc/gcc/../libbacktrace -I. -I. -I../../../../gcc/gcc -I../../../../gcc/gcc/. -I../../../../gcc/gcc/../include -I../../../../gcc/gcc/../libcpp/include -I../../../../gcc/gcc/../libdecnumber -I../../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../../../gcc/gcc/../libbacktrace \
> ../../../../gcc/gcc/config/linux-android.c
> ../../../../gcc/gcc/config/linux-android.c: In function ‘bool linux_android_libc_has_function(function_class)’:
> ../../../../gcc/gcc/config/linux-android.c:40:7: error: ‘OPTION_BIONIC’ was not declared in this scope
> if (OPTION_BIONIC)
> ^
> make[2]: *** [linux-android.o] Error 1
>
> Probably introduced with r201838
> (http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=201838). I
> guess it's just a forgotten chunk.
>
> MfG, JBG
> [1] http://toolchain.lug-owl.de/buildbot/
> [2] http://toolchain.lug-owl.de/buildbot/#job8903
>
> --
> Jan-Benedict Glaw jbglaw@lug-owl.de +49-172-7608481
> Signature of: http://perl.plover.com/Questions.html
> the second :