mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kbuild updates
@ 2005-11-06 10:18 Sam Ravnborg
  2005-11-06 12:44 ` Roman Zippel
  0 siblings, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2005-11-06 10:18 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton
  Cc: davej, thang, Roman Zippel, linux-kernel, Russell King

Hi Linus - please apply.

A patch to introduce -imacros to include autoconf.h, so we
no longer rely on everyone to include config.h.

And a fix for make xconfig for fedora.

Pull from:
master.kernel.org/pub/scm/linux/kernel/git/sam/kbuild.git

diffstat and patches included below for information.

	Sam


Russell King:
      kbuild: permanently fix kernel configuration include mess

Sam Ravnborg:
      kconfig: fix xconfig on fedora 2 & 3 (x86_64)

 Makefile                 |    8 ++------
 include/linux/config.h   |    4 +++-
 scripts/kconfig/Makefile |   15 ++++++++++-----
 3 files changed, 15 insertions(+), 12 deletions(-)

[PATCH] kbuild: permanently fix kernel configuration include mess

Include autoconf.h into every kernel compilation via the gcc command line
using -imacros.  This ensures that we have the kernel configuration
included from the start, rather than relying on each file having #include
<linux/config.h> as appropriate.  History has shown that this is something
which is difficult to get right.

Since we now include the kernel configuration automatically, make
configcheck becomes meaningless, so remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

---
commit 2dd34b488a99135ad2a529e33087ddd6a09e992a
tree 785b06eabfea3fdebf571b1e2b8a1ea695974416
parent f912696ab330bf539231d1f8032320f2a08b850f
author Russell King <rmk+lkml@arm.linux.org.uk> Sun, 30 Oct 2005 22:42:11 +0100
committer Sam Ravnborg <sam@mars.ravnborg.org> Sun, 06 Nov 2005 10:22:04 +0100

 Makefile               |    8 ++------
 include/linux/config.h |    4 +++-
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 7960132..2dac801 100644
--- a/Makefile
+++ b/Makefile
@@ -346,7 +346,8 @@ AFLAGS_KERNEL	=
 # Use LINUXINCLUDE when you must reference the include/ directory.
 # Needed to be compatible with the O= option
 LINUXINCLUDE    := -Iinclude \
-                   $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include)
+                   $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
+		   -imacros include/linux/autoconf.h
 
 CPPFLAGS        := -D__KERNEL__ $(LINUXINCLUDE)
 
@@ -1249,11 +1250,6 @@ tags: FORCE
 # Scripts to check various things for consistency
 # ---------------------------------------------------------------------------
 
-configcheck:
-	find * $(RCS_FIND_IGNORE) \
-		-name '*.[hcS]' -type f -print | sort \
-		| xargs $(PERL) -w scripts/checkconfig.pl
-
 includecheck:
 	find * $(RCS_FIND_IGNORE) \
 		-name '*.[hcS]' -type f -print | sort \
diff --git a/include/linux/config.h b/include/linux/config.h
index 9d1c14f..a91f5e5 100644
--- a/include/linux/config.h
+++ b/include/linux/config.h
@@ -1,6 +1,8 @@
 #ifndef _LINUX_CONFIG_H
 #define _LINUX_CONFIG_H
-
+/* This file is no longer in use and kept only for backward compatibility.
+ * autoconf.h is now included via -imacros on the commandline
+ */
 #include <linux/autoconf.h>
 
 #endif

kconfig: fix xconfig on fedora 2 & 3 (x86_64)

From: Than Ngo <than@redhat.com>
qt as installed on fedora core (2 and 3) does not work with vanilla
kernel. The linker fails to locate the qt lib:

Actual Results:  # make xconfig
  HOSTLD  scripts/kconfig/qconf
  /usr/bin/ld: cannot find -lqt
  collect2: ld returned 1 exit status

Than Ngo has provided following fix for the bug.

Cc: Than Ngo <than@redhat.com>
Acked-by: Dave Jones <davej@redhat.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

---
commit ab919c06144cfb11c05b5b5cd291daa96ac2e423
tree 8747dc3122c0c2ebefaf004a2d71e2cb7bd97615
parent 2dd34b488a99135ad2a529e33087ddd6a09e992a
author Sam Ravnborg <sam@mars.ravnborg.org> Sun, 06 Nov 2005 11:05:21 +0100
committer Sam Ravnborg <sam@mars.ravnborg.org> Sun, 06 Nov 2005 11:05:21 +0100

 scripts/kconfig/Makefile |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 0dd9691..455aeab 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -129,7 +129,7 @@ endif
 HOSTCFLAGS_lex.zconf.o	:= -I$(src)
 HOSTCFLAGS_zconf.tab.o	:= -I$(src)
 
-HOSTLOADLIBES_qconf	= -L$(QTLIBPATH) -Wl,-rpath,$(QTLIBPATH) -l$(QTLIB) -ldl
+HOSTLOADLIBES_qconf	= -L$(QTLIBPATH) -Wl,-rpath,$(QTLIBPATH) -l$(LIBS_QT) -ldl
 HOSTCXXFLAGS_qconf.o	= -I$(QTDIR)/include -D LKC_DIRECT_LINK
 
 HOSTLOADLIBES_gconf	= `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --libs`
@@ -163,11 +163,16 @@ $(obj)/.tmp_qtcheck:
 	  false; \
 	fi; \
 	LIBPATH=$$DIR/lib; LIB=qt; \
-	$(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
-	  LIBPATH=$$DIR/lib/$$($(HOSTCXX) -print-multi-os-directory); \
-	if [ -f $$LIBPATH/libqt-mt.so ]; then LIB=qt-mt; fi; \
+	if [ -f $$QTLIB/libqt-mt.so ] ; then \
+		LIB=qt-mt; \
+		LIBPATH=$$QTLIB; \
+	else \
+		$(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
+		LIBPATH=$$DIR/lib/$$($(HOSTCXX) -print-multi-os-directory); \
+		if [ -f $$LIBPATH/libqt-mt.so ]; then LIB=qt-mt; fi; \
+	fi; \
 	echo "QTDIR=$$DIR" > $@; echo "QTLIBPATH=$$LIBPATH" >> $@; \
-	echo "QTLIB=$$LIB" >> $@; \
+	echo "LIBS_QT=$$LIB" >> $@; \
 	if [ ! -x $$DIR/bin/moc -a -x /usr/bin/moc ]; then \
 	  echo "*"; \
 	  echo "* Unable to find $$DIR/bin/moc, using /usr/bin/moc instead."; \

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

* Re: [PATCH] kbuild updates
  2005-11-06 10:18 [PATCH] kbuild updates Sam Ravnborg
@ 2005-11-06 12:44 ` Roman Zippel
  2005-11-06 13:21   ` Sam Ravnborg
  0 siblings, 1 reply; 6+ messages in thread
From: Roman Zippel @ 2005-11-06 12:44 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Linus Torvalds, Andrew Morton, davej, thang, linux-kernel, Russell King

Hi,

On Sun, 6 Nov 2005, Sam Ravnborg wrote:

> kconfig: fix xconfig on fedora 2 & 3 (x86_64)
> 
> From: Than Ngo <than@redhat.com>
> qt as installed on fedora core (2 and 3) does not work with vanilla
> kernel. The linker fails to locate the qt lib:
> 
> Actual Results:  # make xconfig
>   HOSTLD  scripts/kconfig/qconf
>   /usr/bin/ld: cannot find -lqt
>   collect2: ld returned 1 exit status
> 
> Than Ngo has provided following fix for the bug.
> 
> Cc: Than Ngo <than@redhat.com>
> Acked-by: Dave Jones <davej@redhat.com>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> 
> ---
> commit ab919c06144cfb11c05b5b5cd291daa96ac2e423
> tree 8747dc3122c0c2ebefaf004a2d71e2cb7bd97615
> parent 2dd34b488a99135ad2a529e33087ddd6a09e992a
> author Sam Ravnborg <sam@mars.ravnborg.org> Sun, 06 Nov 2005 11:05:21 +0100
> committer Sam Ravnborg <sam@mars.ravnborg.org> Sun, 06 Nov 2005 11:05:21 +0100
> 
>  scripts/kconfig/Makefile |   15 ++++++++++-----
>  1 files changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
> index 0dd9691..455aeab 100644
> --- a/scripts/kconfig/Makefile
> +++ b/scripts/kconfig/Makefile
> @@ -129,7 +129,7 @@ endif
>  HOSTCFLAGS_lex.zconf.o	:= -I$(src)
>  HOSTCFLAGS_zconf.tab.o	:= -I$(src)
>  
> -HOSTLOADLIBES_qconf	= -L$(QTLIBPATH) -Wl,-rpath,$(QTLIBPATH) -l$(QTLIB) -ldl
> +HOSTLOADLIBES_qconf	= -L$(QTLIBPATH) -Wl,-rpath,$(QTLIBPATH) -l$(LIBS_QT) -ldl
>  HOSTCXXFLAGS_qconf.o	= -I$(QTDIR)/include -D LKC_DIRECT_LINK
>  
>  HOSTLOADLIBES_gconf	= `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --libs`
> @@ -163,11 +163,16 @@ $(obj)/.tmp_qtcheck:
>  	  false; \
>  	fi; \
>  	LIBPATH=$$DIR/lib; LIB=qt; \
> -	$(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
> -	  LIBPATH=$$DIR/lib/$$($(HOSTCXX) -print-multi-os-directory); \
> -	if [ -f $$LIBPATH/libqt-mt.so ]; then LIB=qt-mt; fi; \
> +	if [ -f $$QTLIB/libqt-mt.so ] ; then \
> +		LIB=qt-mt; \
> +		LIBPATH=$$QTLIB; \
> +	else \
> +		$(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
> +		LIBPATH=$$DIR/lib/$$($(HOSTCXX) -print-multi-os-directory); \
> +		if [ -f $$LIBPATH/libqt-mt.so ]; then LIB=qt-mt; fi; \
> +	fi; \
>  	echo "QTDIR=$$DIR" > $@; echo "QTLIBPATH=$$LIBPATH" >> $@; \
> -	echo "QTLIB=$$LIB" >> $@; \
> +	echo "LIBS_QT=$$LIB" >> $@; \
>  	if [ ! -x $$DIR/bin/moc -a -x /usr/bin/moc ]; then \
>  	  echo "*"; \
>  	  echo "* Unable to find $$DIR/bin/moc, using /usr/bin/moc instead."; \

What exactly is the problem? How does Fedora use QTLIB?

bye, Roman

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

* Re: [PATCH] kbuild updates
  2005-11-06 12:44 ` Roman Zippel
