*BSD News Article 1885


Return to BSD News archive

Path: sserve!manuel!munnari.oz.au!spool.mu.edu!nigel.msen.com!ilium!boozsh!block
From: block@gmf.eds.com (W. Jon Block)
Newsgroups: comp.unix.bsd
Subject: gcc-2.2.2 patches for BSD/386
Message-ID: <1992Jul12.194906.18145@gmf.eds.com>
Date: 12 Jul 92 19:49:06 GMT
Article-I.D.: gmf.1992Jul12.194906.18145
Organization: GMFanuc Robotics Corp.
Lines: 264

These patches should allow you to cleanly build gcc-2.2.2 on BSDI's
BSD/386, and probably on 386/BSD. 
-----------------------------cut here------------------------------
diff -c gcc/configure:1.1 gcc/configure:1.2
*** gcc/configure:1.1	Sat Jul 11 15:11:30 1992
--- gcc/configure	Sat Jul 11 15:11:31 1992
***************
*** 240,248 ****
  			tm_file=seq386.h
  		fi
  		;;
! 	i386-*-bsd*)
  		xm_file=xm-i386.h
  		tm_file=i386bsd.h
  		tmake_file=t-libc-ok
  		use_collect2=yes
  		;;
--- 240,254 ----
  			tm_file=seq386.h
  		fi
  		;;
! 	i386-*-bsd)
  		xm_file=xm-i386.h
  		tm_file=i386bsd.h
+ 		tmake_file=t-libc-ok
+ 		use_collect2=yes
+ 		;;
+ 	i386-*-bsdi)
+ 		xm_file=xm-i386.h
+ 		tm_file=i386bsdi.h
  		tmake_file=t-libc-ok
  		use_collect2=yes
  		;;
diff -c gcc/gstdarg.h:1.1 gcc/gstdarg.h:1.2
*** gcc/gstdarg.h:1.1	Sat Jul 11 15:11:32 1992
--- gcc/gstdarg.h	Sat Jul 11 15:11:33 1992
***************
*** 34,43 ****
  #endif
  
  /* The macro _VA_LIST_ is the same thing used by this file in Ultrix.  */
! #ifndef _VA_LIST_
  /* The macro _VA_LIST is used in SCO Unix 3.2.  */
  #ifndef _VA_LIST
  #define _VA_LIST_
  #define _VA_LIST
  #ifndef __svr4__
  typedef char *va_list;
--- 34,45 ----
  #endif
  
  /* The macro _VA_LIST_ is the same thing used by this file in Ultrix.  */
! #if !defined (_VA_LIST_) || defined (_ANSI_H) || defined (_ANSI_H_)
  /* The macro _VA_LIST is used in SCO Unix 3.2.  */
  #ifndef _VA_LIST
+ #ifndef _VA_LIST_
  #define _VA_LIST_
+ #endif
  #define _VA_LIST
  #ifndef __svr4__
  typedef char *va_list;
diff -c gcc/gstddef.h:1.1 gcc/gstddef.h:1.2
*** gcc/gstddef.h:1.1	Sat Jul 11 15:11:34 1992
--- gcc/gstddef.h	Sat Jul 11 15:11:35 1992
***************
*** 26,32 ****
  #ifndef _T_PTRDIFF_
  #ifndef _T_PTRDIFF
  #ifndef __PTRDIFF_T
! #ifndef _PTRDIFF_T_
  #ifndef ___int_ptrdiff_t_h
  #ifndef _GCC_PTRDIFF_T
  #define _PTRDIFF_T
--- 26,32 ----
  #ifndef _T_PTRDIFF_
  #ifndef _T_PTRDIFF
  #ifndef __PTRDIFF_T
! #if !defined (_PTRDIFF_T_) || defined(_ANSI_H_)
  #ifndef ___int_ptrdiff_t_h
  #ifndef _GCC_PTRDIFF_T
  #define _PTRDIFF_T
***************
*** 33,39 ****
--- 33,41 ----
  #define _T_PTRDIFF_
  #define _T_PTRDIFF
  #define __PTRDIFF_T
+ #ifndef _PTRDIFF_T_
  #define _PTRDIFF_T_
+ #endif
  #define ___int_ptrdiff_t_h
  #define _GCC_PTRDIFF_T
  #ifndef __PTRDIFF_TYPE__
***************
*** 79,85 ****
--- 81,89 ----
  /* Define this type if we are doing the whole job,
     or if we want this type in particular.  */
  #if defined (_STDDEF_H) || defined (__need_size_t)
+ #if !defined (_ANSI_H) && !defined (_ANSI_H_)
  typedef __SIZE_TYPE__ size_t;
+ #endif
  #endif /* <stddef.h> or __need_size_t.  */
  #endif /* _SIZET_ */
  #endif /* _GCC_SIZE_T */
***************
*** 101,107 ****
  #ifndef _T_WCHAR_
  #ifndef _T_WCHAR
  #ifndef __WCHAR_T
! #ifndef _WCHAR_T_
  #ifndef ___int_wchar_t_h
  #ifndef _GCC_WCHAR_T
  #define _WCHAR_T
--- 105,111 ----
  #ifndef _T_WCHAR_
  #ifndef _T_WCHAR
  #ifndef __WCHAR_T
! #if !defined (_WCHAR_T_) || defined (_ANSI_H_)
  #ifndef ___int_wchar_t_h
  #ifndef _GCC_WCHAR_T
  #define _WCHAR_T
***************
*** 108,114 ****
--- 112,120 ----
  #define _T_WCHAR_
  #define _T_WCHAR
  #define __WCHAR_T
