Skip to content

Commit 23c2926

Browse files
committed
Add detection of compiler bug.
1 parent e560dd3 commit 23c2926

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

src/template/unixware

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
if test "$GCC" = yes; then
22
THREAD_CPPFLAGS="-pthread"
33
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+
824
THREAD_CPPFLAGS="-K pthread"
925
fi
1026

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy