Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Dec 1995 11:11:18 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        chuckr@glue.umd.edu, jmacd@paris.CS.Berkeley.EDU
Cc:        freebsd-hackers@freebsd.org, freebsd-ports@freebsd.org
Subject:   Re: gcc 2.7.1
Message-ID:  <199512250011.LAA11425@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>think.  I think the only three diffs I have for 2.7.1 right now are the
>ASM_WEAKEN_LABEL removal, a change to gcc's stdarg.h so that __gnuc_va_list
>agrees with libc, and gcc's stddef.h is all messed up.  It doesn't undefine
>things like _BSD_SIZE_T_ leaves it defined but empty so that later stdlib.h
>will produce something like 'typedef      size_t' and produce annoying 
>warnings.  Perhaps it is better not to use those two files.

I have a lot more than 3.  All of these except the ones for ginclude/*
were obtained by diffing FreeBSD's version of gcc-2.6.3 with the standard
version.  The ones in freebsd.h are particularly important.  You can't
expect things to work if you use a different size for wchar_t and different
SPEC strings.  The other changes in freebsd.h aren't so important.

Bruce

diff -c2 gcc-2.7.2/Makefile.in~ gcc-2.7.2/Makefile.in
*** gcc-2.7.2/Makefile.in~	Wed Dec  6 22:00:01 1995
--- gcc-2.7.2/Makefile.in	Wed Dec  6 22:07:55 1995
***************
*** 246,250 ****
  # we use this here because that should be enough, and also
  # so that -g1 will be tested.
! LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) -g1
  
  # Additional options to use when compiling libgcc2.a.
--- 246,250 ----
  # we use this here because that should be enough, and also
  # so that -g1 will be tested.
! LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) # -g1
  
  # Additional options to use when compiling libgcc2.a.
***************
*** 747,750 ****
--- 747,751 ----
  	echo "__foo () {}" > dummy.c
  	$(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
+ 	ld -r -x dummy$(objext); mv a.out dummy$(objext)
  	$(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy$(objext)
  	rm -f dummy$(objext) dummy.c
***************
*** 778,781 ****
--- 779,783 ----
  	  if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  	  mv libgcc1$(objext) $${name}$(objext); \
+ 	  ld -r -x $${name}$(objext); mv a.out $${name}$(objext); \
  	  $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
  	  rm -f $${name}$(objext); \
***************
*** 797,800 ****
--- 799,803 ----
  	    $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
  	    if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
+ 	    ld -r -x $${name}$(objext); mv a.out $${name}$(objext); \
  	    $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
  	    if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
***************
*** 826,829 ****
--- 829,833 ----
  	  if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  	  mv libgcc1$(objext) $${name}$(objext); \
+ 	  ld -r -x $${name}$(objext); mv a.out $${name}$(objext); \
  	  $(AR) $(AR_FLAGS) tmplibgcc1.a $${name}$(objext); \
  	  rm -f $${name}$(objext); \
***************
*** 876,879 ****
--- 880,884 ----
  	      $(srcdir)/libgcc2.c -o $${name}$(objext); \
  	  if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
+ 	  ld -r -x $${name}$(objext); mv a.out $${name}$(objext); \
  	  $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
  	  rm -f $${name}$(objext); \
***************
*** 896,899 ****
--- 901,905 ----
  	    $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
  	    if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
+ 	    ld -r -x $${oname}$(objext); mv a.out $${oname}$(objext); \
  	    $(AR) $(AR_FLAGS) tmplibgcc2.a $${oname}$(objext); \
  	    rm -f $${name}.s $${oname}$(objext); \
diff -c2 gcc-2.7.2/cccp.1~ gcc-2.7.2/cccp.1
*** gcc-2.7.2/cccp.1~	Fri Jun 23 00:05:50 1995
--- gcc-2.7.2/cccp.1	Wed Dec  6 22:05:12 1995
***************
*** 1,12 ****
  .\" Copyright (c) 1991, 1992, 1993 Free Software Foundation       \-*-Text-*-
  .\" See section COPYING for conditions for redistribution
! .TH cpp 1 "30apr1993" "GNU Tools" "GNU Tools"
  .SH NAME
! cccp, cpp \- The GNU C-Compatible Compiler Preprocessor.
  .SH SYNOPSIS
  .hy 0
  .na
  .TP
! .B cccp
  .RB "[\|" \-$ "\|]"
  .RB "[\|" \-A \c
--- 1,12 ----
  .\" Copyright (c) 1991, 1992, 1993 Free Software Foundation       \-*-Text-*-
  .\" See section COPYING for conditions for redistribution
! .TH cpp 1 "April 30, 1993" "GNU Tools" "GNU Tools"
  .SH NAME
! cpp \- The GNU C-Compatible Compiler Preprocessor.
  .SH SYNOPSIS
  .hy 0
  .na
  .TP
! .B cpp
  .RB "[\|" \-$ "\|]"
  .RB "[\|" \-A \c
***************
*** 143,153 ****
  explicitly: the C compiler will do so automatically.  However, the
  preprocessor is sometimes useful individually.
- 
- When you call the preprocessor individually, either name
- (\c
- .B cpp\c
- \& or \c
- .B cccp\c
- \&) will do\(em\&they are completely synonymous.
  
  The C preprocessor expects two file names as arguments, \c
--- 143,146 ----
diff -c2 gcc-2.7.2/cccp.c~ gcc-2.7.2/cccp.c
*** gcc-2.7.2/cccp.c~	Wed Dec  6 21:53:37 1995
--- gcc-2.7.2/cccp.c	Wed Dec  6 22:05:13 1995
***************
*** 4924,4927 ****
--- 4924,4928 ----
    char *p, *dir;
  
+ #if 0
    if (searchptr && ! searchptr->got_name_map)
      {
***************
*** 4946,4949 ****
--- 4947,4951 ----
  	}
      }
+ #endif
  
    /* Try to find a mapping file for the particular directory we are
***************
*** 4982,4988 ****
--- 4984,4992 ----
        from = p + 1;
      }
+ #if 0
    for (map = read_name_map (dir); map; map = map->map_next)
      if (! strcmp (map->map_from, from))
        return open (map->map_to, O_RDONLY, 0666);
+ #endif
  
    return open (filename, O_RDONLY, 0666);
diff -c2 gcc-2.7.2/config/i386/freebsd.h~ gcc-2.7.2/config/i386/freebsd.h
*** gcc-2.7.2/config/i386/freebsd.h~	Thu Jun 15 23:44:56 1995
--- gcc-2.7.2/config/i386/freebsd.h	Wed Dec  6 22:05:13 1995
***************
*** 21,27 ****
  Boston, MA 02111-1307, USA.  */
  
