[klibc] To build klibc against kernel 3.4.3

Cao, Da-Shi (EG-Presales-ZTE/HW-GZ) thomas-ds.cao at hp.com
Fri Jun 29 04:22:58 PDT 2012

If klibc was built against the exported kernel headers, instead of the in source headers of the kernel, a "make install" error will pop up. The root cause is in the make file scripts/Kbuild.install. There is an action to make headers_install in the kernel source tree, but unfortunately there is not such source tree if "linux" was a symbolic link to the exported headers, not the in source headers.
The make install will succeed if that action is deleted. That action is of no use, as if it is build against the exported kernel headers, the kernel headers are already exported!

--- a/scripts/Kbuild.install
+++ b/scripts/Kbuild.install
@@ -95,7 +95,6 @@ header:
 	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
 	$(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/.
 	$(Q)$(install-data) $(srctree)/klcc/klcc.1 $(INSTALLROOT)$(mandir)/man1/$(KCROSS)klcc.1
 	$(Q)$(install-bin) $(objtree)/klcc/$(KCROSS)klcc $(INSTALLROOT)$(bindir)

-----Original Message-----
From: Cao, Da-Shi (EG-Presales-ZTE/HW-GZ) 
Sent: Friday, June 29, 2012 08:51
To: 'maximilian attems'
Cc: Thorsten Glaser; klibc at zytor.com
Subject: RE: [klibc] To build klibc against kernel 3.4.3

Anyway I've tried both, exported header or in source header, on two archs, arm and x86_64. It works in both ways on both archs.
But I think going via the exported header is more preferable, since the exported headers have to be built for other things!
I used to build using in source headers because old versions are documented in such a way. The first reaction to build error is to pick up the latest version and begin the built in the old way!


-----Original Message-----
From: maximilian attems [mailto:max at stro.at] 
Sent: Thursday, June 28, 2012 23:19
To: Cao, Da-Shi (EG-Presales-ZTE/HW-GZ)
Cc: Thorsten Glaser; klibc at zytor.com
Subject: Re: [klibc] To build klibc against kernel 3.4.3

please do not top post.

On Wed, Jun 27, 2012 at 11:22:52AM +0000, Cao, Da-Shi (EG-Presales-ZTE/HW-GZ) wrote:
> I have just complete a built by applying this minor modification. Maybe you can have a try. My klibc version is klibc-2.0.
> It can be built, but I'm not sure if it will bring in some other issues into klibc! 

your patch is wrong inded, as already pointed out.

> I have had the idea to build against the exported headers, but I hesitated
> and tried to have deeper look into it instead.

Indeed that is the way to go, just look at the easy example on
the last line of `make help' in klibc.
One has just to run `make headers_install` on the linux src side.



More information about the klibc mailing list