aboutsummaryrefslogtreecommitdiff
path: root/chuck/patches/0001-correctly-handle-debug-flags-if-CHUCK_DEBUG-y-build-.patch
blob: aab42a7ad72b03add0b265de09a3a55de6ac9c38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
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