- /* This goes away when the math-emulator is fixed */
- #define TARGET_CPU_DEFAULT 0400		/* TARGET_NO_FANCY_MATH_387 */
- 
  /* This is tested by i386gas.h.  */
  #define YES_UNDERSCORES
--- 21,24 ----
***************
*** 34,44 ****
  /* Get perform_* macros to build libgcc.a.  */
  #include "i386/perform.h"
  
  #undef CPP_PREDEFINES
! #define CPP_PREDEFINES "-Dunix -Di386 -D__FreeBSD__ -D__386BSD__ -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
  
  /* Like the default, except no -lg.  */
  #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
  
  #undef SIZE_TYPE
  #define SIZE_TYPE "unsigned int"
--- 31,92 ----
  /* Get perform_* macros to build libgcc.a.  */
  #include "i386/perform.h"
+ 
+ /* This is cloned from ../netbsd.h.  It and several other things in
+    this file should be in ../freebsd.h.  */
+ /* FREEBSD_NATIVE is defined when gcc is integrated into the FreeBSD
+    source tree so it can be configured appropriately without using
+    the GNU configure/build mechanism. */
+ 
+ #ifdef FREEBSD_NATIVE
+ 
+ /* Look for the include files in the system-defined places.  */
+ 
+ #undef GPLUSPLUS_INCLUDE_DIR
+ #define GPLUSPLUS_INCLUDE_DIR		"/usr/include/g++"
+ 
+ #undef GCC_INCLUDE_DIR
+ #define GCC_INCLUDE_DIR			"/usr/include"
+ 
+ /* FreeBSD has GCC_INCLUDE_DIR first.  */
+ #undef INCLUDE_DEFAULTS
+ #define INCLUDE_DEFAULTS		\
+   {					\
+     { GCC_INCLUDE_DIR, 0, 0 },		\
+     { GPLUSPLUS_INCLUDE_DIR, 1, 1 },	\
+     { 0, 0, 0 }				\
+   }
+ 
+ /* Under FreeBSD, the normal location of the compiler back ends is the
+    /usr/libexec directory.  */
+ 
+ #undef STANDARD_EXEC_PREFIX
+ #define STANDARD_EXEC_PREFIX		"/usr/libexec/"
+ 
+ /* Under FreeBSD, the normal location of the various *crt*.o files is the
+    /usr/lib directory.  */
+ 
+ #undef STANDARD_STARTFILE_PREFIX
+ #define STANDARD_STARTFILE_PREFIX	"/usr/lib/"
  
