Blame SOURCES/kyotocabinet-1.2.76-cflags.patch

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