Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Oct 2001 11:58:10 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        "David E. O'Brien" <obrien@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/alpha/include ansi.h src/sys/i386/include ansi.h src/sys/ia64/include ansi.h src/sys/powerpc/include ansi.h src/sys/sparc64/include ansi.h
Message-ID:  <20011018115810.A87594@sunbay.com>
In-Reply-To: <200110180027.f9I0Rd850796@freefall.freebsd.org>; from obrien@FreeBSD.org on Wed, Oct 17, 2001 at 05:27:39PM -0700
References:  <200110180027.f9I0Rd850796@freefall.freebsd.org>

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

--YZ5djTAD1cGYuMQK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

The below change breaks 4.4-STABLE -> 5.0-CURRENT upgrade path:

: --------------------------------------------------------------
: >>> stage 4: building libraries
: --------------------------------------------------------------
: cd /CURRENT/usr/src; MAKEOBJDIRPREFIX=/usr/obj  MACHINE_ARCH=i386  COMPILER_PATH=/usr/obj/CURRENT/usr/src/i386/usr/libexec:/usr/obj/CURRENT/usr/src/i386/usr/bin  LIBRARY_PATH=/usr/obj/CURRENT/usr/src/i386/usr/lib:/usr/obj/CURRENT/usr/src/i386/usr/lib  OBJFORMAT_PATH=/usr/obj/CURRENT/usr/src/i386/usr/libexec  CFLAGS="-nostdinc -O -pipe "  CXXINCLUDES="-nostdinc++ "  PERL5LIB=/usr/obj/CURRENT/usr/src/i386/usr/libdata/perl/5.6.0  GROFF_BIN_PATH=/usr/obj/CURRENT/usr/src/i386/usr/bin  GROFF_FONT_PATH=/usr/obj/CURRENT/usr/src/i386/usr/share/groff_font  GROFF_TMAC_PATH=/usr/obj/CURRENT/usr/src/i386/usr/share/tmac  DESTDIR=/usr/obj/CURRENT/usr/src/i386  INSTALL="sh /CURRENT/usr/src/tools/install.sh"  PATH=/usr/obj/CURRENT/usr/src/i386/usr/sbin:/usr/obj/CURRENT/usr/src/i386/usr/bin:/usr/obj/CURRENT/usr/src/i386/usr/games:/sbin:/bin:/usr/sbin:/usr/bin make -f Makefile.inc1 -DNOHTML -DNOINFO -DNOMAN -DNOFSCHG libraries
: cd /CURRENT/usr/src/lib/csu/i386-elf;  make depend;  make all;  make install
: rm -f .depend
: mkdep -f .depend -a   -nostdinc -I/CURRENT/usr/src/lib/csu/i386-elf/../common -I/usr/obj/CURRENT/usr/src/i386/usr/include    /CURRENT/usr/src/lib/csu/i386-elf/crti.S /CURRENT/usr/src/lib/csu/i386-elf/crtn.S
: mkdep -f .depend -a   -nostdinc -I/CURRENT/usr/src/lib/csu/i386-elf/../common -I/usr/obj/CURRENT/usr/src/i386/usr/include  /CURRENT/usr/src/lib/csu/i386-elf/crt1.c
: cd /CURRENT/usr/src/lib/csu/i386-elf; make _EXTRADEPEND
: cc -nostdinc -O -pipe   -elf -Wall -fkeep-inline-functions  -I/CURRENT/usr/src/lib/csu/i386-elf/../common -I/usr/obj/CURRENT/usr/src/i386/usr/include  -c /CURRENT/usr/src/lib/csu/i386-elf/crt1.c -o crt1.o
: In file included from /usr/obj/CURRENT/usr/src/i386/usr/include/stddef.h:41,
:                  from /CURRENT/usr/src/lib/csu/i386-elf/crt1.c:32:
: /usr/obj/CURRENT/usr/src/i386/usr/include/machine/ansi.h:78: syntax error before `__gnuc_va_list'
: /usr/obj/CURRENT/usr/src/i386/usr/include/machine/ansi.h:78: warning: type defaults to `int' in declaration of `__gnuc_va_list'
: /usr/obj/CURRENT/usr/src/i386/usr/include/machine/ansi.h:78: warning: data definition has no type or storage class
: /usr/obj/CURRENT/usr/src/i386/usr/include/machine/endian.h:74: warning: `__uint16_swap_uint32' defined but not used
: /usr/obj/CURRENT/usr/src/i386/usr/include/machine/endian.h:82: warning: `__uint8_swap_uint32' defined but not used
: /usr/obj/CURRENT/usr/src/i386/usr/include/machine/endian.h:94: warning: `__uint8_swap_uint16' defined but not used
: *** Error code 1
: 
: Stop in /CURRENT/usr/src/lib/csu/i386-elf.
: *** Error code 1

In 4.4-STABLE, the following are defined:

#define __GNUC__ 2
#define __GNUC_MINOR__ 95

and _BSD_VA_LIST_ is undefined.  The attached patch should fix this.
Also, the ia64/include/ansi.h doesn't have __GNUC__ version checks
thus making it impossible to cross-upgrade from 4.4-STABLE i386 to
5.0-CURRENT ia64.  Has this been considered?

On Wed, Oct 17, 2001 at 05:27:39PM -0700, David E. O'Brien wrote:
> obrien      2001/10/17 17:27:39 PDT
> 
>   Modified files:
>     sys/alpha/include    ansi.h 
>     sys/i386/include     ansi.h 
>     sys/ia64/include     ansi.h 
>     sys/powerpc/include  ansi.h 
>     sys/sparc64/include  ansi.h 
>   Log:
>   Add support for "__gnuc_va_list".  Some overly "smart" libraries assume
>   the existence of the __gnuc_va_list type[*] because our compiler is GCC.
>   
>   [*] __gnuc_va_list is defined in the GCC ginclude/stdarg.h replacement
>   headerwhich we don't use.
>   
>   Revision  Changes    Path
>   1.18      +4 -1      src/sys/alpha/include/ansi.h
>   1.28      +8 -0      src/sys/i386/include/ansi.h
>   1.11      +8 -2      src/sys/ia64/include/ansi.h
>   1.10      +6 -3      src/sys/powerpc/include/ansi.h
>   1.5       +5 -2      src/sys/sparc64/include/ansi.h

-- 
Ruslan Ermilov		Oracle Developer/DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

--YZ5djTAD1cGYuMQK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=p

Index: sys/alpha/include/ansi.h
===================================================================
RCS file: /home/ncvs/src/sys/alpha/include/ansi.h,v
retrieving revision 1.18
diff -u -r1.18 ansi.h
--- sys/alpha/include/ansi.h	2001/10/18 00:27:37	1.18
+++ sys/alpha/include/ansi.h	2001/10/18 08:58:58
@@ -72,11 +72,9 @@
 #define	_BSD_OFF_T_	long			/* file offset */
 #define	_BSD_PID_T_	int			/* process [group] */
 
-#if defined __GNUC__
-#if (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 95)
+#ifdef __GNUC__
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95)
 #define	_BSD_VA_LIST_	__builtin_va_list	/* internally known to gcc */
-#endif
-typedef _BSD_VA_LIST_ __gnuc_va_list;		/* compatibility w/GNU headers*/
 #else
 typedef struct {
 	char *__base;
@@ -84,6 +82,8 @@
 	int __pad;
 } __va_list;
 #define	_BSD_VA_LIST_	__va_list		/* va_list */
+#endif
+typedef _BSD_VA_LIST_ __gnuc_va_list;		/* compatibility w/GNU headers*/
 #endif /*__GNUC__*/
 
 /*
Index: sys/i386/include/ansi.h
===================================================================
RCS file: /home/ncvs/src/sys/i386/include/ansi.h,v
retrieving revision 1.28
diff -u -r1.28 ansi.h
--- sys/i386/include/ansi.h	2001/10/18 00:27:38	1.28
+++ sys/i386/include/ansi.h	2001/10/18 08:58:59
@@ -71,13 +71,13 @@
 #define	_BSD_OFF_T_	__int64_t		/* file offset */
 #define	_BSD_PID_T_	int			/* process [group] */
 
-#if defined __GNUC__
-#if (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 95)
+#ifdef __GNUC__
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95)
 #define	_BSD_VA_LIST_	__builtin_va_list	/* internally known to gcc */
-#endif
-typedef _BSD_VA_LIST_ __gnuc_va_list;		/* compatibility w/GNU headers*/
 #else
 #define	_BSD_VA_LIST_	char *			/* va_list */
+#endif
+typedef _BSD_VA_LIST_ __gnuc_va_list;		/* compatibility w/GNU headers*/
 #endif /*__GNUC__*/
 
 /*
Index: sys/ia64/include/ansi.h
===================================================================
RCS file: /home/ncvs/src/sys/ia64/include/ansi.h,v
retrieving revision 1.11
diff -u -r1.11 ansi.h
--- sys/ia64/include/ansi.h	2001/10/18 00:27:38	1.11
+++ sys/ia64/include/ansi.h	2001/10/18 08:59:00
@@ -72,7 +72,7 @@
 #define	_BSD_OFF_T_	long			/* file offset */
 #define	_BSD_PID_T_	int			/* process [group] */
 
-#if defined __GNUC__
+#ifdef __GNUC__
 #define	_BSD_VA_LIST_	__builtin_va_list	/* internally known to gcc */
 typedef _BSD_VA_LIST_ __gnuc_va_list;		/* compatibility w/GNU headers*/
 #else
Index: sys/powerpc/include/ansi.h
===================================================================
RCS file: /home/ncvs/src/sys/powerpc/include/ansi.h,v
retrieving revision 1.10
diff -u -r1.10 ansi.h
--- sys/powerpc/include/ansi.h	2001/10/18 00:27:38	1.10
+++ sys/powerpc/include/ansi.h	2001/10/18 08:59:02
@@ -71,11 +71,9 @@
 #define	_BSD_OFF_T_	__int64_t		/* file offset */
 #define	_BSD_PID_T_	int			/* process [group] */
 
-#if defined __GNUC__
-#if (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 95)
+#ifdef __GNUC__
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95)
 #define	_BSD_VA_LIST_	__builtin_va_list	/* internally known to gcc */
-#endif
-typedef _BSD_VA_LIST_ __gnuc_va_list;		/* compatibility w/GNU headers*/
 #else
 typedef struct {
 	char __gpr;
@@ -85,6 +83,8 @@
 	char *__base;
 } __va_list;
 #define	_BSD_VA_LIST_	__va_list		/* va_list */
+#endif
+typedef _BSD_VA_LIST_ __gnuc_va_list;		/* compatibility w/GNU headers*/
 #endif /*__GNUC__*/
 
 /*
Index: sys/sparc64/include/ansi.h
===================================================================
RCS file: /home/ncvs/src/sys/sparc64/include/ansi.h,v
retrieving revision 1.5
diff -u -r1.5 ansi.h
--- sys/sparc64/include/ansi.h	2001/10/18 00:27:39	1.5
+++ sys/sparc64/include/ansi.h	2001/10/18 08:59:02
@@ -72,13 +72,13 @@
 #define	_BSD_OFF_T_	long			/* file offset */
 #define	_BSD_PID_T_	int			/* process [group] */
 
-#if defined __GNUC__
-#if (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 95)
+#ifdef __GNUC__
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95)
 #define	_BSD_VA_LIST_	__builtin_va_list	/* internally known to gcc */
-#endif
-typedef _BSD_VA_LIST_ __gnuc_va_list;		/* compatibility w/GNU headers*/
 #else
 #define	_BSD_VA_LIST_	char *			/* va_list */
+#endif
+typedef _BSD_VA_LIST_ __gnuc_va_list;		/* compatibility w/GNU headers*/
 #endif /*__GNUC__*/
 
 /*

--YZ5djTAD1cGYuMQK--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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