Blame SOURCES/kyotocabinet-1.2.76-cflags.patch

b0c39e
Patch by Robert Scheck <robert@fedoraproject.org> for kyotocabinet >= 1.2.76 to ensure
b0c39e
that CFLAGS and CXXFLAGS do not include "-g0 -O2" or "-O0" at all as we need debug info
b0c39e
for the -debuginfo RPM packages. Additionally the patch removes "-rpath-link" as well.
b0c39e
b0c39e
--- kyotocabinet-1.2.76/configure			2012-05-24 13:31:45.000000000 +0200
b0c39e
+++ kyotocabinet-1.2.76/configure.cflags		2013-11-17 18:28:55.000000000 +0100
b0c39e
@@ -2109,8 +2109,8 @@
b0c39e
 MYPCFILES="kyotocabinet.pc"
b0c39e
 
b0c39e
 # Building flags
b0c39e
-MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g0 -O2"
b0c39e
-MYCXXFLAGS="-Wall -fPIC -fsigned-char -g0 -O2"
b0c39e
+MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char"
b0c39e
+MYCXXFLAGS="-Wall -fPIC -fsigned-char"
b0c39e
 MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -I/usr/local/include"
b0c39e
 MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1"
b0c39e
 MYCPPFLAGS="$MYCPPFLAGS -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D__EXTENSIONS__"
b0c39e
@@ -2147,8 +2147,8 @@
b0c39e
 
b0c39e
 if test "$enable_debug" = "yes"
b0c39e
 then
b0c39e
-  MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g -O0"
b0c39e
-  MYCXXFLAGS="-Wall -fPIC -fsigned-char -g -O0"
b0c39e
+  MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g"
b0c39e
+  MYCXXFLAGS="-Wall -fPIC -fsigned-char -g"
b0c39e
   MYCPPFLAGS="$MYCPPFLAGS -UNDEBUG -D_KCDEBUG"
b0c39e
   is_static="yes"
b0c39e
   enables="$enables (debug)"
b0c39e
@@ -2178,8 +2178,8 @@
b0c39e
 
b0c39e
 if test "$enable_opt" = "no"
b0c39e
 then
b0c39e
-  MYCFLAGS="$MYCFLAGS -O0"
b0c39e
-  MYCXXFLAGS="$MYCXXFLAGS -O0"
b0c39e
+  MYCFLAGS="$MYCFLAGS"
b0c39e
+  MYCXXFLAGS="$MYCXXFLAGS"
b0c39e
   enables="$enables (no-opt)"
b0c39e
 fi
b0c39e
 
b0c39e
@@ -4538,7 +4538,6 @@
b0c39e
 # As-needed linking
b0c39e
 if uname | grep Linux >config.tmp
b0c39e
 then
b0c39e
-  MYLDFLAGS="$MYLDFLAGS -Wl,-rpath-link,.:/usr/local/lib:$MYLDLIBPATH"
b0c39e
   MYLDFLAGS="$MYLDFLAGS -Wl,--as-needed"
b0c39e
 else
b0c39e
   MYCMDLIBS="$MYCMDLIBS $LIBS"
b0c39e
--- kyotocabinet-1.2.76/configure.in			2012-05-24 13:31:42.000000000 +0200
b0c39e
+++ kyotocabinet-1.2.76/configure.in.cflags		2013-11-17 18:29:20.000000000 +0100
b0c39e
@@ -35,8 +35,8 @@
b0c39e
 MYPCFILES="kyotocabinet.pc"
b0c39e
 
b0c39e
 # Building flags
b0c39e
-MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g0 -O2"
b0c39e
-MYCXXFLAGS="-Wall -fPIC -fsigned-char -g0 -O2"
b0c39e
+MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char"
b0c39e
+MYCXXFLAGS="-Wall -fPIC -fsigned-char"
b0c39e
 MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -I/usr/local/include"
b0c39e
 MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1"
b0c39e
 MYCPPFLAGS="$MYCPPFLAGS -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D__EXTENSIONS__"
b0c39e
@@ -70,8 +70,8 @@
b0c39e
   AC_HELP_STRING([--enable-debug], [build for debugging]))
b0c39e
 if test "$enable_debug" = "yes"
b0c39e
 then
b0c39e
-  MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g -O0"
b0c39e
-  MYCXXFLAGS="-Wall -fPIC -fsigned-char -g -O0"
b0c39e
+  MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g"
b0c39e
+  MYCXXFLAGS="-Wall -fPIC -fsigned-char -g"
b0c39e
   MYCPPFLAGS="$MYCPPFLAGS -UNDEBUG -D_KCDEBUG"
b0c39e
   is_static="yes"
b0c39e
   enables="$enables (debug)"
b0c39e
@@ -95,8 +95,8 @@
b0c39e
   AC_HELP_STRING([--disable-opt], [build without optimization]))
b0c39e
 if test "$enable_opt" = "no"
b0c39e
 then
b0c39e
-  MYCFLAGS="$MYCFLAGS -O0"
b0c39e
-  MYCXXFLAGS="$MYCXXFLAGS -O0"
b0c39e
+  MYCFLAGS="$MYCFLAGS"
b0c39e
+  MYCXXFLAGS="$MYCXXFLAGS"
b0c39e
   enables="$enables (no-opt)"
b0c39e
 fi
b0c39e
 
b0c39e
@@ -302,7 +302,6 @@
b0c39e
 # As-needed linking
b0c39e
 if uname | grep Linux >config.tmp
b0c39e
 then
b0c39e
-  MYLDFLAGS="$MYLDFLAGS -Wl,-rpath-link,.:/usr/local/lib:$MYLDLIBPATH"
b0c39e
   MYLDFLAGS="$MYLDFLAGS -Wl,--as-needed"
b0c39e
 else
b0c39e
   MYCMDLIBS="$MYCMDLIBS $LIBS"