+ #endif /* FREEBSD_NATIVE */
+ 
  #undef CPP_PREDEFINES
! #define CPP_PREDEFINES "-Dunix -Di386 -D__FreeBSD__=2 -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
! 
! #define ASM_SPEC   " %| %{fpic:-k} %{fPIC:-k}"
  
  /* Like the default, except no -lg.  */
  #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
  
+ #define LINK_SPEC \
+   "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} %{assert*} \
+    %{p:-Bstatic} %{pg:-Bstatic} %{Z}"
+ 
+ #define LINK_LIBGCC_SPECIAL_1	1
+ 
+ /* This goes away when the math emulator is fixed.  */
+ #undef TARGET_DEFAULT
+ #define TARGET_DEFAULT	(MASK_NO_FANCY_MATH_387 | 0301)
+ 
  #undef SIZE_TYPE
  #define SIZE_TYPE "unsigned int"
***************
*** 48,64 ****
  
  #undef WCHAR_TYPE
! #define WCHAR_TYPE "short unsigned int"
  
! #define WCHAR_UNSIGNED 1
  
  #undef WCHAR_TYPE_SIZE
! #define WCHAR_TYPE_SIZE 16
  
  #define HAVE_ATEXIT
  
! /* There are conflicting reports about whether this system uses
!    a different assembler syntax.  wilson@cygnus.com says # is right.  */
! #undef COMMENT_BEGIN
! #define COMMENT_BEGIN "#"
  
  #undef ASM_APP_ON
--- 96,112 ----
  
  #undef WCHAR_TYPE
! #define WCHAR_TYPE "int"
  
! #define WCHAR_UNSIGNED 0
  
  #undef WCHAR_TYPE_SIZE
! #define WCHAR_TYPE_SIZE BITS_PER_WORD
  
  #define HAVE_ATEXIT
  
! /* Override the default comment-starter of "/".  */
! 
! #undef ASM_COMMENT_START
! #define ASM_COMMENT_START "#"
  
  #undef ASM_APP_ON
***************
*** 87,110 ****
     we want to retain compatibility with older gcc versions.  */
  #define DEFAULT_PCC_STRUCT_RETURN 0
- 
- /* Profiling routines, partially copied from i386/osfrose.h.  */
  
! /* Redefine this to use %eax instead of %edx.  */
  #undef FUNCTION_PROFILER
  #define FUNCTION_PROFILER(FILE, LABELNO)  \
  {									\
    if (flag_pic)								\
!     {									\
!       fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%eax\n",		\
! 	       LPREFIX, (LABELNO));					\
!       fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n");			\
!     }									\
    else									\
!     {									\
!       fprintf (FILE, "\tmovl $%sP%d,%%eax\n", LPREFIX, (LABELNO));	\
!       fprintf (FILE, "\tcall mcount\n");				\
!     }									\
  }
  
  /*
   * Some imports from svr4.h in support of shared libraries.
--- 135,164 ----
     we want to retain compatibility with older gcc versions.  */
  #define DEFAULT_PCC_STRUCT_RETURN 0
  
