From uqs@spoerlein.net  Thu Oct 29 19:56:17 2009
Return-Path: <uqs@spoerlein.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0C00C1065676
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 29 Oct 2009 19:56:17 +0000 (UTC)
	(envelope-from uqs@spoerlein.net)
Received: from acme.spoerlein.net (cl-43.dus-01.de.sixxs.net [IPv6:2a01:198:200:2a::2])
	by mx1.freebsd.org (Postfix) with ESMTP id A3B8F8FC29
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 29 Oct 2009 19:56:16 +0000 (UTC)
Received: from roadrunner.spoerlein.net (p54954266.dip.t-dialin.net [84.149.66.102])
	by acme.spoerlein.net (8.14.3/8.14.3) with ESMTP id n9TJuEj5056074
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 29 Oct 2009 20:56:15 +0100 (CET)
	(envelope-from uqs@spoerlein.net)
Received: from roadrunner.spoerlein.net (localhost [127.0.0.1])
	by roadrunner.spoerlein.net (8.14.3/8.14.3) with ESMTP id n9TJtxAO015505
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 29 Oct 2009 20:55:59 +0100 (CET)
	(envelope-from uqs@roadrunner.spoerlein.net)
Received: (from uqs@localhost)
	by roadrunner.spoerlein.net (8.14.3/8.14.3/Submit) id n9TJtxg7015504;
	Thu, 29 Oct 2009 20:55:59 +0100 (CET)
	(envelope-from uqs)
Message-Id: <200910291955.n9TJtxg7015504@roadrunner.spoerlein.net>
Date: Thu, 29 Oct 2009 20:55:59 +0100 (CET)
From: Ulrich Spoerlein <uqs@spoerlein.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: libcsu: Bump to WARNS=6
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         140089
>Category:       bin
>Synopsis:       [libcsu] [patch] libcsu: Bump to WARNS=6
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    uqs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 29 20:00:11 UTC 2009
>Closed-Date:    Fri Mar 05 15:30:24 UTC 2010
>Last-Modified:  Fri Mar 05 15:30:24 UTC 2010
>Originator:     Ulrich Spoerlein
>Release:        FreeBSD 9.0-CURRENT i386
>Organization:
>Environment:
	
>Description:
Most of lib/csu compiles fine with WARNS=6 already, some archs
were missing a couple of declarations.

I think the _start() declaration for arm is bogus, it is using
__start() with a different order of args. But I cannot figure
out the asm involved so someone would need to double check this.
	
>How-To-Repeat:
	
>Fix:

	

--- libcsu.diff begins here ---
diff -r d1a04723c41c -r 0870809ec1fb lib/csu/Makefile.inc
--- a/lib/csu/Makefile.inc	Fri Oct 23 15:14:54 2009 +0000
+++ b/lib/csu/Makefile.inc	Thu Oct 29 20:48:21 2009 +0100
@@ -1,3 +1,4 @@
 # $FreeBSD$
 
+WARNS?=	6
 SSP_CFLAGS=
diff -r d1a04723c41c -r 0870809ec1fb lib/csu/arm/Makefile
--- a/lib/csu/arm/Makefile	Fri Oct 23 15:14:54 2009 +0000
+++ b/lib/csu/arm/Makefile	Thu Oct 29 20:48:21 2009 +0100
@@ -5,8 +5,7 @@
 SRCS=		crt1.c crti.S crtn.S
 OBJS=		${SRCS:N*.h:R:S/$/.o/g}
 OBJS+=		gcrt1.o
-CFLAGS+=	-Wall -Wno-unused \
-		-I${.CURDIR}/../common \
+CFLAGS+=	-I${.CURDIR}/../common \
 		-I${.CURDIR}/../../libc/include
 
 all: ${OBJS}
diff -r d1a04723c41c -r 0870809ec1fb lib/csu/arm/crt1.c
--- a/lib/csu/arm/crt1.c	Fri Oct 23 15:14:54 2009 +0000
+++ b/lib/csu/arm/crt1.c	Thu Oct 29 20:48:21 2009 +0100
@@ -62,6 +62,8 @@
 extern int main(int, char **, char **);
 extern void _start(int, char **, char **, const struct Struct_Obj_Entry *,
     void (*)(void), struct ps_strings *);
