Add detection of compiler bug.
This commit is contained in:
parent
e560dd3537
commit
23c292688f
@ -1,10 +1,26 @@
|
|||||||
if test "$GCC" = yes; then
|
if test "$GCC" = yes; then
|
||||||
THREAD_CPPFLAGS="-pthread"
|
THREAD_CPPFLAGS="-pthread"
|
||||||
else
|
else
|
||||||
# the -Kno_host is temporary for a bug in the compiler. See -hackers
|
# The -Kno_host is for a bug in the compiler. See -hackers
|
||||||
# discussion on 7-8/Aug/2003.
|
# discussion on 7-8/Aug/2003.
|
||||||
# when the 7.1.3UP3 or later compiler is out, we can do a version check.
|
cat >conftest.c <<__EOF__
|
||||||
CFLAGS="-O -Kinline,no_host"
|
extern char *strcpy(char *, const char *);
|
||||||
|
|
||||||
|
static void f(char *p, int n){
|
||||||
|
strcpy(p+n,"");
|
||||||
|
}
|
||||||
|
void g(void){
|
||||||
|
f(0, 0);
|
||||||
|
}
|
||||||
|
__EOF__
|
||||||
|
|
||||||
|
if $CC -c -Kinline conftest.c >conftest.err 2>&1; then
|
||||||
|
CFLAGS="-O -Kinline"
|
||||||
|
else
|
||||||
|
CFLAGS="-O -Kinline,no_host"
|
||||||
|
fi
|
||||||
|
rm -f conftest.*
|
||||||
|
|
||||||
THREAD_CPPFLAGS="-K pthread"
|
THREAD_CPPFLAGS="-K pthread"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user