]> git.eshelyaron.com Git - emacs.git/commitdiff
* gmake.defs (DEBUG_FLAG, DEBUG_LINK) [!NODEBUG]:
authorJuanma Barranquero <lekktu@gmail.com>
Mon, 23 Jun 2008 21:34:24 +0000 (21:34 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Mon, 23 Jun 2008 21:34:24 +0000 (21:34 +0000)
  Don't hardcode -gstabs+, use DEBUG_INFO.

* configure.bat (gccdebug): Check for DWARF-2 support in GCC.
  Default to stabs if the compiler does not support DWARF-2.
  (genmakefiles): Write new variable DEBUG_INFO to config.settings.

nt/ChangeLog
nt/configure.bat
nt/gmake.defs

index 4e51ec03bcaab74d9f6c9b7f20b6495e741ee381..84fe115ce50a97a0e9546839c600259d9a97ab08 100644 (file)
@@ -1,3 +1,13 @@
+2008-06-23  Juanma Barranquero  <lekktu@gmail.com>
+           Eli Zaretskii  <eliz@gnu.org>
+
+       * gmake.defs (DEBUG_FLAG, DEBUG_LINK) [!NODEBUG]:
+       Don't hardcode -gstabs+, use DEBUG_INFO.
+
+       * configure.bat (gccdebug): Check for DWARF-2 support in GCC.
+       Default to stabs if the compiler does not support DWARF-2.
+       (genmakefiles): Write new variable DEBUG_INFO to config.settings.
+
 2008-05-14  Jason Rumney  <jasonr@gnu.org>
 
        * configure.bat: Remove code dealing with --disable-font-backend.
index 957ed14b9497f171f877d53e8dd669fc64f5cfaf..3dd9a7fcc240f38550d0b9fb2f6819c9d9a9bc81 100755 (executable)
@@ -319,11 +319,26 @@ echo The failed program was: >>config.log
 type junk.c >>config.log\r
 set mf=-mcpu=i686\r
 rm -f junk.c junk.o\r
-goto compilercheckdone\r
+goto gccdebug\r
 :gccMtuneOk\r
 echo GCC supports -mtune=pentium4 >>config.log\r
 set mf=-mtune=pentium4\r
 rm -f junk.c junk.o\r
+:gccdebug\r
+rem Check for DWARF-2 debug info support, else default to stabs\r
+echo main(){} >junk.c\r
+echo gcc -c -gdwarf-2 -g3 junk.c >>config.log\r
+gcc -c -gdwarf-2 -g3 junk.c >>config.log 2>&1\r
+if not errorlevel 1 goto gccdwarf\r
+echo The failed program was: >>config.log\r
+type junk.c >>config.log\r
+set dbginfo=-gstabs+\r
+rm -f junk.c junk.o\r
+goto compilercheckdone\r
+:gccdwarf\r
+echo GCC supports DWARF-2 >>config.log\r
+set dbginfo=-gdwarf-2 -g3\r
+rm -f junk.c junk.o\r
 goto compilercheckdone\r
 \r
 :clOk\r
@@ -474,6 +489,7 @@ rem
 echo # Start of settings from configure.bat >config.settings\r
 echo COMPILER=%COMPILER%>>config.settings\r
 if not "(%mf%)" == "()" echo MCPU_FLAG=%mf%>>config.settings\r
+if not "(%dbginfo%)" == "()" echo DEBUG_INFO=%dbginfo%>>config.settings\r
 if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings\r
 if (%noopt%) == (Y) echo NOOPT=1 >>config.settings\r
 if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings\r
index 00ae686c3fa37445288f6721b433a312322a3de4..7afbf09962274ced246d8aec352438189f1314d5 100644 (file)
@@ -262,8 +262,8 @@ ifdef NODEBUG
 DEBUG_FLAG =
 DEBUG_LINK =
 else
-DEBUG_FLAG = -gstabs+ -g3
-DEBUG_LINK = -gstabs+ -g3
+DEBUG_FLAG = $(DEBUG_INFO)
+DEBUG_LINK = $(DEBUG_INFO)
 endif
 
 ifdef NOCYGWIN