On 14/04/08 at 16:16 +0200, Nico Golde wrote: > Hi Lucas, > * Lucas Nussbaum <[EMAIL PROTECTED]> [2008-04-14 16:04]: > > On 14/04/08 at 15:44 +0200, Nico Golde wrote: > > > * Lucas Nussbaum <[EMAIL PROTECTED]> [2008-04-14 14:43]: > > > > On 14/04/08 at 13:00 +0200, Nico Golde wrote: > > > > > * Lucas Nussbaum <[EMAIL PROTECTED]> [2008-04-14 12:06]: > [...] > > > > The problem is very likely to be caused by dpkg 1.14.18 now > > > > setting default values for CFLAGS and some other variables (see > > > > dpkg-buildpackage(1)). > > > > > > It looks like this is passing the CFLAGS defined in rules as > > > CFLAGS="-Wall -g" to gcc as gcc "-Wall -g" -O2 and this > > > fails due to the quotes. > > > > > > What is the proposed way of fixing this? > > > > remove the quotes in debian/rules? :) > > I'll do this if someone tells me why this should be wrong. 1) Why are your quotes broken? Simple: because you do: CFLAGS="-Wall -g" ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif
so CFLAGS gets set to '"-Wall -g" -O2' instead of '-Wall -g -O2'. When passed to gcc, the first arg is '-Wall -g' and the second one is -O2. 2) Why did the change in dpkg-buildpackage triggered this? Because dpkg-buildpackage export CFLAGS, causing, in turn, make to export it, and configure to pick it up. From info make: Except by explicit request, `make' exports a variable only if it is either defined in the environment initially or set on the command line, and if its name consists only of letters, numbers, and underscores. (yes, that also means that your setting of CFLAGS in your makefile is useless, since you never pass that variable to subcommands. Grepping a build log for -Wall confirms that.) -- | Lucas Nussbaum | [EMAIL PROTECTED] http://www.lucas-nussbaum.net/ | | jabber: [EMAIL PROTECTED] GPG: 1024D/023B3F4F |
signature.asc
Description: Digital signature