Skip to content

Commit

Permalink
Allow building for x86 Linux on GCC < 4.5
Browse files Browse the repository at this point in the history
Signed-off-by: Giel van Schijndel <me@mortis.eu>
  • Loading branch information
muggenhor committed Jan 14, 2014
1 parent bae7251 commit 6cce4ca
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions platform/switch_x86_unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,15 @@
/* the above works fine with gcc 2.96, but 2.95.3 wants this */
#define STACK_MAGIC 0

#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
# define ATTR_NOCLONE __attribute__((noclone))
#else
# define ATTR_NOCLONE
#endif

/* See below for the purpose of this function. */
__attribute__((noinline, noclone)) int fancy_return_zero(void);
__attribute__((noinline, noclone)) int
__attribute__((noinline)) ATTR_NOCLONE int fancy_return_zero(void);
__attribute__((noinline)) ATTR_NOCLONE int
fancy_return_zero(void)
{
return 0;
Expand Down

0 comments on commit 6cce4ca

Please sign in to comment.