Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Oct 2009 20:55:59 +0100 (CET)
From:      Ulrich Spörlein <uqs@spoerlein.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/140089: libcsu: Bump to WARNS=6
Message-ID:  <200910291955.n9TJtxg7015504@roadrunner.spoerlein.net>
Resent-Message-ID: <200910292000.n9TK0CPo050397@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         140089
>Category:       bin
>Synopsis:       libcsu: Bump to WARNS=6
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 29 20:00:11 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Ulrich Spörlein
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910291955.n9TJtxg7015504>