diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-07-29 11:20:04 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-07-29 11:20:04 -0700 |
commit | 60b57502ec8b600dac3fe53aa6615965f0430a6d (patch) | |
tree | 45607eb49d823f8f4c6f619cb438a8979124786c /ld | |
parent | de0a00263930c9ed3e4e330a0d8573df4805fe87 (diff) | |
download | gdb-60b57502ec8b600dac3fe53aa6615965f0430a6d.zip gdb-60b57502ec8b600dac3fe53aa6615965f0430a6d.tar.gz gdb-60b57502ec8b600dac3fe53aa6615965f0430a6d.tar.bz2 |
Use noclone attribute only for GCC 4.5 or newer
noclone attribute was added to GCC 4.5. We should check GCC version
before using it.
* ld-elf/pr18718.c (bar): Use noclone attribute only for GCC
4.5 or newer.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr18718.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index a9e5a7b..267361f 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2015-07-29 H.J. Lu <hongjiu.lu@intel.com> + * ld-elf/pr18718.c (bar): Use noclone attribute only for GCC + 4.5 or newer. + +2015-07-29 H.J. Lu <hongjiu.lu@intel.com> + * ld-size/size.exp: Move run-time support check. 2015-07-28 Alan Modra <amodra@gmail.com> diff --git a/ld/testsuite/ld-elf/pr18718.c b/ld/testsuite/ld-elf/pr18718.c index 2f4c2a3..5ec1b9e 100644 --- a/ld/testsuite/ld-elf/pr18718.c +++ b/ld/testsuite/ld-elf/pr18718.c @@ -11,7 +11,11 @@ new_foo (void) __asm__(".symver new_foo, foo@@VERS_2.0"); +#if defined(__GNUC__) && (__GNUC__ * 1000 + __GNUC_MINOR__) >= 4005 __attribute__ ((noinline, noclone)) +#else +__attribute__ ((noinline)) +#endif int bar (void) { |