FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 03-13-2010, 10:54 PM
maximilian attems
 
Default klibc build trouble

as the next klibc release 1.5.16 looks like shaping up,
I have a trouble to build that for Debian.

currently I build depent on linux-libc-dev, I don't know what
against I can build latest klibc, see


klibc fails to build due too:
make -C linux/ ARCH=x86_64 INSTALL_HDR_PATH=debian/tmp/usr/lib/klibc/ headers_install
make[3]: *** No rule to make target `headers_install'. Stop.
make[2]: *** [header] Error 2

linux is a hackish symlink:
mkdir -p linux/include;
ln -s /usr/include/linux linux/include;
for x in /usr/include/asm*; do
ln -s $${x} linux/include;
done

see
git clone git://git.kernel.org/pub/scm/libs/klibc/klibc.git
and for the debian/ dir (not yet merged in todays pile):
git clone git://git.debian.org/kernel/klibc.git

latest klibc git compiles fine without above symlink with
make KLIBCKERNELSRC=`pwd`/../linux-2.6

everything gets installed with
make KLIBCKERNELSRC=`pwd`/../linux-2.6 INSTALLROOT=debian/tmp/ install


--
maks


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100313235423.GA22231@stro.at">http://lists.debian.org/20100313235423.GA22231@stro.at
 
Old 03-14-2010, 01:31 AM
Ben Hutchings
 
Default klibc build trouble

On Sun, 2010-03-14 at 00:54 +0100, maximilian attems wrote:
> as the next klibc release 1.5.16 looks like shaping up,
> I have a trouble to build that for Debian.
>
> currently I build depent on linux-libc-dev, I don't know what
> against I can build latest klibc, see
>
>
> klibc fails to build due too:
> make -C linux/ ARCH=x86_64 INSTALL_HDR_PATH=debian/tmp/usr/lib/klibc/ headers_install
> make[3]: *** No rule to make target `headers_install'. Stop.
> make[2]: *** [header] Error 2

We can remove this command and simply rely on linux-libc-dev. We also
need the following two patches, which I believe are suitable for
upstream.

Ben.

---
From: Ben Hutchings <ben@decadent.org.uk>
Subject: [PATCH] Add definitions removed from linux/socket.h

Many definitions in <linux/socket.h> are now excluded from user-space to
avoid conflicting with glibc's <sys/socket.h>. Every C library needs to
define them appropriately in <sys/socket.h>.

