[Bug c/63567] Linux kernel build error due to non-static initializers
sasha.levin at oracle dot com
gcc-bugzilla@gcc.gnu.org
Sat Oct 18 05:26:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63567
Sasha Levin <sasha.levin at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #6 from Sasha Levin <sasha.levin at oracle dot com> ---
I'm still seeing the issue with the fix applied:
CC kernel/smpboot.o
In file included from include/linux/mutex.h:15:0,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:15,
from include/linux/kobject.h:21,
from include/linux/device.h:17,
from include/linux/node.h:17,
from include/linux/cpu.h:16,
from kernel/smpboot.c:4:
include/linux/spinlock_types.h:82:2: error: initializer element is not constant
(spinlock_t ) __SPIN_LOCK_INITIALIZER(lockname)
^
include/linux/mutex.h:112:18: note: in expansion of macro
‘__SPIN_LOCK_UNLOCKED’
, .wait_lock = __SPIN_LOCK_UNLOCKED(lockname.wait_lock) \
^
include/linux/mutex.h:118:27: note: in expansion of macro ‘__MUTEX_INITIALIZER’
struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
^
kernel/smpboot.c:80:8: note: in expansion of macro ‘DEFINE_MUTEX’
static DEFINE_MUTEX(smpboot_threads_lock);
^
include/linux/spinlock_types.h:82:2: note: (near initialization for
‘smpboot_threads_lock.wait_lock’)
(spinlock_t ) __SPIN_LOCK_INITIALIZER(lockname)
^
include/linux/mutex.h:112:18: note: in expansion of macro
‘__SPIN_LOCK_UNLOCKED’
, .wait_lock = __SPIN_LOCK_UNLOCKED(lockname.wait_lock) \
^
include/linux/mutex.h:118:27: note: in expansion of macro ‘__MUTEX_INITIALIZER’
struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
^
kernel/smpboot.c:80:8: note: in expansion of macro ‘DEFINE_MUTEX’
static DEFINE_MUTEX(smpboot_threads_lock);
More information about the Gcc-bugs
mailing list