! /* Tell final.c that we don't need a label passed to mcount.  */
! 
! #define NO_PROFILE_DATA
! 
! /* Redefine this to not pass an unused label in %edx.  */
! 
  #undef FUNCTION_PROFILER
  #define FUNCTION_PROFILER(FILE, LABELNO)  \
  {									\
    if (flag_pic)								\
!     fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n");			\
    else									\
!     fprintf (FILE, "\tcall mcount\n");					\
  }
  
+ #if 0 /* not ready for this; it should be decided at compile time */
+ #define FUNCTION_PROFILER_EPILOGUE(FILE)  \
+ {									\
+   if (flag_pic)								\
+     fprintf (FILE, "\tcall *mexitcount@GOT(%%ebx)\n");			\
+   else									\
+     fprintf (FILE, "\tcall mexitcount\n");				\
+ }
+ #endif
+ 
  /*
   * Some imports from svr4.h in support of shared libraries.
***************
*** 112,115 ****
--- 166,171 ----
   */
  
+ #define HANDLE_SYSV_PRAGMA
+ 
  /* Define the strings used for the special svr4 .type and .size directives.
     These strings generally do not vary from one system running svr4 to
***************
*** 120,129 ****
--- 176,188 ----
  #define TYPE_ASM_OP	".type"
  #define SIZE_ASM_OP	".size"
+ #define SET_ASM_OP	".set"
  
  /* This is how we tell the assembler that a symbol is weak.  */
  
+ #if 0 /* not ready for this */
  #define ASM_WEAKEN_LABEL(FILE,NAME) \
    do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
         fputc ('\n', FILE); } while (0)
+ #endif
  
  /* The following macro defines the format used to output the second
***************
*** 224,256 ****
        }									\
    } while (0)
- 
- #define ASM_SPEC   " %| %{fpic:-k} %{fPIC:-k}"
- #define LINK_SPEC \
-   "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} %{assert*}"
- 
- /* This is defined when gcc is compiled in the BSD-directory-tree, and must
-  * make up for the gap to all the stuff done in the GNU-makefiles.
-  */
- 
- #ifdef FREEBSD_NATIVE
- 
- #define INCLUDE_DEFAULTS { \
- 	{ "/usr/include", 0 }, \
- 	{ "/usr/include/g++", 1 }, \
- 	{ 0, 0} \
- 	}
- 
- #undef MD_EXEC_PREFIX
- #define MD_EXEC_PREFIX "/usr/libexec/"
- 
- #undef STANDARD_STARTFILE_PREFIX
- #define STANDARD_STARTFILE_PREFIX "/usr/lib"
- 
- #if 0 /* This is very wrong!!! */
- #define DEFAULT_TARGET_MACHINE "i386-unknown-freebsd_1.0"
- #define GPLUSPLUS_INCLUDE_DIR "/usr/local/lib/gcc-lib/i386-unknown-freebsd_1.0/2.5.8/include"
- #define TOOL_INCLUDE_DIR "/usr/local/i386-unknown-freebsd_1.0/include"
- #define GCC_INCLUDE_DIR "/usr/local/lib/gcc-lib/i386-unknown-freebsd_1.0/2.5.8/include"
- #endif
- 
- #endif /* FREEBSD_NATIVE */
--- 283,284 ----
diff -c2 gcc-2.7.2/config/i386/i386.c~ gcc-2.7.2/config/i386/i386.c
*** gcc-2.7.2/config/i386/i386.c~	Wed Dec  6 21:53:47 1995
--- gcc-2.7.2/config/i386/i386.c	Wed Dec  6 22:05:14 1995
***************
*** 1461,1465 ****
    rtx xops[4];
    int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
! 				  || current_function_uses_const_pool);
  
    xops[0] = stack_pointer_rtx;
--- 1461,1466 ----
    rtx xops[4];
    int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
! 				  || current_function_uses_const_pool
! 				  || profile_flag || profile_block_flag);
  
    xops[0] = stack_pointer_rtx;
***************
*** 1522,1527 ****
    int reglimit = (frame_pointer_needed
  		  ? FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM);
