From: H.J. Lu Date: Wed, 29 Jul 2015 18:20:04 +0000 (-0700) Subject: Use noclone attribute only for GCC 4.5 or newer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=60b57502ec8b600dac3fe53aa6615965f0430a6d;p=binutils-gdb.git 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. --- diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index a9e5a7be9dd..267361f6bb7 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-07-29 H.J. Lu + + * ld-elf/pr18718.c (bar): Use noclone attribute only for GCC + 4.5 or newer. + 2015-07-29 H.J. Lu * ld-size/size.exp: Move run-time support check. diff --git a/ld/testsuite/ld-elf/pr18718.c b/ld/testsuite/ld-elf/pr18718.c index 2f4c2a3de2d..5ec1b9ebffb 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) {