+extern void __start(int, char **, char **, struct ps_strings *,
+    const struct Struct_Obj_Entry *, void (*)(void));
 
 #ifdef GCRT
 extern void _mcleanup(void);
diff -r d1a04723c41c -r 0870809ec1fb lib/csu/i386-elf/Makefile
--- a/lib/csu/i386-elf/Makefile	Fri Oct 23 15:14:54 2009 +0000
+++ b/lib/csu/i386-elf/Makefile	Thu Oct 29 20:48:21 2009 +0100
@@ -8,7 +8,6 @@
 FILESGRP=	${LIBGRP}
 FILESMODE=	${LIBMODE}
 FILESDIR=	${LIBDIR}
-WARNS?=		6
 CFLAGS+=	-I${.CURDIR}/../common \
 		-I${.CURDIR}/../../libc/include
 CLEANFILES=	${FILES}
diff -r d1a04723c41c -r 0870809ec1fb lib/csu/mips/Makefile
--- a/lib/csu/mips/Makefile	Fri Oct 23 15:14:54 2009 +0000
+++ b/lib/csu/mips/Makefile	Thu Oct 29 20:48:21 2009 +0100
@@ -5,8 +5,7 @@
 SRCS=		crt1.c crti.S crtn.S
 OBJS=		${SRCS:N*.h:R:S/$/.o/g}
 OBJS+=		gcrt1.o
-CFLAGS+=	-Wall -Wno-unused \
-		-I${.CURDIR}/../common \
+CFLAGS+=	-I${.CURDIR}/../common \
 		-I${.CURDIR}/../../libc/include
 
 all: ${OBJS}
diff -r d1a04723c41c -r 0870809ec1fb lib/csu/mips/crt1.c
--- a/lib/csu/mips/crt1.c	Fri Oct 23 15:14:54 2009 +0000
+++ b/lib/csu/mips/crt1.c	Thu Oct 29 20:48:21 2009 +0100
@@ -54,6 +54,10 @@
 
 extern void _init(void);
 extern void _fini(void);
+extern void __gccmain(void);
+extern void __main(void);
+extern void __start(char **, void (*)(void), struct Struct_Obj_Entry *,
+    struct ps_strings *);
 extern int main(int, char **, char **);
 
 #ifdef GCRT
