This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Where does crosstool get its "kernel" includes?


Marius Groeger wrote:
@Dan,Alex: Why are you using sanitized headers anyway, other than that it is probably ideologically nicer, smaller, etc. towards the apps? I'm only using regular headers and never ran into serious problems.

There are a few apps that don't compile properly with regular kernel headers. ...

If you do recall, or happen to run into any of those issues again, will you drop me a line, please? I do recall certain peculiarities with very low level tools, but nothing ever made me even remotely consider using modified kernel headers. I would like to make sure nothing slipped my attention.

Here are some errors in some closed source stuff I ran into that went away with PLD headers:


/usr/include/linux/list.h:682:2: #warning "don't include kernel headers in userspace"
/usr/include/linux/audit.h:101: error: field `nlh' has incomplete type

And from a different run:

In file included from /opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/thread_info.h:20,
                 from /opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/spinlock.h:12,
                 from /opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/blockgroup_lock.h:8,
                 from /opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/ext2_fs_sb.h:19,
                 from /opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/ext2_fs.h:20,
                 from neveryoumind.c:13:
/opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/bitops.h: In function `int get_bitmask_order(unsigned int)':
/opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/bitops.h:78: error: `fls' undeclared (first use this function)

In file included from /opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/percpu_counter.h:11,
                 from /opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/ext2_fs_sb.h:20,
                 from /opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/ext2_fs.h:20,
                 from neveryoumind.c:13:
/opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/percpu.h: In function `void* __alloc_percpu(size_t, size_t)':
/opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/percpu.h:45: error: `GFP_KERNEL' undeclared (first use this function)
/opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/percpu.h:45: error: `kmalloc' undeclared (first use this function)
/opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/percpu.h:47: error: `memset' undeclared (first use this function)
/opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/percpu.h: In function `void free_percpu(const void*)':
/opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/percpu.h:52: error: `kfree' undeclared (first use this function)
In file included from /opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/ext2_fs.h:20,
                 from neveryoumind.c:13:
/opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/ext2_fs_sb.h: At global scope:
/opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/ext2_fs_sb.h:49: error: `u32' does not name a type
/opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/linux/ext2_fs_sb.h:51: error: expected `;' before '*' token
In file included from neveryoumind.h:14,
                 from neveryoumind.c:15:
/opt/gcc-3.4.1-glibc-2.3.2/x86_64-unknown-linux-gnu/sys-root/usr/include/string.h:58: error: `void* memset(void*, int, size_t)' used prior to declaration

As I said earlier, I'd love to submit fixes to the main kernel tree for
these, but I'm a bit overwhelmed, and the PLD headers were an easy way out.
- Dan

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]