NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/47856: netbsd-6 clang build fails in lib/libc/thread-stub/thread-stub.c due to function not being declared 'noreturn'



>Number:         47856
>Category:       lib
>Synopsis:       netbsd-6 clang build fails in 
>lib/libc/thread-stub/thread-stub.c due to function not being declared 
>'noreturn'
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 26 17:05:00 +0000 2013
>Originator:     Jan Danielsson
>Release:        netbsd-6
>Organization:
La Cosa Nostra
>Environment:
NetBSD gauss 6.1_RC3 NetBSD 6.1_RC3 (GAUSS) #0: Sun Apr  7 21:23:00 CEST 2013  
jan@gauss:/home/jan/tmp/sysbuild/obj.amd64/usr/src/sys/arch/amd64/compile/GAUSS 
amd64
>Description:
Building netbsd-6 using clang has (in recent times) resulted in:

[---]
#   compile  libc/thread-stub.o
/home/jan/sysbuild/tools/bin/x86_64--netbsd-clang -O2 -std=gnu99  
-Wno-sign-compare -Wno-pointer-sign  -Wall -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wno-sign-compare  -Wa,--fatal-warnings 
-Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra 
-Wno-unused-parameter -Wno-sign-compare -Wsign-compare -Wformat=2  
-Wpointer-sign -Wmissing-noreturn  -Werror   -fstack-pr
otector -Wstack-protector  -mllvm -stack-protector-buffer-size=1    
--sysroot=/home/jan/sysbuild/dest.amd64 -D_LIBC -DLIBC_SCCS -DSY
SLIBC_SCCS -D_REENTRANT -DHESIOD -DINET6 -DNLS -DYP -I/usr/src/lib/libc/include 
-I/usr/src/lib/libc -I/usr/src/sys -I/usr/src/lib/li
bc/compat/../locale -I/usr/src/lib/libc/compat/stdlib 
-I/usr/src/lib/libc/compat/../stdlib -I/usr/src/lib/libc/../../common/lib/libc
/quad -I/usr/src/lib/libc/../../common/lib/libc/string 
-I/usr/src/lib/libc/../../common/lib/libc/arch/x86_64/string -D__DBINTERFACE_
PRIVATE -I/usr/src/libexec/ld.elf_so -I/usr/src/lib/libc/dlfcn 
-I/usr/src/lib/libc/gdtoa -DNO_FENV_H -I/usr/src/lib/libc/arch/x86_64
/gdtoa -DWITH_RUNE -I/usr/src/lib/libc -DPOSIX_MISTAKE -DCOMPAT__RES -DUSE_POLL 
-DPORTMAP -DWIDE_DOUBLE -DALL_STATE -DUSG_COMPAT  -D
_FORTIFY_SOURCE=2 -c    /usr/src/lib/libc/thread-stub/thread-stub.c -o 
thread-stub.o
/usr/src/lib/libc/thread-stub/thread-stub.c:415:1: error: function 
'__libc_thr_exit_stub' could be declared with attribute
      'noreturn' [-Werror,-Wmissing-noreturn]
{
^
1 error generated.
>How-To-Repeat:
Sync to latest netbsd-6 sources. Go to external/bsd/llvm/, run make checkout 
(need svn installed), then start a build using:

export MKLLVM=yes
export HAVE_LLVM=yes

...and wait.
>Fix:
Index: thread-stub.c
===================================================================
RCS file: /cvsroot/src/lib/libc/thread-stub/thread-stub.c,v
retrieving revision 1.22.4.2
diff -u -r1.22.4.2 thread-stub.c
--- thread-stub.c       29 Apr 2013 23:35:31 -0000      1.22.4.2
+++ thread-stub.c       26 May 2013 17:00:44 -0000
@@ -410,7 +410,7 @@
        return (EOPNOTSUPP);
 }
 
-void
+void __dead
 __libc_thr_exit_stub(void *v)
 {
        /* LINTED deliberate lack of effect */




Home | Main Index | Thread Index | Old Index