!   int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
! 				  || current_function_uses_const_pool);
  
  #ifdef NON_SAVING_SETJMP
--- 1523,1536 ----
    int reglimit = (frame_pointer_needed
  		  ? FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM);
! 
! #ifdef FUNCTION_PROFILER_EPILOGUE
!   if (profile_flag)
!     return 0;
! #endif
! 
!   if (flag_pic && (current_function_uses_pic_offset_table
! 		   || current_function_uses_const_pool
! 		   || profile_flag || profile_block_flag))
!     return 0;
  
  #ifdef NON_SAVING_SETJMP
***************
*** 1534,1539 ****
  
    for (regno = reglimit - 1; regno >= 0; regno--)
!     if ((regs_ever_live[regno] && ! call_used_regs[regno])
! 	|| (regno == PIC_OFFSET_TABLE_REGNUM && pic_reg_used))
        nregs++;
  
--- 1543,1547 ----
  
    for (regno = reglimit - 1; regno >= 0; regno--)
!     if (regs_ever_live[regno] && ! call_used_regs[regno])
        nregs++;
  
***************
*** 1557,1560 ****
--- 1565,1573 ----
    int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
  				  || current_function_uses_const_pool);
+ 
+ #ifdef FUNCTION_PROFILER_EPILOGUE
+   if (profile_flag)
+     FUNCTION_PROFILER_EPILOGUE (file);
+ #endif
  
    /* Compute the number of registers to pop */
diff -c2 gcc-2.7.2/config/i386/unix.h~ gcc-2.7.2/config/i386/unix.h
*** gcc-2.7.2/config/i386/unix.h~	Thu Jun 15 23:54:19 1995
--- gcc-2.7.2/config/i386/unix.h	Wed Dec  6 22:05:14 1995
***************
*** 100,104 ****
  
  #define ASM_COMMENT_START "/"
- #define COMMENT_BEGIN "/"
  
  /* Output to assembler file text saying following lines
--- 100,103 ----
diff -c2 gcc-2.7.2/config/xm-freebsd.h~ gcc-2.7.2/config/xm-freebsd.h
*** gcc-2.7.2/config/xm-freebsd.h~	Thu Jun 15 22:53:32 1995
--- gcc-2.7.2/config/xm-freebsd.h	Wed Dec  6 22:05:14 1995
***************
*** 24,27 ****
--- 24,30 ----
     CPU/xm-CPU.h and this file xm-freebsd.h.  */
     
+ /* FreeBSD has putenv.  */
+ #define HAVE_PUTENV
+ 
  /* FreeBSD has strerror.  */
  #define HAVE_STRERROR
diff -c2 gcc-2.7.2/cp/g++.c~ gcc-2.7.2/cp/g++.c
*** gcc-2.7.2/cp/g++.c~	Wed Dec  6 22:00:07 1995
--- gcc-2.7.2/cp/g++.c	Wed Dec  6 22:05:14 1995
***************
*** 416,420 ****
  
    if (argc == 1)
!     fatal ("No input files specified.\n");
  
  #ifndef __MSDOS__
--- 416,420 ----
  
    if (argc == 1)
!     fatal ("No input files specified");
  
  #ifndef __MSDOS__
diff -c2 gcc-2.7.2/final.c~ gcc-2.7.2/final.c
*** gcc-2.7.2/final.c~	Wed Dec  6 22:00:10 1995
--- gcc-2.7.2/final.c	Wed Dec  6 22:05:15 1995
***************
*** 342,345 ****
--- 342,347 ----
        ASM_OUTPUT_ALIGN (asm_out_file, align);
  
+       fprintf(asm_out_file,".stabs \"bbset\", 25, 0, 0, LPBX0\n");
+ 
        ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "LPBX", 0);
        /* zero word */
***************
*** 915,918 ****
--- 917,923 ----
  #endif
  
+   if (profile_block_flag)
+     add_bb (file);
+ 
    /* The Sun386i and perhaps other machines don't work right
       if the profiling code comes after the prologue.  */
