Big include file move breaks user mode
Almost all of the includes in include/asm-powerpc where moved to arch/powerpc/include/asm. This is breaking almost all of my user mode code... so I assume I am doing something very wrong.
Here is a simple program that flushes stdout for no apparent reason ;)
#include <stdio.h>
#include <sys/ioctl.h>
int main(int argc, char *argv[])
{
ioctl(1, TCFLSH, 1);
return 0;
}This builds and runs fine under x86 and ppc before the include file move. After the move, the compile fails because gcc can't find asm/ioctls.h which is needed by /usr/include/bits/ioctls.h (let's ignore the cross-compile path for now).
The other big one I am hitting is that /usr/include/bits/errno.h includes linux/errno.h which includes asm/errno.h which no longer exists.
Anybody know how to fix this? I am using the DENX 4.1 toolchain if that helps. Also, if there is a better place to post this, let me know. I posted here since it only affects powerpc cross compiles... x86 still has all the includes in "the right place".
Should include/asm be a link to arch/powerpc/include/asm?
Cheers,
Sean
Quoted 24 lines · Sean MacLennan
Almost all of the includes in
include/asm-powerpcwhere moved toarch/powerpc/include/asm. This is breaking almost all of my user mode code... so I assume I am doing something very wrong.Here is a simple program that flushes stdout for no apparent reason ;)
#include <
stdio.h>
#include <sys/ioctl.h>int
main(int argc, char *argv[]){ ioctl(1, TCFLSH, 1); return 0; }This builds and runs fine under x86 and ppc before the include file move. After the move, the compile fails because gcc can't find
asm/ioctls.hwhich is needed by/usr/include/bits/ioctls.h(let's ignore the cross-compile path for now).The other big one I am hitting is that
/usr/include/bits/errno.hincludeslinux/errno.hwhich includesasm/errno.hwhich no longer exists.
Quoted 6 lines
Anybody know how to fix this? I am using the DENX 4.1 toolchain if that helps. Also, if there is a better place to post this, let me know. I posted here since it only affects powerpc cross compiles... x86 still has all the includes in "the right place".
Should
include/asmbe a link toarch/powerpc/include/asm?
Are you using the headers_install option? or just point to a kernel tree.
- k
Quoted 1 line · Sean MacLennan
Should
include/asmbe a link toarch/powerpc/include/asm?
The user space headers are provided by your distribution, not by the kernel, so include/asm should be a directory, not a symlink. If you are building your own distro, don't just copy the files but rather use 'make headers_install' to get a sanitized version.
Arnd <><
Quoted 4 lines · On Wed, 6 Aug 2008 16:51:40 +0200 "Arnd Bergmann" <[email protected]> wrote:
The user space headers are provided by your distribution, not by the kernel, so
include/asmshould be a directory, not a symlink. If you are building your own distro, don't just copy the files but rather use 'makeheaders_install' to get a sanitized version.
Sorry, I forgot to reply to the list :( Kumar mentioned the "make headers_install" and I got it working with our build system. So everything is back on track.
Cheers,
Sean
Hi,
Quoted 10 lines · Sean MacLennan
Quoted 5 lines · On Wed, 6 Aug 2008 16:51:40 +0200 "Arnd Bergmann" <[email protected]> wrote:
The user space headers are provided by your distribution, not by the kernel, so
include/asmshould be a directory, not a symlink. If you are building your own distro, don't just copy the files but rather use 'makeheaders_install' to get a sanitized version.
Quoted 4 lines
Sorry, I forgot to reply to the list :( Kumar mentioned the "make
headers_install" and I got it working with our build system. So everything is back on track.
Heh, you might also consider using "off the shelf" build systems, such as the T2 SDE:
To avoid re-inventing the wheel again and again.
Yours,
Signature · 2 lines
René Rebe - ExactCODE GmbH - Europe, Germany, Berlin http://exactcode.de | http://t2-project.org | http://rene.rebe.name
Hi,
Quoted 10 lines · Sean MacLennan
Quoted 5 lines · On Wed, 6 Aug 2008 16:51:40 +0200 "Arnd Bergmann" <[email protected]> wrote:
The user space headers are provided by your distribution, not by the kernel, so
include/asmshould be a directory, not a symlink. If you are building your own distro, don't just copy the files but rather use 'makeheaders_install' to get a sanitized version.
Quoted 4 lines
Sorry, I forgot to reply to the list :( Kumar mentioned the "make
headers_install" and I got it working with our build system. So everything is back on track.
Heh, you might also consider using "off the shelf" build systems, such as the T2 SDE:
To avoid re-inventing the whell again and again.
Yours,
Signature · 2 lines
René Rebe - ExactCODE GmbH - Europe, Germany, Berlin http://exactcode.de | http://t2-project.org | http://rene.rebe.name
Quoted 10 lines · René Rebe
Heh, you might also consider using "off the shelf" build systems, such as the T2 SDE:
To avoid re-inventing the wheel again and again.
Yours,
Whee.. another rootfs build system. Why we can't converge some of these towards so we have a larger community is beyond me.
- k--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html