+ #ifndef _WCHAR_T_
  #define _WCHAR_T_
+ #endif
  #define ___int_wchar_t_h
  #define _GCC_WCHAR_T
  #ifndef __WCHAR_TYPE__
diff -c gcc/gvarargs.h:1.1 gcc/gvarargs.h:1.2
*** gcc/gvarargs.h:1.1	Sat Jul 11 15:11:36 1992
--- gcc/gvarargs.h	Sat Jul 11 15:11:36 1992
***************
*** 67,73 ****
  
  /* The macro _VA_LIST_ is the same thing used by this file in Ultrix.  */
  /* But in 4.3bsd-net2, _VA_LIST_ has another meaning.  So ignore it.  */
! #if !defined (_VA_LIST_) || defined (_ANSI_H)
  /* The macro _VA_LIST is used in SCO Unix 3.2.  */
  #ifndef _VA_LIST
  #ifndef _VA_LIST_
--- 67,73 ----
  
  /* The macro _VA_LIST_ is the same thing used by this file in Ultrix.  */
  /* But in 4.3bsd-net2, _VA_LIST_ has another meaning.  So ignore it.  */
! #if !defined (_VA_LIST_) || defined (_ANSI_H) || defined (_ANSI_H_)
  /* The macro _VA_LIST is used in SCO Unix 3.2.  */
  #ifndef _VA_LIST
  #ifndef _VA_LIST_
***************
*** 83,89 ****
  /*  In 4.3bsd-net2, it is said we must #undef this.
      I hope this successfully identifies that system.
      I don't know why this works--rms.  */
! #ifdef _ANSI_H
  #undef _VA_LIST_
  #endif
  
--- 83,89 ----
  /*  In 4.3bsd-net2, it is said we must #undef this.
      I hope this successfully identifies that system.
      I don't know why this works--rms.  */
! #if defined (_ANSI_H) || defined (_ANSI_H_)
  #undef _VA_LIST_
  #endif
  
diff -c gcc/config/i386.md:1.1 gcc/config/i386.md:1.3
*** gcc/config/i386.md:1.1	Sat Jul 11 15:11:43 1992
--- gcc/config/i386.md	Sat Jul 11 15:11:45 1992
***************
*** 3879,3885 ****
    label = gen_label_rtx ();
  
    output_asm_insn (AS2 (xor%B0,%0,%0), operands);
!   output_asm_insn (\"repz\;cmps%B2\", operands);
    output_asm_insn (\"je %l0\", &label);
  
    xops[0] = operands[0];
--- 3879,3885 ----
    label = gen_label_rtx ();
  
    output_asm_insn (AS2 (xor%B0,%0,%0), operands);
!   output_asm_insn (\"repe\;cmps%B2\", operands);
    output_asm_insn (\"je %l0\", &label);
  
    xops[0] = operands[0];
***************
*** 3912,3918 ****
    xops[1] = CONST0_RTX (QImode);
  
    output_asm_insn (AS2 (test%B0,%1,%0), xops);
!   return \"repz\;cmps%B2\";
  }")
  
  (define_expand "ffssi2"
--- 3912,3918 ----
    xops[1] = CONST0_RTX (QImode);
  
    output_asm_insn (AS2 (test%B0,%1,%0), xops);
!   return \"repe\;cmps%B2\";
  }")
  
  (define_expand "ffssi2"
***************
*** 4073,4079 ****
    xops[0] = operands[0];
    xops[1] = constm1_rtx;
    output_asm_insn (AS2 (mov%L0,%1,%0), xops);
!   return \"repnz\;scas%B2\";
  }")
  
  ;;- Local variables:
--- 4073,4079 ----
    xops[0] = operands[0];
    xops[1] = constm1_rtx;
    output_asm_insn (AS2 (mov%L0,%1,%0), xops);
!   return \"repne\;scas%B2\";
  }")
  
  ;;- Local variables:
diff -c /dev/null gcc/config/i386bsdi.h:1.2
*** /dev/null	Sat Jul 11 15:11:46 1992
--- gcc/config/i386bsdi.h	Sat Jul 11 15:11:47 1992
***************
*** 0 ****
--- 1,23 ----
+ /* Configuration for an i386 running 386BSD as the target machine.  */
+ #include "i386mach.h"
+ 
+ #undef CPP_PREDEFINES
+ #define CPP_PREDEFINES "-Dunix -Di386 -Dbsdi -DBSDI"
+ 
+ /* Specify extra dir to search for include files.  */
+ #undef SYSTEM_INCLUDE_DIR
+ 
+ /* Don't allow / as a comment character */
+ #undef COMMENT_BEGIN
+ #define COMMENT_BEGIN "#"
+ 
+ /* Set APP codes for bsdi gas configuration */
+ #undef ASM_APP_ON
+ #define ASM_APP_ON "#APP\n"
+ 
+ #undef ASM_APP_OFF
+ #define ASM_APP_OFF "#NO_APP\n"
+ 
+ /* Don't look for libg.a */
+ #undef LIB_SPEC
+ #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Jon Block                         mail:  block@gmf.eds.com
GMFanuc Robotics                  uucp:  uunet!edsews!boozsh!block
2000 South Adams Road            Voice:  313-377-7545
Auburn Hills, MI  48326-2800       FAX:  313-377-7477
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Jon Block                     Internet:  block@gmf.eds.com
GMFanuc Robotics                  uucp:  uunet!edsews!boozsh!block
2000 South Adams Road            Voice:  313-377-7545