From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Schwarzott Date: Fri, 27 Apr 2007 11:39:46 +0000 Subject: Re: [PATCH] change Makefile to respect CFLAGS/LDFLAGS Message-Id: <200704271339.46462.zzam@gentoo.org> MIME-Version: 1 Content-Type: multipart/mixed; boundary="Boundary-00=_CEeMGbIFx8NovCJ" List-Id: References: <200704251038.30238.zzam@gentoo.org> In-Reply-To: <200704251038.30238.zzam@gentoo.org> To: linux-hotplug@vger.kernel.org --Boundary-00=_CEeMGbIFx8NovCJ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Mittwoch, 25. April 2007, Kay Sievers wrote: > On 4/25/07, Matthias Schwarzott wrote: > > The attached patch changes the Makefile to not ignore CFLAGS/LDFLAGS from > > environment. > > Applied. > > > Was there any strong reason to do so? > > No, it's just, that we use OPTFLAGS for that, which is appended by the > Makefile. > Well then, there should be a second change, to not append OPTFLAGS if CFLAGS was set in environment before. My patch also sets "-g" only if CFLAGS was unset before. Matthias -- Matthias Schwarzott (zzam) --Boundary-00=_CEeMGbIFx8NovCJ Content-Type: text/x-diff; charset="utf-8"; name="udev-Makefile-CFLAGS.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="udev-Makefile-CFLAGS.diff" diff --git a/Makefile b/Makefile index 072ae7f..7da3baa 100644 --- a/Makefile +++ b/Makefile @@ -113,7 +113,10 @@ LD = $(CROSS_COMPILE)gcc AR = $(CROSS_COMPILE)ar RANLIB = $(CROSS_COMPILE)ranlib -CFLAGS += -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 +OPTFLAGS = -Os +CFLAGS ?= $(OPTFLAGS) -g + +CFLAGS += -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 WARNINGS = -Wstrict-prototypes -Wsign-compare -Wshadow \ -Wchar-subscripts -Wmissing-declarations -Wnested-externs \ -Wpointer-arith -Wcast-align -Wsign-compare -Wmissing-prototypes @@ -121,9 +124,6 @@ CFLAGS += $(WARNINGS) LDFLAGS += -Wl,-warn-common -OPTFLAGS = -Os -CFLAGS += $(OPTFLAGS) - ifeq ($(strip $(USE_LOG)),true) CFLAGS += -DUSE_LOG endif --Boundary-00=_CEeMGbIFx8NovCJ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ --Boundary-00=_CEeMGbIFx8NovCJ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel --Boundary-00=_CEeMGbIFx8NovCJ--