NetBSD Problem Report #47856

From www@NetBSD.org  Sun May 26 17:01:31 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 29E7D70C9D
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 26 May 2013 17:01:31 +0000 (UTC)
Message-Id: <20130526170129.6C6BE70CFD@mollari.NetBSD.org>
Date: Sun, 26 May 2013 17:01:29 +0000 (UTC)
From: jan.m.danielsson@gmail.com
Reply-To: jan.m.danielsson@gmail.com
To: gnats-bugs@NetBSD.org
Subject: netbsd-6 clang build fails in lib/libc/thread-stub/thread-stub.c due to function not being declared 'noreturn'
X-Send-Pr-Version: www-1.0

>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:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 26 17:05:00 +0000 2013
>Closed-Date:    Mon Jan 02 05:28:00 +0000 2023
>Last-Modified:  Mon Jan 02 05:28:00 +0000 2023
>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 */

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 02 Jan 2023 05:28:00 +0000
State-Changed-Why:
build failures in -6 from 2013 are no longer relevant.

Sorry this report went off into the void.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.