1 | /* |
1 | /* |
2 | * Copyright (c) 2001-2006 Marc Alexander Lehmann <schmorp@schmorp.de> |
2 | * Copyright (c) 2001-2008 Marc Alexander Lehmann <schmorp@schmorp.de> |
3 | * |
3 | * |
4 | * Redistribution and use in source and binary forms, with or without modifica- |
4 | * Redistribution and use in source and binary forms, with or without modifica- |
5 | * tion, are permitted provided that the following conditions are met: |
5 | * tion, are permitted provided that the following conditions are met: |
6 | * |
6 | * |
7 | * 1. Redistributions of source code must retain the above copyright notice, |
7 | * 1. Redistributions of source code must retain the above copyright notice, |
… | |
… | |
66 | static volatile coro_func coro_init_func; |
66 | static volatile coro_func coro_init_func; |
67 | static volatile void *coro_init_arg; |
67 | static volatile void *coro_init_arg; |
68 | static volatile coro_context *new_coro, *create_coro; |
68 | static volatile coro_context *new_coro, *create_coro; |
69 | |
69 | |
70 | /* what we really want to detect here is wether we use a new-enough version of GAS */ |
70 | /* what we really want to detect here is wether we use a new-enough version of GAS */ |
71 | /* instead, check for gcc 3 and ELF and hope for the best */ |
71 | /* instead, check for gcc 3, ELF and GNU/Linux and hope for the best */ |
72 | #if __GNUC__ >= 3 && __ELF__ |
72 | #if __GNUC__ >= 3 && __ELF__ && __linux__ |
73 | # define HAVE_CFI 1 |
73 | # define HAVE_CFI 1 |
74 | #endif |
74 | #endif |
75 | |
75 | |
76 | static void |
76 | static void |
77 | coro_init (void) |
77 | coro_init (void) |