@@ -73,8 +77,8 @@
 void
 __start(char **ap,
 	void (*cleanup)(void),			/* from shared loader */
-	struct Struct_Obj_Entry *obj,		/* from shared loader */
-	struct ps_strings *ps_strings)
+	struct Struct_Obj_Entry *obj __unused,	/* from shared loader */
+	struct ps_strings *ps_strings __unused)
 {
 	int argc;
 	char **argv;
--- libcsu.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->uqs 
Responsible-Changed-By: uqs 
Responsible-Changed-When: Thu Feb 4 08:59:41 UTC 2010 
Responsible-Changed-Why:  
Take my own PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=140089 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/140089: commit references a PR
Date: Fri,  5 Mar 2010 13:29:20 +0000 (UTC)

 Author: uqs
 Date: Fri Mar  5 13:29:05 2010
 New Revision: 204757
 URL: http://svn.freebsd.org/changeset/base/204757
 
 Log:
   Use default WARNS setting (of 6) for lib/csu.
   
   PR:		bin/140089
   Reviewed by:	jmallett
   Approved by:	ed (co-mentor)
 
 Modified:
   head/lib/csu/Makefile.inc
   head/lib/csu/arm/Makefile
   head/lib/csu/ia64/Makefile
   head/lib/csu/mips/Makefile
   head/lib/csu/mips/crt1.c
   head/lib/csu/powerpc/Makefile
 
 Modified: head/lib/csu/Makefile.inc
 ==============================================================================
 --- head/lib/csu/Makefile.inc	Fri Mar  5 13:28:05 2010	(r204756)
 +++ head/lib/csu/Makefile.inc	Fri Mar  5 13:29:05 2010	(r204757)
 @@ -2,4 +2,4 @@
  
  SSP_CFLAGS=
  
 -WARNS?=	6
 +.include "../Makefile.inc"
 
 Modified: head/lib/csu/arm/Makefile
 ==============================================================================
 --- head/lib/csu/arm/Makefile	Fri Mar  5 13:28:05 2010	(r204756)
 +++ head/lib/csu/arm/Makefile	Fri Mar  5 13:29:05 2010	(r204757)
 @@ -5,12 +5,9 @@
  SRCS=		crt1.c crti.S crtn.S
  OBJS=		${SRCS:N*.h:R:S/$/.o/g}
  OBJS+=		Scrt1.o gcrt1.o
 -CFLAGS+=	-Wall -Wno-unused \
 -		-I${.CURDIR}/../common \
 +CFLAGS+=	-I${.CURDIR}/../common \
  		-I${.CURDIR}/../../libc/include
  
 -WARNS?=		2
 -
  all: ${OBJS}
  
  CLEANFILES=	${OBJS}
 
 Modified: head/lib/csu/ia64/Makefile
 ==============================================================================
 --- head/lib/csu/ia64/Makefile	Fri Mar  5 13:28:05 2010	(r204756)
 +++ head/lib/csu/ia64/Makefile	Fri Mar  5 13:29:05 2010	(r204757)
 @@ -5,8 +5,7 @@
  SRCS=		crt1.S crti.S crtn.S
  OBJS=		${SRCS:N*.h:R:S/$/.o/g}
  OBJS+=		Scrt1.o gcrt1.o
 -CFLAGS+=	-Wall -Wno-unused \
 -		-I${.CURDIR}/../common \
 +CFLAGS+=	-I${.CURDIR}/../common \
  		-I${.CURDIR}/../../libc/include
  
  all: ${OBJS}
 
 Modified: head/lib/csu/mips/Makefile
 ==============================================================================
 --- head/lib/csu/mips/Makefile	Fri Mar  5 13:28:05 2010	(r204756)
 +++ head/lib/csu/mips/Makefile	Fri Mar  5 13:29:05 2010	(r204757)
 @@ -5,12 +5,9 @@
  SRCS=		crt1.c crti.S crtn.S
  OBJS=		${SRCS:N*.h:R:S/$/.o/g}
  OBJS+=		Scrt1.o gcrt1.o
 -CFLAGS+=	-Wall -Wno-unused \
 -		-I${.CURDIR}/../common \
 +CFLAGS+=	-I${.CURDIR}/../common \
  		-I${.CURDIR}/../../libc/include
  
 -WARNS?=		2
 -
  all: ${OBJS}
  
  CLEANFILES=	${OBJS}
 
 Modified: head/lib/csu/mips/crt1.c
 ==============================================================================
 --- head/lib/csu/mips/crt1.c	Fri Mar  5 13:28:05 2010	(r204756)
 +++ head/lib/csu/mips/crt1.c	Fri Mar  5 13:29:05 2010	(r204757)
 @@ -72,8 +72,8 @@ void __start(char **, void (*)(void), st
  void
  __start(char **ap,
  	void (*cleanup)(void),			/* from shared loader */
 -	struct Struct_Obj_Entry *obj,		/* from shared loader */
 -	struct ps_strings *ps_strings)
 +	struct Struct_Obj_Entry *obj __unused,	/* from shared loader */
 +	struct ps_strings *ps_strings __unused)
  {
  	int argc;
  	char **argv;
 
 Modified: head/lib/csu/powerpc/Makefile
 ==============================================================================
 --- head/lib/csu/powerpc/Makefile	Fri Mar  5 13:28:05 2010	(r204756)
 +++ head/lib/csu/powerpc/Makefile	Fri Mar  5 13:29:05 2010	(r204757)
 @@ -5,8 +5,7 @@
  SRCS=		crt1.c crti.S crtn.S
  OBJS=		${SRCS:N*.h:R:S/$/.o/g}
  OBJS+=		Scrt1.o gcrt1.o
 -CFLAGS+=	-Wall -Wno-unused \
 -		-I${.CURDIR}/../common \
 +CFLAGS+=	-I${.CURDIR}/../common \
  		-I${.CURDIR}/../../libc/include
  
  all: ${OBJS}
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: uqs 
State-Changed-When: Fri Mar 5 15:30:22 UTC 2010 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=140089 
>Unformatted:
