Message ID | CACysShgizQUGOP8hwjbOQon7JJVRpUoPtCqCn+r=tsSo_oByWA@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Aug 15, 2014, at 6:49 AM, Alexander Ivchenko <aivchenk@gmail.com> wrote: > * lib/target-supports.exp (error_h): New check. > (libc_has_complex_functions): Ditto. > (tgmath_h): Ditto. > * gcc.dg/builtins-59.c: Add libc_has_complex_functions check. > * gcc.dg/builtins-61.c: Likewise. > * gcc.dg/builtins-67.c: Disable test for Bionic. > * gcc.dg/strlenopt-14g.c: Likewise. > * gcc.dg/strlenopt-14gf.c: Likewise. > * gcc.dg/c99-tgmath-1.c: Add tgmath_h check. > * gcc.dg/c99-tgmath-2.c: Likewise. > * gcc.dg/c99-tgmath-3.c: Likewise. > * gcc.dg/c99-tgmath-4.c: Likewise. > * gcc.dg/dfp/convert-dfp-round-thread.c: Add error_h check. Ok, thanks.
can you file bugs against bionic for stuff like this? use b.android.com (and feel free to mail me to ensure that they get noticed). one thing we'd like to do is get to a point where we're building gcc/gdb et cetera without any local hacks, and when we've got to that point, we're going to have to go through anything that made it upstream to check that that's sane. (the weird "-shared implies -Bsymbolic" GCC hack springs to mind.) On Fri, Aug 15, 2014 at 10:25 AM, Mike Stump <mikestump@comcast.net> wrote: > On Aug 15, 2014, at 6:49 AM, Alexander Ivchenko <aivchenk@gmail.com> wrote: >> * lib/target-supports.exp (error_h): New check. >> (libc_has_complex_functions): Ditto. >> (tgmath_h): Ditto. >> * gcc.dg/builtins-59.c: Add libc_has_complex_functions check. >> * gcc.dg/builtins-61.c: Likewise. >> * gcc.dg/builtins-67.c: Disable test for Bionic. >> * gcc.dg/strlenopt-14g.c: Likewise. >> * gcc.dg/strlenopt-14gf.c: Likewise. >> * gcc.dg/c99-tgmath-1.c: Add tgmath_h check. >> * gcc.dg/c99-tgmath-2.c: Likewise. >> * gcc.dg/c99-tgmath-3.c: Likewise. >> * gcc.dg/c99-tgmath-4.c: Likewise. >> * gcc.dg/dfp/convert-dfp-round-thread.c: Add error_h check. > > Ok, thanks.
On Aug 15, 2014, at 10:32 AM, enh <enh@google.com> wrote:
> can you file bugs against bionic for stuff like this?
I suspect you meant to ask Alexander this question… but just in case you did intend to ask me, no. I don’t have any visibility into android local patches or procedures.
In the end, people with local patches that submit them, have to track them themselves. I usually do this by merging into the local tree and the merge tree the FSF version of the work once that work makes it into the FSF tree. Works well and eliminates merge conflicts.
On Fri, Aug 15, 2014 at 10:56 AM, Mike Stump <mikestump@comcast.net> wrote: > On Aug 15, 2014, at 10:32 AM, enh <enh@google.com> wrote: >> can you file bugs against bionic for stuff like this? > > I suspect you meant to ask Alexander this question… but just in case you did intend to ask me, no. I don’t have any visibility into android local patches or procedures. yeah, i meant people proposing Android-related changes. in this case, Alexander. --elliott
2014-08-15 21:32 GMT+04:00 enh <enh@google.com>: > can you file bugs against bionic for stuff like this? use > b.android.com (and feel free to mail me to ensure that they get > noticed). Sure, I will do that. > one thing we'd like to do is get to a point where we're building > gcc/gdb et cetera without any local hacks, and when we've got to that > point, we're going to have to go through anything that made it > upstream to check that that's sane. (the weird "-shared implies > -Bsymbolic" GCC hack springs to mind.) There are more of those hacks for sure (actually "shared implies -Bsymbolic" is in gcc trunk, so it is not a local hack (Although, it doesn't neceseraly mean that it doesn't have to be changed. But there are certanly other things that are local and have to be upstreamed). From our side we are trying to upstream things first and then, if neccessary, to port them to ndk. --Alexander
On Fri, Aug 15, 2014 at 1:05 PM, Alexander Ivchenko <aivchenk@gmail.com> wrote: > 2014-08-15 21:32 GMT+04:00 enh <enh@google.com>: >> can you file bugs against bionic for stuff like this? use >> b.android.com (and feel free to mail me to ensure that they get >> noticed). > > Sure, I will do that. > >> one thing we'd like to do is get to a point where we're building >> gcc/gdb et cetera without any local hacks, and when we've got to that >> point, we're going to have to go through anything that made it >> upstream to check that that's sane. (the weird "-shared implies >> -Bsymbolic" GCC hack springs to mind.) > > There are more of those hacks for sure (actually "shared implies > -Bsymbolic" is in gcc trunk, so it is not a local hack (Although, it > doesn't neceseraly mean that it doesn't have to be changed. yeah, this is the kind of thing that worries me most: where bad ideas have been upstreamed, so now not only do we need to remove them from Android's copy, we need to get them out of upstream GCC too. > But there > are certanly other things that are local and have to be upstreamed). > From our side we are trying to upstream things first and then, if > neccessary, to port them to ndk. > > --Alexander
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 505df55..02268e6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,19 @@ +2014-08-15 Alexander Ivchenko <alexander.ivchenko@intel.com> + + * lib/target-supports.exp (error_h): New check. + (libc_has_complex_functions): Ditto. + (tgmath_h): Ditto. + * gcc.dg/builtins-59.c: Add libc_has_complex_functions check. + * gcc.dg/builtins-61.c: Likewise. + * gcc.dg/builtins-67.c: Disable test for Bionic. + * gcc.dg/strlenopt-14g.c: Likewise. + * gcc.dg/strlenopt-14gf.c: Likewise. + * gcc.dg/c99-tgmath-1.c: Add tgmath_h check. + * gcc.dg/c99-tgmath-2.c: Likewise. + * gcc.dg/c99-tgmath-3.c: Likewise. + * gcc.dg/c99-tgmath-4.c: Likewise. + * gcc.dg/dfp/convert-dfp-round-thread.c: Add error_h check. + 2014-08-15 Jakub Jelinek <jakub@redhat.com> Tobias Burnus <burnus@net-b.de> diff --git a/gcc/testsuite/gcc.dg/builtins-59.c b/gcc/testsuite/gcc.dg/builtins-59.c index b940d39..f5c1803 100644 --- a/gcc/testsuite/gcc.dg/builtins-59.c +++ b/gcc/testsuite/gcc.dg/builtins-59.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-fdump-tree-gimple" } */ /* { dg-require-effective-target c99_runtime } */ +/* { dg-require-effective-target libc_has_complex_functions } */ double test (double x) { diff --git a/gcc/testsuite/gcc.dg/builtins-61.c b/gcc/testsuite/gcc.dg/builtins-61.c index dff163f..a3310af 100644 --- a/gcc/testsuite/gcc.dg/builtins-61.c +++ b/gcc/testsuite/gcc.dg/builtins-61.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O -ffast-math -fdump-tree-optimized" } */ /* { dg-require-effective-target c99_runtime } */ +/* { dg-require-effective-target libc_has_complex_functions } */ double test1 (double x) { diff --git a/gcc/testsuite/gcc.dg/builtins-67.c b/gcc/testsuite/gcc.dg/builtins-67.c index 22267bd..0992fe1 100644 --- a/gcc/testsuite/gcc.dg/builtins-67.c +++ b/gcc/testsuite/gcc.dg/builtins-67.c @@ -3,6 +3,8 @@ /* { dg-do link } */ /* { dg-options "-ffast-math -lm" } */ /* { dg-add-options c99_runtime } */ +/* Bionic doesn't have rintl */ +/* { dg-require-effective-target non_bionic } */ #include "builtins-config.h" diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-1.c b/gcc/testsuite/gcc.dg/c99-tgmath-1.c index c7d848c..cfa02a9 100644 --- a/gcc/testsuite/gcc.dg/c99-tgmath-1.c +++ b/gcc/testsuite/gcc.dg/c99-tgmath-1.c @@ -3,6 +3,7 @@ /* { dg-do preprocess { target c99_runtime } } */ /* { dg-options "-std=iso9899:1999" } */ /* { dg-add-options c99_runtime } */ +/* { dg-require-effective-target tgmath_h } */ /* Test that tgmath defines the macros it's supposed to. */ #include <tgmath.h> diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-2.c b/gcc/testsuite/gcc.dg/c99-tgmath-2.c index d4f1f87..1a1153c 100644 --- a/gcc/testsuite/gcc.dg/c99-tgmath-2.c +++ b/gcc/testsuite/gcc.dg/c99-tgmath-2.c @@ -3,6 +3,7 @@ /* { dg-do compile { target c99_runtime } } */ /* { dg-options "-std=iso9899:1999" } */ /* { dg-add-options c99_runtime } */ +/* { dg-require-effective-target tgmath_h } */ /* Test that invoking type-generic sin on a float invokes sinf. */ #include <tgmath.h> diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-3.c b/gcc/testsuite/gcc.dg/c99-tgmath-3.c index 3e98304..a595cf6 100644 --- a/gcc/testsuite/gcc.dg/c99-tgmath-3.c +++ b/gcc/testsuite/gcc.dg/c99-tgmath-3.c @@ -3,6 +3,7 @@ /* { dg-do compile { target c99_runtime } } */ /* { dg-options "-std=iso9899:1999" } */ /* { dg-add-options c99_runtime } */ +/* { dg-require-effective-target tgmath_h } */ /* Test that invoking type-generic exp on a complex invokes cexp. */ #include <tgmath.h> diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-4.c b/gcc/testsuite/gcc.dg/c99-tgmath-4.c index d8dc043..c05a1c5 100644 --- a/gcc/testsuite/gcc.dg/c99-tgmath-4.c +++ b/gcc/testsuite/gcc.dg/c99-tgmath-4.c @@ -3,6 +3,7 @@ /* { dg-do compile { target c99_runtime } } */ /* { dg-options "-std=iso9899:1999" } */ /* { dg-add-options c99_runtime } */ +/* { dg-require-effective-target tgmath_h } */ /* Test that invoking type-generic pow on complex float invokes cpowf. */ #include <tgmath.h> diff --git a/gcc/testsuite/gcc.dg/dfp/convert-dfp-round-thread.c b/gcc/testsuite/gcc.dg/dfp/convert-dfp-round-thread.c index 6727e80..59d9569 100644 --- a/gcc/testsuite/gcc.dg/dfp/convert-dfp-round-thread.c +++ b/gcc/testsuite/gcc.dg/dfp/convert-dfp-round-thread.c @@ -1,5 +1,7 @@ /* { dg-options "-std=gnu99 -D_GNU_SOURCE -pthread" } */ /* { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } */ +/* { dg-require-effective-target error_h } */ + /* N1150 5.2: Conversions among decimal floating types and between decimal floating types and generic floating types. diff --git a/gcc/testsuite/gcc.dg/strlenopt-14g.c b/gcc/testsuite/gcc.dg/strlenopt-14g.c index 86c57f1..809205b 100644 --- a/gcc/testsuite/gcc.dg/strlenopt-14g.c +++ b/gcc/testsuite/gcc.dg/strlenopt-14g.c @@ -1,6 +1,8 @@ /* This test needs runtime that provides stpcpy and mempcpy functions. */ /* { dg-do run { target *-*-linux* *-*-gnu* } } */ /* { dg-options "-O2 -fdump-tree-strlen" } */ +/* Bionic targets don't have mempcpy and stpcpy */ +/* { dg-require-effective-target non_bionic } */ #define USE_GNU #include "strlenopt.h" diff --git a/gcc/testsuite/gcc.dg/strlenopt-14gf.c b/gcc/testsuite/gcc.dg/strlenopt-14gf.c index 8b78538..e09a3fc 100644 --- a/gcc/testsuite/gcc.dg/strlenopt-14gf.c +++ b/gcc/testsuite/gcc.dg/strlenopt-14gf.c @@ -2,6 +2,8 @@ functions. */ /* { dg-do run { target *-*-linux* *-*-gnu* } } */ /* { dg-options "-O2 -fdump-tree-strlen" } */ +/* Bionic targets don't have mempcpy and stpcpy */ +/* { dg-require-effective-target non_bionic } */ #define FORTIFY_SOURCE 2 #include "strlenopt-14g.c" diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index c03370d..4ed4439 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5054,6 +5054,30 @@ proc check_effective_target_non_bionic {} { }] } +# Return true if this target has error.h header. + +proc check_effective_target_error_h {} { + return [check_no_compiler_messages error_h object { + #include <error.h> + }] +} + +# Return true if this target has tgmath.h header. + +proc check_effective_target_tgmath_h {} { + return [check_no_compiler_messages tgmath_h object { + #include <tgmath.h> + }] +} + +# Return true if target's libc supports complex functions. + +proc check_effective_target_libc_has_complex_functions {} { + return [check_no_compiler_messages libc_has_complex_functions object { + #include <complex.h> + }] +} + # Return 1 if # (a) an error of a few ULP is expected in string to floating-point # conversion functions; and