***************
*** 972,983 ****
--- 977,992 ----
       FILE *file;
  {
+ #ifndef NO_PROFILE_DATA
    int align = MIN (BIGGEST_ALIGNMENT, POINTER_SIZE);
+ #endif /* not NO_PROFILE_DATA */
    int sval = current_function_returns_struct;
    int cxt = current_function_needs_context;
  
+ #ifndef NO_PROFILE_DATA
    data_section ();
    ASM_OUTPUT_ALIGN (file, floor_log2 (align / BITS_PER_UNIT));
    ASM_OUTPUT_INTERNAL_LABEL (file, "LP", profile_label_no);
    assemble_integer (const0_rtx, POINTER_SIZE / BITS_PER_UNIT, 1);
+ #endif /* not NO_PROFILE_DATA */
  
    text_section ();
***************
*** 1066,1069 ****
--- 1075,1081 ----
    FUNCTION_EPILOGUE (file, get_frame_size ());
  #endif
+ 
+   if (profile_block_flag)
+     add_bb (file);
  
  #ifdef SDB_DEBUGGING_INFO
diff -c2 gcc-2.7.2/gcc.c~ gcc-2.7.2/gcc.c
*** gcc-2.7.2/gcc.c~	Wed Dec  6 21:54:41 1995
--- gcc-2.7.2/gcc.c	Wed Dec  6 22:05:15 1995
***************
*** 33,36 ****
--- 33,37 ----
  
  #include <sys/types.h>
+ #include <sys/wait.h>
  #include <ctype.h>
  #include <signal.h>
***************
*** 54,57 ****
--- 55,61 ----
  #endif
  #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <string.h>
  
  /* Include multi-lib information.  */
***************
*** 1621,1625 ****
    int num_envs = 0;
    int name_len = 1;
-   int str_len = strlen (str);
    char *p = str;
    int ch;
--- 1625,1628 ----
***************
*** 2704,2707 ****
--- 2707,2714 ----
    /* Use 2 as fourth arg meaning try just the machine as a suffix,
       as well as trying the machine and the version.  */
+ #ifdef FREEBSD_NATIVE
+   add_prefix (&exec_prefixes, "/usr/libexec/", 0, 0, NULL_PTR);
+   add_prefix (&exec_prefixes, "/usr/bin/", 0, 0, NULL_PTR);
+ #else /* not FREEBSD_NATIVE */
  #ifndef OS2
    add_prefix (&exec_prefixes, standard_exec_prefix, 0, 2, NULL_PTR);
***************
*** 2711,2714 ****
--- 2718,2722 ----
    add_prefix (&startfile_prefixes, standard_exec_prefix, 0, 1, NULL_PTR);
    add_prefix (&startfile_prefixes, standard_exec_prefix_1, 0, 1, NULL_PTR);
+ #endif /* FREEBSD_NATIVE */
  
    tooldir_prefix = concat3 (tooldir_base_prefix, spec_machine, 
***************
*** 2745,2748 ****
--- 2753,2757 ----
      }
  
+ #ifndef FREEBSD_NATIVE
    add_prefix (&exec_prefixes, 
                concat3 (tooldir_prefix, "bin", dir_separator_str),
***************
*** 2751,2754 ****
--- 2760,2764 ----
  	      concat3 (tooldir_prefix, "lib", dir_separator_str),
  	      0, 0, NULL_PTR);
+ #endif /* FREEBSD_NATIVE */
  
    /* More prefixes are enabled in main, after we read the specs file
***************
*** 3771,3775 ****
  	      int c1 = *p++;  /* Select first or second version number.  */
  	      char *v = compiler_version;
! 	      char *q, *copy;
  	      /* If desired, advance to second version number.  */
  	      if (c1 == '2')
--- 3781,3785 ----
  	      int c1 = *p++;  /* Select first or second version number.  */
  	      char *v = compiler_version;
! 	      char *q;
  	      /* If desired, advance to second version number.  */
  	      if (c1 == '2')
***************
*** 4267,4273 ****
--- 4277,4285 ----
    /* Read specs from a file if there is one.  */
  
+ #ifndef FREEBSD_NATIVE
    machine_suffix = concat4 (spec_machine, dir_separator_str,
                              spec_version, dir_separator_str);
    just_machine_suffix = concat (spec_machine, dir_separator_str);
+ #endif
  
    specs_file = find_a_file (&startfile_prefixes, "specs", R_OK);
***************
*** 4317,4320 ****
--- 4329,4333 ----
  	}		       
  
