Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 57664 - linux26-headers-2.6.7-appCompat.patch breaks `make prepare`
Summary: linux26-headers-2.6.7-appCompat.patch breaks `make prepare`
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal
Assignee: Tim Yamin (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-19 17:33 UTC by SpanKY
Modified: 2004-07-22 11:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
make-prepare.patch (make-prepare.patch,400 bytes, patch)
2004-07-22 11:18 UTC, SpanKY
Details | Diff
new_mod_devicetable.h-hunk.patch (new_mod_devicetable.h-hunk.patch,462 bytes, patch)
2004-07-22 11:20 UTC, SpanKY
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2004-07-19 17:33:32 UTC
linux26-headers really should be running `make prepare` to setup the include/asm* files/directories/symlinks correctly

in the case of some arches, a file is generated called asm/offsets.h (like hppa) or asm/asm_offsets.h (like x86/ia64) ... on some archs, symlinks are generated so that generic include paths can be used (like arm) ...
on some archs this has gone unnoticed due to the fact that the file is very rarely used ... on other archs, we've implemented hacks to work around it (arm/hppa for example) ...

at any rate, the hunk of the appcompat patch that applies to mod_devicetable.h prevents scripts/file2alias.c from compiling:
  HOSTCC  scripts/file2alias.o
scripts/file2alias.c:47: warning: "struct usb_device_id" declared inside parameter list
scripts/file2alias.c:47: warning: its scope is only this definition or declaration, which is probably not what you want
scripts/file2alias.c: In function `do_usb_entry':
scripts/file2alias.c:49: error: dereferencing pointer to incomplete type
<SNIP>

this is because the file is compiled (on purpose) without defining __KERNEL__ and thus lacks all the pnp/usb/etc... structures that are defined in mod_devicetable.h ...

one possible 'fix' is to patch file2alias.c slightly to define __KERNEL__ before including modpost.h ... however this leads to one conflict in the definition ofkernel_ulong_t since it is defined in both file2alias.c and mod_devicetable.h ... not sure what kind of impact removing the small hunk of code in file2alias.c will have though ...
Comment 1 Tim Yamin (RETIRED) gentoo-dev 2004-07-20 01:24:10 UTC
Solution: Compile first, patch that file only afterwards. See how that goes...
Comment 2 SpanKY gentoo-dev 2004-07-20 08:11:48 UTC
that fix works for me :)

tested on x86/hppa/arm/amd64 and all seem happy with this change
Comment 3 SpanKY gentoo-dev 2004-07-22 11:16:59 UTC
find new fix attached ... current fix breaks crossdev
Comment 4 SpanKY gentoo-dev 2004-07-22 11:18:49 UTC
Created attachment 35956 [details, diff]
make-prepare.patch

this fixes the file2alias.c file ... just stick it in with the current
appCompat.patch
Comment 5 SpanKY gentoo-dev 2004-07-22 11:20:07 UTC
Created attachment 35957 [details, diff]
new_mod_devicetable.h-hunk.patch

new patch for mod_devicetable.h ... this is needed so the previous patch works
...

just replace the current hunks that apply against mod_devicetable.h with this
patch in appCompat.patch
Comment 6 Tim Yamin (RETIRED) gentoo-dev 2004-07-22 11:30:58 UTC
It's in - thanks SpanKY!