|
1 | 1 | if test "$GCC" = yes; then
|
2 | 2 | THREAD_CPPFLAGS="-pthread"
|
3 | 3 | else
|
4 |
| -# the -Kno_host is temporary for a bug in the compiler. See -hackers |
5 |
| -# discussion on 7-8/Aug/2003. |
6 |
| -# when the 7.1.3UP3 or later compiler is out, we can do a version check. |
7 |
| - CFLAGS="-O -Kinline,no_host" |
| 4 | + # The -Kno_host is for a bug in the compiler. See -hackers |
| 5 | + # discussion on 7-8/Aug/2003. |
| 6 | + cat >conftest.c <<__EOF__ |
| 7 | +extern char *strcpy(char *, const char *); |
| 8 | + |
| 9 | +static void f(char *p, int n){ |
| 10 | + strcpy(p+n,""); |
| 11 | +} |
| 12 | +void g(void){ |
| 13 | + f(0, 0); |
| 14 | +} |
| 15 | +__EOF__ |
| 16 | + |
| 17 | + if $CC -c -Kinline conftest.c >conftest.err 2>&1; then |
| 18 | + CFLAGS="-O -Kinline" |
| 19 | + else |
| 20 | + CFLAGS="-O -Kinline,no_host" |
| 21 | + fi |
| 22 | + rm -f conftest.* |
| 23 | + |
8 | 24 | THREAD_CPPFLAGS="-K pthread"
|
9 | 25 | fi
|
10 | 26 |
|
|