aboutsummaryrefslogtreecommitdiff
path: root/chuck/patches/0001-correctly-handle-debug-flags-if-CHUCK_DEBUG-y-build-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'chuck/patches/0001-correctly-handle-debug-flags-if-CHUCK_DEBUG-y-build-.patch')
-rw-r--r--chuck/patches/0001-correctly-handle-debug-flags-if-CHUCK_DEBUG-y-build-.patch158
1 files changed, 158 insertions, 0 deletions
diff --git a/chuck/patches/0001-correctly-handle-debug-flags-if-CHUCK_DEBUG-y-build-.patch b/chuck/patches/0001-correctly-handle-debug-flags-if-CHUCK_DEBUG-y-build-.patch
new file mode 100644
index 0000000..aab42a7
--- /dev/null
+++ b/chuck/patches/0001-correctly-handle-debug-flags-if-CHUCK_DEBUG-y-build-.patch
@@ -0,0 +1,158 @@
+From 1f8d875b53b36f6f0dd6599d70deea55eb17c19e Mon Sep 17 00:00:00 2001
+From: Robin Haberkorn <robin.haberkorn@googlemail.com>
+Date: Fri, 7 Sep 2012 17:11:42 +0200
+Subject: [PATCH 01/12] correctly handle debug flags (if CHUCK_DEBUG=y, build with -O0)
+
+did it for all makefiles so it can be submitted as a patch
+ * according to Makefile best-practices, such flags should normally not be touched my the build system but they should instead be
+set by the package maintainer using the CFLAGS environment variable
+---
+ makefile | 2 +-
+ makefile.alsa | 2 +-
+ makefile.audicle | 6 ++++--
+ makefile.jack | 2 +-
+ makefile.oss | 2 +-
+ makefile.rl | 6 ++++--
+ makefile.skot | 2 +-
+ makefile.vicon | 6 ++++--
+ makefile.win32 | 2 +-
+ 9 files changed, 18 insertions(+), 12 deletions(-)
+
+diff --git a/src/makefile b/src/makefile
+index 8afb2db..aa87fe9 100644
+--- a/src/makefile
++++ b/src/makefile
+@@ -33,7 +33,7 @@ CFLAGS+= -D__CHUCK_STAT_TRACK__
+ endif
+
+ ifneq ($(CHUCK_DEBUG),)
+-CFLAGS+= -g
++CFLAGS+= -g -O0
+ else
+ CFLAGS+= -O3
+ endif
+diff --git a/src/makefile.alsa b/src/makefile.alsa
+index f267207..f66e3ac 100644
+--- a/src/makefile.alsa
++++ b/src/makefile.alsa
+@@ -1,4 +1,4 @@
+
+-CFLAGS+= -D__LINUX_ALSA__ -O3 -fno-strict-aliasing -D__CK_SNDFILE_NATIVE__
++CFLAGS+= -D__LINUX_ALSA__ -fno-strict-aliasing -D__CK_SNDFILE_NATIVE__
+ LDFLAGS+= -lasound -lstdc++ -ldl -lm -lsndfile -lpthread
+
+diff --git a/src/makefile.audicle b/src/makefile.audicle
+index 7e26071..2cbe5cc 100644
+--- a/src/makefile.audicle
++++ b/src/makefile.audicle
+@@ -3,12 +3,14 @@ CXX=gcc
+ LEX=flex
+ YACC=bison
+ INCLUDES=
+-FLAGS=-D__MACOSX_CORE__ -D__CHUCK_STAT_TRACK__ -DAJAY -O3 -c
++FLAGS=-D__MACOSX_CORE__ -D__CHUCK_STAT_TRACK__ -DAJAY -c
+ LIBS=-framework CoreAudio -framework CoreMIDI -framework CoreFoundation -framework Carbon -framework IOKit -lstdc++ -lm
+ SF_OBJ=util_sndfile.o
+
+ ifneq ($(CHUCK_DEBUG),)
+-FLAGS+= -g
++FLAGS+= -g -O0
++else
++FLAGS+= -O3
+ endif
+
+ ifneq ($(CHUCK_STRICT),)
+diff --git a/src/makefile.jack b/src/makefile.jack
+index 464c1b7..e09939a 100644
+--- a/src/makefile.jack
++++ b/src/makefile.jack
+@@ -1,4 +1,4 @@
+
+-CFLAGS+= -D__UNIX_JACK__ -D__LINUX_JACK__ -O3 -fno-strict-aliasing -D__CK_SNDFILE_NATIVE__
++CFLAGS+= -D__UNIX_JACK__ -D__LINUX_JACK__ -fno-strict-aliasing -D__CK_SNDFILE_NATIVE__
+ LDFLAGS+= -lasound -ljack -lstdc++ -ldl -lm -lsndfile -lpthread
+
+diff --git a/src/makefile.oss b/src/makefile.oss
+index b25bb3a..f3edf10 100644
+--- a/src/makefile.oss
++++ b/src/makefile.oss
+@@ -1,4 +1,4 @@
+
+-CFLAGS+= -D__LINUX_OSS__ -O3 -fno-strict-aliasing -D__CK_SNDFILE_NATIVE__
++CFLAGS+= -D__LINUX_OSS__ -fno-strict-aliasing -D__CK_SNDFILE_NATIVE__
+ LDFLAGS+= -lpthread -lstdc++ -ldl -lm -lsndfile
+
+diff --git a/src/makefile.rl b/src/makefile.rl
+index cc12f75..47bf543 100644
+--- a/src/makefile.rl
++++ b/src/makefile.rl
+@@ -4,7 +4,7 @@ CXX_LINK=g++
+ LEX=flex
+ YACC=bison
+ INCLUDES=
+-FLAGS=-D__MACOSX_CORE__ -D__USE_READLINE__ -O3 -c
++FLAGS=-D__MACOSX_CORE__ -D__USE_READLINE__ -c
+ LIBS=-framework CoreAudio -framework CoreMIDI -framework CoreFoundation -lstdc++ -lm -lreadline
+ SF_OBJ=util_sndfile.o
+
+@@ -13,7 +13,9 @@ FLAGS+= -D__CHUCK_STAT_TRACK__
+ endif
+
+ ifneq ($(CHUCK_DEBUG),)
+-FLAGS+= -g
++FLAGS+= -g -O0
++else
++FLAGS+= -O3
+ endif
+
+ ifneq ($(CHUCK_STRICT),)
+diff --git a/src/makefile.skot b/src/makefile.skot
+index 23ac594..d1b7383 100644
+--- a/src/makefile.skot
++++ b/src/makefile.skot
+@@ -16,7 +16,7 @@ FLAGS+= -D__CHUCK_STAT_TRACK__
+ endif
+
+ ifneq ($(CHUCK_DEBUG),)
+-FLAGS+= -g
++FLAGS+= -g -O0
+ else
+ FLAGS+= -O3
+ endif
+diff --git a/src/makefile.vicon b/src/makefile.vicon
+index cf8bf97..d0b898c 100644
+--- a/src/makefile.vicon
++++ b/src/makefile.vicon
+@@ -3,12 +3,14 @@ CXX=gcc
+ LEX=flex
+ YACC=bison
+ INCLUDES=-I/usr/include/directx/
+-FLAGS=-D__WINDOWS_DS__ -D__WINDOWS_PTHREAD__ -DAJAY $(INCLUDES) -O3 -c
++FLAGS=-D__WINDOWS_DS__ -D__WINDOWS_PTHREAD__ -DAJAY $(INCLUDES) -c
+ LIBS=-ldsound -ldxguid -lwinmm -lstdc++ -lm
+ SF_OBJ=util_sndfile.o
+
+ ifneq ($(CHUCK_DEBUG),)
+-FLAGS+= -g
++FLAGS+= -g -O0
++else
++FLAGS+= -O3
+ endif
+
+ ifneq ($(CHUCK_STRICT),)
+diff --git a/src/makefile.win32 b/src/makefile.win32
+index 148c81f..2f64c5d 100644
+--- a/src/makefile.win32
++++ b/src/makefile.win32
+@@ -10,7 +10,7 @@ LDFLAGS=-ldsound -ldinput -ldxguid -lwinmm -lstdc++ -lm -lole32
+ CSRCS+= util_sndfile.c
+
+ ifneq ($(CHUCK_DEBUG),)
+-CFLAGS+= -g
++CFLAGS+= -g -O0
+ else
+ CFLAGS+= -O3
+ endif
+--
+1.7.1
+