On Fri, May 02, 2008 at 03:57:08PM +0200, Sam Ravnborg wrote:Of course it doesn't fail to build. With buggy gcc it will be optimized to void __attribute__((weak)) func (void) { } int main () { return 0; } (similarly how all recent gccs optimize this without the weak attribute) while non-buggy gcc keeps the func call. So, you either need to grep the assembly (that's what e.g. the GCC testcase does), or you can e.g. use a runtime testcase: extern void abort (void); void __attribute__((weak)) func (void) { } int main () { func (); abort (); } in one compilation unit and extern void exit (int); void func (void) { exit (0); } in another one. I doubt a runtime testcase is acceptable though for the kernel, as the cross compiler used to build the kernel might not be able to create userland executables (missing C library, etc.). Jakub --
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| James Bottomley | Re: Announce: Linux-next (Or Andrew's dream :-)) |
| Andrew Morton | echo mem > /sys/power/state |
| Peter Zijlstra | [PATCH 00/23] per device dirty throttling -v8 |
git: | |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 18/37] dccp: Support for Mandatory options |
| Michael S. Tsirkin | Re: [RFC PATCH v2 03/19] vbus: add connection-client helper infrastructure |
| NeilBrown | [PATCH 00/18] Assorted md patches headed for 2.6.30 |
| Justin Piszcz | General question (scheduler) with SSDs? |
| Neil Brown | Re: Any hope for a 27 disk RAID6+1HS array with four disks reporting "No md superb... |
| Ryan Wagoner | High IO Wait with RAID 1 |
