OSDN Git Service

With the native compiler on Unixware, disable optimization if
authorNeil Conway <neilc@samurai.com>
Mon, 16 Jul 2007 17:38:48 +0000 (17:38 +0000)
committerNeil Conway <neilc@samurai.com>
Mon, 16 Jul 2007 17:38:48 +0000 (17:38 +0000)
--enable-debug is used, to avoid complaints about debugging and
optimization being mutually exclusive. Patch from Stefan Kaltenbrunner.

src/template/unixware

index 8173ae4..d08fca1 100644 (file)
@@ -12,10 +12,14 @@ void g(void){
 }
 __EOF__
 
+  # Debugging and optimization are mutually exclusive
+  if test "$enable_debug" != yes; then
+    CFLAGS="-O"
+  fi
   if $CC -c -O -Kinline conftest.c >conftest.err 2>&1; then
-    CFLAGS="-O -Kinline"
+    CFLAGS="$CFLAGS -Kinline"
   else
-    CFLAGS="-O -Kinline,no_host"
+    CFLAGS="$CFLAGS -Kinline,no_host"
   fi
   rm -f conftest.*