linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] change Makefile to respect CFLAGS/LDFLAGS
@ 2007-04-25  8:38 Matthias Schwarzott
  2007-04-25 21:34 ` Kay Sievers
  2007-04-27 11:39 ` Matthias Schwarzott
  0 siblings, 2 replies; 3+ messages in thread
From: Matthias Schwarzott @ 2007-04-25  8:38 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 358 bytes --]

Hi!

The attached patch changes the Makefile to not ignore CFLAGS/LDFLAGS from 
environment. Was there any strong reason to do so?

And second: Any reason to forbid using "make -j2" or higher? Missing Makefile 
dependencies?

This is related to this bugzilla request:  
http://bugs.gentoo.org/show_bug.cgi?id=175893

Matthias

-- 
Matthias Schwarzott (zzam)

[-- Attachment #2: udev-respect-CFLAGS.diff --]
[-- Type: text/x-diff, Size: 644 bytes --]

diff --git a/Makefile b/Makefile
index a7a2cbf..072ae7f 100644
--- a/Makefile
+++ b/Makefile
@@ -113,13 +113,13 @@ LD = $(CROSS_COMPILE)gcc
 AR = $(CROSS_COMPILE)ar
 RANLIB = $(CROSS_COMPILE)ranlib
 
-CFLAGS		= -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+CFLAGS		+= -g -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
 CFLAGS		+= $(WARNINGS)
 
-LDFLAGS = -Wl,-warn-common
+LDFLAGS += -Wl,-warn-common
 
 OPTFLAGS = -Os
 CFLAGS += $(OPTFLAGS)

[-- Attachment #3: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
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/

[-- Attachment #4: Type: text/plain, Size: 226 bytes --]

_______________________________________________
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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] change Makefile to respect CFLAGS/LDFLAGS
  2007-04-25  8:38 [PATCH] change Makefile to respect CFLAGS/LDFLAGS Matthias Schwarzott
@ 2007-04-25 21:34 ` Kay Sievers
  2007-04-27 11:39 ` Matthias Schwarzott
  1 sibling, 0 replies; 3+ messages in thread
From: Kay Sievers @ 2007-04-25 21:34 UTC (permalink / raw)
  To: linux-hotplug

On 4/25/07, Matthias Schwarzott <zzam@gentoo.org> 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.

> And second: Any reason to forbid using "make -j2" or higher?

Not that I know, but I usually don't use it.

> Missing Makefile dependencies?

There may be something with a rebuild in libvolume_id, that doesn't
work without "clean" sometimes, but it should be fixable, sure.

> This is related to this bugzilla request:
> http://bugs.gentoo.org/show_bug.cgi?id\x175893

Well, we can just fix it until it works, just let me know. :)

Thanks,
Kay

-------------------------------------------------------------------------
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/
_______________________________________________
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] change Makefile to respect CFLAGS/LDFLAGS
  2007-04-25  8:38 [PATCH] change Makefile to respect CFLAGS/LDFLAGS Matthias Schwarzott
  2007-04-25 21:34 ` Kay Sievers
@ 2007-04-27 11:39 ` Matthias Schwarzott
  1 sibling, 0 replies; 3+ messages in thread
From: Matthias Schwarzott @ 2007-04-27 11:39 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 556 bytes --]

On Mittwoch, 25. April 2007, Kay Sievers wrote:
> On 4/25/07, Matthias Schwarzott <zzam@gentoo.org> 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)

[-- Attachment #2: udev-Makefile-CFLAGS.diff --]
[-- Type: text/x-diff, Size: 740 bytes --]

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

[-- Attachment #3: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
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/

[-- Attachment #4: Type: text/plain, Size: 226 bytes --]

_______________________________________________
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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-04-27 11:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-25  8:38 [PATCH] change Makefile to respect CFLAGS/LDFLAGS Matthias Schwarzott
2007-04-25 21:34 ` Kay Sievers
2007-04-27 11:39 ` Matthias Schwarzott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).