Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow building for x86 Linux on GCC < 4.5 #40

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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