Also include <asm/socket.h> and <linux/sockios.h> since some programs
currently rely on them being included via <linux/socket.h>.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/usr/include/sys/socket.h
+++ b/usr/include/sys/socket.h
@@ -12,6 +12,259 @@
#if _KLIBC_HAS_ARCHSOCKET_H
#include <klibc/archsocket.h>
#endif
+#include <asm/socket.h>
+#include <linux/sockios.h>
+#include <linux/uio.h>
+#include <linux/types.h>
+
+#ifndef sockaddr_storage
+
+typedef unsigned short sa_family_t;
+
+/*
+ * 1003.1g requires sa_family_t and that sa_data is char.
+ */
+
+struct sockaddr {
+ sa_family_t sa_family; /* address family, AF_xxx */
+ char sa_data[14]; /* 14 bytes of protocol address */
+};
+
+struct linger {
+ int l_onoff; /* Linger active */
+ int l_linger; /* How long to linger for */
+};
+
+#define sockaddr_storage __kernel_sockaddr_storage
+
+struct msghdr {
+ void * msg_name; /* Socket name */
+ int msg_namelen; /* Length of name */
+ struct iovec * msg_iov; /* Data blocks */
+ __kernel_size_t msg_iovlen; /* Number of blocks */
+ void * msg_control; /* Per protocol magic (eg BSD file descriptor passing) */
+ __kernel_size_t msg_controllen; /* Length of cmsg list */
+ unsigned msg_flags;
+};
+
+/*
+ * POSIX 1003.1g - ancillary data object information
+ * Ancillary data consits of a sequence of pairs of
+ * (cmsghdr, cmsg_data[])
+ */
+
+struct cmsghdr {
+ __kernel_size_t cmsg_len; /* data byte count, including hdr */
+ int cmsg_level; /* originating protocol */
+ int cmsg_type; /* protocol-specific type */
+};
+
+/*
+ * Ancilliary data object information MACROS
+ * Table 5-14 of POSIX 1003.1g
+ */
+
+#define __CMSG_NXTHDR(ctl, len, cmsg) __cmsg_nxthdr((ctl),(len),(cmsg))
+#define CMSG_NXTHDR(mhdr, cmsg) cmsg_nxthdr((mhdr), (cmsg))
+
+#define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) )
+
+#define CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr))))
+#define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len))
+#define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
+
+#define __CMSG_FIRSTHDR(ctl,len) ((len) >= sizeof(struct cmsghdr) ?
+ (struct cmsghdr *)(ctl) :
+ (struct cmsghdr *)NULL)
+#define CMSG_FIRSTHDR(msg) __CMSG_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
+#define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) &&
+ (cmsg)->cmsg_len <= (unsigned long)
+ ((mhdr)->msg_controllen -
+ ((char *)(cmsg) - (char *)(mhdr)->msg_control)))
+
+static inline struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size,
+ struct cmsghdr *__cmsg)
+{
+ struct cmsghdr * __ptr;
+
+ __ptr = (struct cmsghdr*)(((unsigned char *) __cmsg) + CMSG_ALIGN(__cmsg->cmsg_len));
+ if ((unsigned long)((char*)(__ptr+1) - (char *) __ctl) > __size)
+ return (struct cmsghdr *)0;
+
+ return __ptr;
+}
+
+static inline struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg)
+{
+ return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg);
+}
+
+/* "Socket"-level control message types: */
+
+#define SCM_RIGHTS 0x01 /* rw: access rights (array of int) */
+#define SCM_CREDENTIALS 0x02 /* rw: struct ucred */
+#define SCM_SECURITY 0x03 /* rw: security label */
+
+struct ucred {
+ __u32 pid;
+ __u32 uid;
+ __u32 gid;
+};
+
+/* Supported address families. */
+#define AF_UNSPEC 0
+#define AF_UNIX 1 /* Unix domain sockets */
+#define AF_LOCAL 1 /* POSIX name for AF_UNIX */
+#define AF_INET 2 /* Internet IP Protocol */
+#define AF_AX25 3 /* Amateur Radio AX.25 */
+#define AF_IPX 4 /* Novell IPX */
+#define AF_APPLETALK 5 /* AppleTalk DDP */
+#define AF_NETROM 6 /* Amateur Radio NET/ROM */
+#define AF_BRIDGE 7 /* Multiprotocol bridge */
+#define AF_ATMPVC 8 /* ATM PVCs */
+#define AF_X25 9 /* Reserved for X.25 project */
+#define AF_INET6 10 /* IP version 6 */
+#define AF_ROSE 11 /* Amateur Radio X.25 PLP */
+#define AF_DECnet 12 /* Reserved for DECnet project */
+#define AF_NETBEUI 13 /* Reserved for 802.2LLC project*/
+#define AF_SECURITY 14 /* Security callback pseudo AF */
+#define AF_KEY 15 /* PF_KEY key management API */
+#define AF_NETLINK 16
+#define AF_ROUTE AF_NETLINK /* Alias to emulate 4.4BSD */
+#define AF_PACKET 17 /* Packet family */
+#define AF_ASH 18 /* Ash */
+#define AF_ECONET 19 /* Acorn Econet */
+#define AF_ATMSVC 20 /* ATM SVCs */
+#define AF_RDS 21 /* RDS sockets */
+#define AF_SNA 22 /* Linux SNA Project (nutters!) */
+#define AF_IRDA 23 /* IRDA sockets */
+#define AF_PPPOX 24 /* PPPoX sockets */
+#define AF_WANPIPE 25 /* Wanpipe API Sockets */
+#define AF_LLC 26 /* Linux LLC */
+#define AF_CAN 29 /* Controller Area Network */
+#define AF_TIPC 30 /* TIPC sockets */
+#define AF_BLUETOOTH 31 /* Bluetooth sockets */
+#define AF_IUCV 32 /* IUCV sockets */
+#define AF_RXRPC 33 /* RxRPC sockets */
+#define AF_ISDN 34 /* mISDN sockets */
+#define AF_PHONET 35 /* Phonet sockets */
+#define AF_IEEE802154 36 /* IEEE802154 sockets */
+#define AF_MAX 37 /* For now.. */
+
+/* Protocol families, same as address families. */
+#define PF_UNSPEC AF_UNSPEC
+#define PF_UNIX AF_UNIX
+#define PF_LOCAL AF_LOCAL
+#define PF_INET AF_INET
+#define PF_AX25 AF_AX25
+#define PF_IPX AF_IPX
+#define PF_APPLETALK AF_APPLETALK
+#define PF_NETROM AF_NETROM
+#define PF_BRIDGE AF_BRIDGE
+#define PF_ATMPVC AF_ATMPVC
+#define PF_X25 AF_X25
+#define PF_INET6 AF_INET6
+#define PF_ROSE AF_ROSE
+#define PF_DECnet AF_DECnet
+#define PF_NETBEUI AF_NETBEUI
+#define PF_SECURITY AF_SECURITY
+#define PF_KEY AF_KEY
+#define PF_NETLINK AF_NETLINK
+#define PF_ROUTE AF_ROUTE
+#define PF_PACKET AF_PACKET
+#define PF_ASH AF_ASH
+#define PF_ECONET AF_ECONET
+#define PF_ATMSVC AF_ATMSVC
+#define PF_RDS AF_RDS
+#define PF_SNA AF_SNA
+#define PF_IRDA AF_IRDA
+#define PF_PPPOX AF_PPPOX
+#define PF_WANPIPE AF_WANPIPE
+#define PF_LLC AF_LLC
+#define PF_CAN AF_CAN
+#define PF_TIPC AF_TIPC
+#define PF_BLUETOOTH AF_BLUETOOTH
+#define PF_IUCV AF_IUCV
+#define PF_RXRPC AF_RXRPC
+#define PF_ISDN AF_ISDN
+#define PF_PHONET AF_PHONET
+#define PF_IEEE802154 AF_IEEE802154
+#define PF_MAX AF_MAX
+
+/* Maximum queue length specifiable by listen. */
+#define SOMAXCONN 128
+
+/* Flags we can use with send/ and recv.
+ Added those for 1003.1g not all are supported yet
+ */
+
+#define MSG_OOB 1
+#define MSG_PEEK 2
+#define MSG_DONTROUTE 4
+#define MSG_TRYHARD 4 /* Synonym for MSG_DONTROUTE for DECnet */
+#define MSG_CTRUNC 8
+#define MSG_PROBE 0x10 /* Do not send. Only probe path f.e. for MTU */
+#define MSG_TRUNC 0x20
+#define MSG_DONTWAIT 0x40 /* Nonblocking io */
+#define MSG_EOR 0x80 /* End of record */
+#define MSG_WAITALL 0x100 /* Wait for a full request */
+#define MSG_FIN 0x200
+#define MSG_SYN 0x400
+#define MSG_CONFIRM 0x800 /* Confirm path validity */
+#define MSG_RST 0x1000
+#define MSG_ERRQUEUE 0x2000 /* Fetch message from error queue */
+#define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */
+#define MSG_MORE 0x8000 /* Sender will send more */
+
+#define MSG_EOF MSG_FIN
+
+#define MSG_CMSG_CLOEXEC 0x40000000 /* Set close_on_exit for file
+ descriptor received through
+ SCM_RIGHTS */
+#if defined(CONFIG_COMPAT)
+#define MSG_CMSG_COMPAT 0x80000000 /* This message needs 32 bit fixups */
+#else
+#define MSG_CMSG_COMPAT 0 /* We never have 32 bit fixups */
+#endif
+
+
+/* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx */
+#define SOL_IP 0
+/* #define SOL_ICMP 1 No-no-no! Due to Linux :-) we cannot use SOL_ICMP=1 */
+#define SOL_TCP 6
+#define SOL_UDP 17
+#define SOL_IPV6 41
+#define SOL_ICMPV6 58
+#define SOL_SCTP 132
+#define SOL_UDPLITE 136 /* UDP-Lite (RFC 3828) */
+#define SOL_RAW 255
+#define SOL_IPX 256
+#define SOL_AX25 257
+#define SOL_ATALK 258
+#define SOL_NETROM 259
+#define SOL_ROSE 260
+#define SOL_DECNET 261
+#define SOL_X25 262
+#define SOL_PACKET 263
+#define SOL_ATM 264 /* ATM layer (cell level) */
+#define SOL_AAL 265 /* ATM Adaption Layer (packet level) */
+#define SOL_IRDA 266
+#define SOL_NETBEUI 267
+#define SOL_LLC 268
+#define SOL_DCCP 269
+#define SOL_NETLINK 270
+#define SOL_TIPC 271
+#define SOL_RXRPC 272
+#define SOL_PPPOL2TP 273
+#define SOL_BLUETOOTH 274
+#define SOL_PNPIPE 275
+#define SOL_RDS 276
+#define SOL_IUCV 277
+
+/* IPX options */
+#define IPX_TYPE 1
+
+#endif /* sockaddr_storage */