@ 2005-11-06 13:21   ` Sam Ravnborg
  2005-11-07 10:13     ` Roman Zippel
  0 siblings, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2005-11-06 13:21 UTC (permalink / raw)
  To: Roman Zippel
  Cc: Linus Torvalds, Andrew Morton, davej, thang, linux-kernel, Russell King

On Sun, Nov 06, 2005 at 01:44:32PM +0100, Roman Zippel wrote:
> 
> What exactly is the problem? How does Fedora use QTLIB?

See:
 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=137926

 	Sam

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

* Re: [PATCH] kbuild updates
  2005-11-06 13:21   ` Sam Ravnborg
@ 2005-11-07 10:13     ` Roman Zippel
  2005-11-07 23:02       ` Sam Ravnborg
  2005-11-10 20:52       ` Sam Ravnborg
  0 siblings, 2 replies; 6+ messages in thread
From: Roman Zippel @ 2005-11-07 10:13 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Linus Torvalds, Andrew Morton, davej, thang, linux-kernel, Russell King

Hi,

On Sun, 6 Nov 2005, Sam Ravnborg wrote:

> On Sun, Nov 06, 2005 at 01:44:32PM +0100, Roman Zippel wrote:
> > 
> > What exactly is the problem? How does Fedora use QTLIB?
> 
> See:
>  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=137926

