I've been encountering the following link errors trying to build a MONOLITHIC i386 kernel _with_ LOCKDEBUG defined for almost two days now: link MONOLITHIC/netbsd kern_mutex.o: In function `mutex_spin_enter': kern_mutex.c:(.text+0x320): multiple definition of `mutex_enter' lock_stubs.o:(.text+0x0): first defined here kern_mutex.o: In function `mutex_spin_exit': kern_mutex.c:(.text+0x890): multiple definition of `mutex_exit' lock_stubs.o:(.text+0x20): first defined here kern_mutex.o: In function `mutex_spin_enter': kern_mutex.c:(.text+0x320): multiple definition of `mutex_spin_enter' lock_stubs.o:(.text+0x100): first defined here kern_mutex.o: In function `mutex_spin_exit': kern_mutex.c:(.text+0x890): multiple definition of `mutex_spin_exit' lock_stubs.o:(.text+0x140): first defined here kern_rwlock.o: In function `rw_vector_enter': kern_rwlock.c:(.text+0x890): multiple definition of `rw_enter' lock_stubs.o:(.text+0x40): first defined here kern_rwlock.o: In function `rw_vector_exit': kern_rwlock.c:(.text+0xd00): multiple definition of `rw_exit' lock_stubs.o:(.text+0x80): first defined here kern_rwlock.o: In function `rw_vector_tryenter': kern_rwlock.c:(.text+0x730): multiple definition of `rw_tryenter' lock_stubs.o:(.text+0xc0): first defined here --- netbsd --- *** [netbsd] Error code 1 1 error I do see what looks to be the appropriate #if !defined(LOCKDEBUG) in sys/arch/i386/i386/lock_stubs.S, but that doesn't seem to have the desired effect somehow: $ nm /rest/build/woods/once/current-i386-i386-ppro-obj/usr/src/sys/arch/i386/compile/MONOLITHIC/lock_stubs.o U Xspllower 6e074def A _KERNEL_OPT_LOCKDEBUG 00000001 A _KERNEL_OPT_MULTIPROCESSOR 000001d0 T __cpu_simple_lock 000001c0 T __cpu_simple_lock_init 00000210 T __cpu_simple_lock_try 00000200 T __cpu_simple_unlock 00000180 T i686_mutex_spin_exit 000001c0 T i686_mutex_spin_exit_end 000001bb T i686_mutex_spin_exit_patch 00000000 T mutex_enter 00000020 T mutex_exit 00000100 T mutex_spin_enter 00000140 T mutex_spin_enter_end 00000140 T mutex_spin_exit 00000180 T mutex_spin_exit_end U mutex_spin_retry U mutex_vector_enter U mutex_vector_exit 00000040 T rw_enter 00000080 T rw_exit 000000c0 T rw_tryenter U rw_vector_enter U rw_vector_exit 00000000 D x86_lockpatch 00000028 D x86_retpatch -- Greg A. Woods Planix, Inc. <woods%planix.com@localhost> +1 416 218 0099 http://www.planix.com/
Attachment:
pgpgdhxb68E3_.pgp
Description: PGP signature