]> granicus.if.org Git - graphviz/commitdiff
stop attempting to suppress double '-g' with --enable-debug
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 6 Sep 2021 00:23:40 +0000 (17:23 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 13 Sep 2021 14:45:59 +0000 (07:45 -0700)
This reverts part of 3b7da5bc0345872efcf011c9c614cc27f82b9998. It is unclear
whether this was a typo or just an insufficiently scoped attempt to clean up
build flags. Of the problems with this code, the main ones were:

  1. It seems somewhat purposeless to suppress `-g` only to just re-add it. GCC
     and ICC can both cope with duplicate `-g` options. It seems purely
     aesthetically-motivated gymnastics to try and pass the compiler a sole
     `-g`.

  2. The scope of things that matched this replacement was too wide. For
     example, a `-ggdb` option would be mangled into `gdb` which is almost
     certainly not what the user intended and would result in cryptic build
     errors. Something like `-fprofile-generate` would be mangled into
     `-fprofileenerate` resulting in similarly confusing build errors.

Related to #2115.

configure.ac

index b90ed68b196583800a93268767ab1a10d2a19a97..aae527bf39c9b1a5d713d596bdbf1eb2f280749a 100644 (file)
@@ -414,8 +414,6 @@ if test "x$enable_debug" = "xyes"; then
   changequote({,})
   CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'`
   CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'`
-  CFLAGS=`echo "$CFLAGS" | $SED -e 's/-g//g'`
-  CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-g//g'`
   changequote([,])
   dnl add -O0 only if GCC or ICC is used
   if test "$GCC" = "yes" || test "$ICC" = "yes"; then