I'm not really happy with this patch. I don't really like relying on 
QTLIB, it's a really ugly hack.
If the nonextisting ../lib64 dir is the problem, I'd more prefer a patch 
like this:

Index: linux-2.6/scripts/kconfig/Makefile
===================================================================
--- linux-2.6.orig/scripts/kconfig/Makefile	2005-11-06 00:27:29.000000000 +0100
+++ linux-2.6/scripts/kconfig/Makefile	2005-11-07 11:08:58.000000000 +0100
@@ -162,9 +164,10 @@ $(obj)/.tmp_qtcheck:
 	  echo "*"; \
 	  false; \
 	fi; \
-	LIBPATH=$$DIR/lib; LIB=qt; \
+	LIBPATH=$$DIR/lib; LIB=qt; osdir=""; \
 	$(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
-	  LIBPATH=$$DIR/lib/$$($(HOSTCXX) -print-multi-os-directory); \
+	  osdir=$$($(HOSTCXX) -print-multi-os-directory); \
+	if [ -d $$LIBPATH/$$osdir ]; then LIBPATH=$$LIBPATH/$$osdir; fi; \
 	if [ -f $$LIBPATH/libqt-mt.so ]; then LIB=qt-mt; fi; \
 	echo "QTDIR=$$DIR" > $@; echo "QTLIBPATH=$$LIBPATH" >> $@; \
 	echo "QTLIB=$$LIB" >> $@; \

Does this also solve the problem?

bye, Roman

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

* Re: [PATCH] kbuild updates
  2005-11-07 10:13     ` Roman Zippel
@ 2005-11-07 23:02       ` Sam Ravnborg
  2005-11-10 20:52       ` Sam Ravnborg
  1 sibling, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2005-11-07 23:02 UTC (permalink / raw)
  To: Roman Zippel
  Cc: Linus Torvalds, Andrew Morton, davej, thang, linux-kernel, Russell King

On Mon, Nov 07, 2005 at 11:13:16AM +0100, Roman Zippel wrote:
> Hi,
> 
> On Sun, 6 Nov 2005, Sam Ravnborg wrote:
> 
> > On Sun, Nov 06, 2005 at 01:44:32PM +0100, Roman Zippel wrote:
> > > 
> > > What exactly is the problem? How does Fedora use QTLIB?
> > 
> > See:
> >  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=137926
> 
> I'm not really happy with this patch. I don't really like relying on 
> QTLIB, it's a really ugly hack.

I've forwarded your mail to Than Ngo (email was wrong in my origianl
mail). As the original patch author I like him to comment/test.

	Sam
	
> If the nonextisting ../lib64 dir is the problem, I'd more prefer a patch 
> like this:
> 
> Index: linux-2.6/scripts/kconfig/Makefile
> ===================================================================
> --- linux-2.6.orig/scripts/kconfig/Makefile	2005-11-06 00:27:29.000000000 +0100
> +++ linux-2.6/scripts/kconfig/Makefile	2005-11-07 11:08:58.000000000 +0100
> @@ -162,9 +164,10 @@ $(obj)/.tmp_qtcheck:
>  	  echo "*"; \
>  	  false; \
>  	fi; \
> -	LIBPATH=$$DIR/lib; LIB=qt; \
> +	LIBPATH=$$DIR/lib; LIB=qt; osdir=""; \
>  	$(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
> -	  LIBPATH=$$DIR/lib/$$($(HOSTCXX) -print-multi-os-directory); \
> +	  osdir=$$($(HOSTCXX) -print-multi-os-directory); \
Common practice is to use $(shell $(HOSTCXX) -print-multi-os-directory)
It's more obvious what you achive.

	Sam

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

* Re: [PATCH] kbuild updates
  2005-11-07 10:13     ` Roman Zippel
  2005-11-07 23:02       ` Sam Ravnborg
@ 2005-11-10 20:52       ` Sam Ravnborg
  1 sibling, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2005-11-10 20:52 UTC (permalink / raw)
  To: Roman Zippel
  Cc: Linus Torvalds, Andrew Morton, davej, than, linux-kernel, Russell King

On Mon, Nov 07, 2005 at 11:13:16AM +0100, Roman Zippel wrote:
> Hi,
> 
> On Sun, 6 Nov 2005, Sam Ravnborg wrote:
> 
> > On Sun, Nov 06, 2005 at 01:44:32PM +0100, Roman Zippel wrote:
> > > 
> > > What exactly is the problem? How does Fedora use QTLIB?
> > 
> > See:
> >  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=137926
> 
> I'm not really happy with this patch. I don't really like relying on 
> QTLIB, it's a really ugly hack.
> If the nonextisting ../lib64 dir is the problem, I'd more prefer a patch 
> like this:
Hi Roman.

Than confirmed in private mail that this fixes the problem he saw.
Can you either send me a properly Signed-off-by: patch or send the patch
to Linus yourself.

[I got Than' mailaddress wrong in my initial mial ::-(]

thanks,

	Sam

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

end of thread, other threads:[~2005-11-10 20:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-06 10:18 [PATCH] kbuild updates Sam Ravnborg
2005-11-06 12:44 ` Roman Zippel
2005-11-06 13:21   ` Sam Ravnborg
2005-11-07 10:13     ` Roman Zippel
2005-11-07 23:02       ` Sam Ravnborg
2005-11-10 20:52       ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®