+ #ifndef FREEBSD_NATIVE
        add_prefix (&startfile_prefixes, standard_startfile_prefix_1, 0, 0,
  		  NULL_PTR);
***************
*** 4324,4327 ****
--- 4337,4342 ----
        add_prefix (&startfile_prefixes, "./", 0, 1, NULL_PTR);
  #endif
+ #endif /* FREEBSD_NATIVE */
+ 
      }
    else
***************
*** 4414,4418 ****
  
    if (n_infiles == 0)
!     fatal ("No input files");
  
    /* Make a place to record the compiler output file names
--- 4429,4433 ----
  
    if (n_infiles == 0)
!     fatal ("No input files specified");
  
    /* Make a place to record the compiler output file names
diff -c2 gcc-2.7.2/ginclude/stdarg.h~ gcc-2.7.2/ginclude/stdarg.h
*** gcc-2.7.2/ginclude/stdarg.h~	Wed Dec  6 21:54:43 1995
--- gcc-2.7.2/ginclude/stdarg.h	Wed Dec  6 22:05:16 1995
***************
*** 44,47 ****
--- 44,56 ----
  
  /* Define __gnuc_va_list.  */
+ #if defined (__FreeBSD__)
+ /* This is the correct way to handle all BSD NET2 and BSD 4.4 systems.  */
+ #include <machine/ansi.h>
+ #ifdef _BSD_VA_LIST_
+ typedef _BSD_VA_LIST_ __gnuc_va_list;
+ #else
+ typedef _VA_LIST_ __gnuc_va_list;
+ #endif
+ #else
  
  #ifndef __GNUC_VA_LIST
***************
*** 53,56 ****
--- 62,66 ----
  #endif
  #endif
+ #endif
  
  /* Define the standard macros for the user,
***************
*** 117,122 ****
--- 127,137 ----
  #endif
  
+ #if 0
+ /* BSD 4.4 actually spells the name _BSD_VA_LIST_ and requires it to be
+  * defined and usable in place of va_list when the latter name is not
+  * allowed (e.g., in stdio.h - see above).  */
  #ifdef _BSD_VA_LIST
  #undef _BSD_VA_LIST
+ #endif
  #endif
  
diff -c2 gcc-2.7.2/ginclude/varargs.h~ gcc-2.7.2/ginclude/varargs.h
*** gcc-2.7.2/ginclude/varargs.h~	Wed Dec  6 21:54:44 1995
--- gcc-2.7.2/ginclude/varargs.h	Wed Dec  6 22:05:16 1995
***************
*** 79,82 ****
--- 79,91 ----
  #ifndef __GNUC_VA_LIST
  #define __GNUC_VA_LIST
+ #if defined (__FreeBSD__)
+ /* This is the correct way to handle all BSD NET2 and BSD 4.4 systems.  */
+ #include <machine/ansi.h>
+ #ifdef _BSD_VA_LIST_
+ typedef _BSD_VA_LIST_ __gnuc_va_list;
+ #else
+ typedef _VA_LIST_ __gnuc_va_list;
+ #endif
+ #else
  #if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX)
  typedef char *__gnuc_va_list;
***************
*** 85,88 ****
--- 94,98 ----
  #endif
  #endif
+ #endif
  
  #define va_start(AP)  AP=(char *) &__builtin_va_alist
***************
*** 186,190 ****
--- 196,205 ----
  /* The next BSD release (if there is one) wants this symbol to be
     undefined instead of _VA_LIST_.  */
+ #if 0
+ /* BSD 4.4 actually spells the name _BSD_VA_LIST_ and requires it to be
+  * defined and usable in place of va_list when the latter name is not
+  * allowed (e.g., in stdio.h - see ginclude/stdarg.h).  */
  #ifdef _BSD_VA_LIST
  #undef _BSD_VA_LIST
+ #endif
  #endif



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