/* Great job, guys! These are *architecture-specific* ABI constants,
that are hidden under #ifdef __KERNEL__... what a brilliant idea!
---

From: Ben Hutchings <ben@decadent.org.uk>
Subject: [PATCH] nfsmount: Do not rely on MNTPROC definitions in <linux/nfs.h>

These definitions were removed in Linux 2.6.31, but they are specified
by RFC and so are not subject to change.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/usr/kinit/nfsmount/mount.c
+++ b/usr/kinit/nfsmount/mount.c
@@ -3,7 +3,6 @@
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
-#include <linux/nfs.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -12,6 +11,12 @@
#include "nfsmount.h"
#include "sunrpc.h"

+/* Defined by RFC 1094, section A.5 */
+#define MNTPROC_NULL 0
+#define MNTPROC_MNT 1
+#define MNTPROC_UMNT 3
+#define MNTPROC_UMNTALL 4
+
static uint32_t mount_port;

struct mount_call {
---

--
Ben Hutchings
It's easier to fight for one's principles than to live up to them.
 
Old 03-14-2010, 02:27 AM
maximilian attems
 
Default klibc build trouble

On Sun, Mar 14, 2010 at 02:31:38AM +0000, Ben Hutchings wrote:
> On Sun, 2010-03-14 at 00:54 +0100, maximilian attems wrote:
> > as the next klibc release 1.5.16 looks like shaping up,
> > I have a trouble to build that for Debian.
> >
> > currently I build depent on linux-libc-dev, I don't know what
> > against I can build latest klibc, see
> >
> >
> > klibc fails to build due too:
> > make -C linux/ ARCH=x86_64 INSTALL_HDR_PATH=debian/tmp/usr/lib/klibc/ headers_install
> > make[3]: *** No rule to make target `headers_install'. Stop.
> > make[2]: *** [header] Error 2
>
> We can remove this command and simply rely on linux-libc-dev. We also
> need the following two patches, which I believe are suitable for
> upstream.

thanks for jumping in, sorry I seem to have confused you.
belows needed fixes got added in similar forms, updated the debian repo,
merged in todays 1.5.16 release.

so to reproduce the debian trouble:
git clone git://git.debian.org/git/kernel/klibc.git klibc-debian
cd klibc-debian
debuild -B -us -uc

I don't see how we can get around the headers_install target,
it was added on purpose as previous header installing was
quite fragile see
git log scripts/Kbuild.install

thanks


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100314032749.GJ26111@baikonur.stro.at">http://lists.debian.org/20100314032749.GJ26111@baikonur.stro.at
 
Old 03-14-2010, 03:33 AM
Ben Hutchings
 
Default klibc build trouble

On Sun, 2010-03-14 at 04:27 +0100, maximilian attems wrote:
[...]
> so to reproduce the debian trouble:
> git clone git://git.debian.org/git/kernel/klibc.git klibc-debian
> cd klibc-debian
> debuild -B -us -uc
>
> I don't see how we can get around the headers_install target,
> it was added on purpose as previous header installing was
> quite fragile see
> git log scripts/Kbuild.install

But we already solved this problem and the solution is called
linux-libc-dev. For klibc we just need to do:

$(Q)for x in /usr/include/linux /usr/include/asm*; do
ln -s $${x} $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/ || exit;
done

and make klibc-dev depend on linux-libc-dev.

Ben.

--
Ben Hutchings
It's easier to fight for one's principles than to live up to them.
 
Old 03-14-2010, 03:46 AM
maximilian attems
 
Default klibc build trouble

On Sun, Mar 14, 2010 at 04:33:36AM +0000, Ben Hutchings wrote:
> On Sun, 2010-03-14 at 04:27 +0100, maximilian attems wrote:
> [...]
> > so to reproduce the debian trouble:
> > git clone git://git.debian.org/git/kernel/klibc.git klibc-debian
> > cd klibc-debian
> > debuild -B -us -uc
> >
> > I don't see how we can get around the headers_install target,
> > it was added on purpose as previous header installing was
> > quite fragile see
> > git log scripts/Kbuild.install
>
> But we already solved this problem and the solution is called
> linux-libc-dev. For klibc we just need to do:
>
> $(Q)for x in /usr/include/linux /usr/include/asm*; do
> ln -s $${x} $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/ || exit;
> done
>
> and make klibc-dev depend on linux-libc-dev.

skiping the make headers_install makes klcc useless,
although it should probably be possible to tell klcc
to also look in /usr/include.


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100314044643.GK26111@baikonur.stro.at">http://lists.debian.org/20100314044643.GK26111@baikonur.stro.at
 
Old 03-14-2010, 04:33 PM
maximilian attems
 
Default klibc build trouble

On Sun, Mar 14, 2010 at 04:33:36AM +0000, Ben Hutchings wrote:
> But we already solved this problem and the solution is called
> linux-libc-dev. For klibc we just need to do:
>

this solution does not work, once you add -I/usr/include
you add the glibc definitions and you end up with plenty
of funny redefenitions.

afais libklibc-dev has the merite to shipp those headers in
/usr/lib/klibc/usr/include
this way they are seperate.

now on how to make this happen for debian with the install_headers
call I'd need help.


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100314173309.GM26111@baikonur.stro.at">http://lists.debian.org/20100314173309.GM26111@baikonur.stro.at
 
Old 03-14-2010, 04:47 PM
Ben Hutchings
 
Default klibc build trouble

On Sun, 2010-03-14 at 18:33 +0100, maximilian attems wrote:
> On Sun, Mar 14, 2010 at 04:33:36AM +0000, Ben Hutchings wrote:
> > But we already solved this problem and the solution is called
> > linux-libc-dev. For klibc we just need to do:
> >
>
> this solution does not work, once you add -I/usr/include
> you add the glibc definitions and you end up with plenty
> of funny redefenitions.

How does it not work? That links to the kernel headers
under /usr/include. No need to -I/usr/include.

Ben.

--
Ben Hutchings
I say we take off; nuke the site from orbit. It's the only way to be sure.
 
Old 03-14-2010, 04:50 PM
maximilian attems
 
Default klibc build trouble

On Sun, Mar 14, 2010 at 05:47:40PM +0000, Ben Hutchings wrote:
>
> How does it not work? That links to the kernel headers
> under /usr/include. No need to -I/usr/include.

how would klcc see linux-libc-dev the headers in /usr/include
without aboves include

please specify "That links"


simple example of a libklc-dev wihtout linux-2.6 headers:
In file included from /usr/lib/klibc/include/unistd.h:11,
from mdadm.h:27,
from mdadm.c:28:
/usr/lib/klibc/include/sys/types.h:15:31: error: linux/posix_types.h: No such file or directory
/usr/lib/klibc/include/sys/types.h:16:23: error: asm/types.h: No such file or directory

once you add aboves -I the redefinitions start rolling:
In file included from /usr/include/glob.h:22,
from config.c:28:
/usr/include/sys/cdefs.h:216:1: error: "__attribute_pure__" redefined

easy to test out with make CC=klcc


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100314175002.GN26111@baikonur.stro.at">http://lists.debian.org/20100314175002.GN26111@baikonur.stro.at
 
Old 03-14-2010, 05:41 PM
Ben Hutchings
 
Default klibc build trouble

On Sun, 2010-03-14 at 18:50 +0100, maximilian attems wrote:
> On Sun, Mar 14, 2010 at 05:47:40PM +0000, Ben Hutchings wrote:
> >
> > How does it not work? That links to the kernel headers
> > under /usr/include. No need to -I/usr/include.
>
> how would klcc see linux-libc-dev the headers in /usr/include
> without aboves include
>
> please specify "That links"
>
>
> simple example of a libklc-dev wihtout linux-2.6 headers:
> In file included from /usr/lib/klibc/include/unistd.h:11,
> from mdadm.h:27,
> from mdadm.c:28:
> /usr/lib/klibc/include/sys/types.h:15:31: error: linux/posix_types.h: No such file or directory
> /usr/lib/klibc/include/sys/types.h:16:23: error: asm/types.h: No such file or directory
>
> once you add aboves -I the redefinitions start rolling:
> In file included from /usr/include/glob.h:22,
> from config.c:28:
> /usr/include/sys/cdefs.h:216:1: error: "__attribute_pure__" redefined
>
> easy to test out with make CC=klcc

With these changes:

diff --git a/debian/control b/debian/control
index 14902cc..12f98e1 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Vcs-Git: git://git.debian.org/git/kernel/klibc.git
Package: libklibc-dev
Section: libdevel
Architecture: any
-Depends: libklibc (= ${binary:Version}), ${miscepends}
+Depends: libklibc (= ${binary:Version}), linux-libc-dev, ${miscepends}
Description: kernel headers used during the build of klibc
This package contains the set of kernel headers that were required to
build klibc and the utilities that ship with it. This may or may
diff --git a/scripts/Kbuild.install b/scripts/Kbuild.install
index de918f0..608759d 100644
--- a/scripts/Kbuild.install
+++ b/scripts/Kbuild.install
@@ -95,8 +95,11 @@ header:
$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib
$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin
- $(Q)make -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) INSTALL_HDR_PATH=$(INSTALLROOT)$(INSTALLDIR)/$(KCROSS) headers_install
+ $(Q)for x in /usr/include/linux /usr/include/asm*; do
+ ln -s $${x} $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/ || exit;
+ done
$(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/.
+ $(Q)chmod -R a+rX $(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)

--- END ---

(the extra chmod was needed to allow for umask > 022) I could compile,
link and run this program:

#include <unistd.h>

int main(void)
{
write(1, "Hello world
", 12);
return 0;
}

Ben.

--
Ben Hutchings
I say we take off; nuke the site from orbit. It's the only way to be sure.
 
Old 03-14-2010, 07:23 PM
maximilian attems
 
Default klibc build trouble

On Sun, Mar 14, 2010 at 06:41:56PM +0000, Ben Hutchings wrote:
> With these changes:

ok thanks now I see what you meant!
not happy to add a Debian specific patch,
but in theory this is cleaner as avoiding linux-libc-dev duplication.


will add patch with your authorship to klibc-debian
and upload shortly.


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100314202318.GO26111@baikonur.stro.at">http://lists.debian.org/20100314202318.GO26111@baikonur.stro.at
 

Thread Tools




All times are GMT. The time now is 08:31 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org