From kargl@troutmask.apl.washington.edu  Sun May 26 19:41:06 2002
Return-Path: <kargl@troutmask.apl.washington.edu>
Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105])
	by hub.freebsd.org (Postfix) with ESMTP
	id 0F8D537B40B; Sun, 26 May 2002 19:41:06 -0700 (PDT)
Received: from troutmask.apl.washington.edu (localhost [127.0.0.1])
	by troutmask.apl.washington.edu (8.12.3/8.12.3) with ESMTP id g4R2f59Q036333;
	Sun, 26 May 2002 19:41:05 -0700 (PDT)
	(envelope-from kargl@troutmask.apl.washington.edu)
Received: (from kargl@localhost)
	by troutmask.apl.washington.edu (8.12.3/8.12.3/Submit) id g4R2f5YN036332;
	Sun, 26 May 2002 19:41:05 -0700 (PDT)
Message-Id: <200205270241.g4R2f5YN036332@troutmask.apl.washington.edu>
Date: Sun, 26 May 2002 19:41:05 -0700 (PDT)
From: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
Reply-To: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
To: FreeBSD-gnats-submit@freebsd.org
Cc: obrien@freebsd.org
Subject: Fortan program don't link post gcc-3.1
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         38594
>Category:       gnu
>Synopsis:       Fortan program don't link post gcc-3.1
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kan
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 26 19:50:03 PDT 2002
>Closed-Date:    Tue Jul 10 15:48:28 GMT 2007
>Last-Modified:  Tue Jul 10 15:48:28 GMT 2007
>Originator:     Steven G. Kargl
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
apl/uw
>Environment:
System: FreeBSD troutmask.apl.washington.edu 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed May 1 16:49:56 PDT 2002 kargl@troutmask.apl.washington.edu:/usr/obj/usr/src/sys/TROUTMASK i386

>Description:

Fortran programs don't link after the gcc-3.1 due to a missing
libfrtbegin.a.  libF77/main.o was split out into libfrtbegin in
gcc-3.1 and a dependence was built into g77 (via g77spec.c) to 
unconditionally link libfrtbegin into all Fortran programs.

>How-To-Repeat:

Try to compile a Fortran program.  For example,

      program hello
      print*, 'Hello World!'
      end
	
>Fix:

The following patch creates libfrtbegin.  The file
libg2c/MAIN.c should be repo-copied to gnu/libfrtbegin.


diff -urNb gnu/lib.old/Makefile gnu/lib/Makefile
--- gnu/lib.old/Makefile	Wed May 15 09:29:45 2002
+++ gnu/lib/Makefile	Sun May 26 14:44:23 2002
@@ -19,7 +19,7 @@
 .endif
 
 .if !defined(NO_FORTRAN)
-SUBDIR+= libg2c
+SUBDIR+= libfrtbegin libg2c
 .endif
 
 .include <bsd.subdir.mk>
diff -urNb gnu/lib.old/libfrtbegin/MAIN.c gnu/lib/libfrtbegin/MAIN.c
--- gnu/lib.old/libfrtbegin/MAIN.c	Wed Dec 31 16:00:00 1969
+++ gnu/lib/libfrtbegin/MAIN.c	Sun May 26 14:44:40 2002
@@ -0,0 +1,4 @@
+/* $FreeBSD: src/gnu/lib/libg2c/MAIN.c,v 1.2 2000/10/31 11:36:33 obrien Exp $ */
+
+int
+MAIN__(){ return 0; }
diff -urNb gnu/lib.old/libfrtbegin/Makefile gnu/lib/libfrtbegin/Makefile
--- gnu/lib.old/libfrtbegin/Makefile	Wed Dec 31 16:00:00 1969
+++ gnu/lib/libfrtbegin/Makefile	Sun May 26 14:47:02 2002
@@ -0,0 +1,16 @@
+# $FreeBSD: src/gnu/lib/libg2c/Makefile,v 1.9 2002/05/12 16:00:46 ru Exp $
+
+SRCDIR=	${.CURDIR}/../../../contrib/libf2c
+
+.PATH: ${SRCDIR} ${SRCDIR}/libF77
+
+LIB=		frtbegin
+SHLIB_MAJOR=	1
+SHLIB_MINOR=	0
+
+SRCS=		main.c MAIN.c
+
+CFLAGS+=	-I${SRCDIR} -I${SRCDIR}/libF77
+CFLAGS+=	-I${.CURDIR}
+
+.include <bsd.lib.mk>
diff -urNb gnu/lib.old/libg2c/Makefile gnu/lib/libg2c/Makefile
--- gnu/lib.old/libg2c/Makefile	Sun May 12 09:00:46 2002
+++ gnu/lib/libg2c/Makefile	Sun May 26 14:49:59 2002
@@ -10,7 +10,7 @@
 
 # Traditional FORTRAN Library members defined in libF77
 
-F77MISC=	F77_aloc.c main.c s_rnge.c abort_.c getarg_.c \
+F77MISC=	F77_aloc.c s_rnge.c abort_.c getarg_.c \
 		iargc_.c getenv_.c signal_.c s_stop.c s_paus.c system_.c \
 		cabs.c derf_.c derfc_.c erf_.c erfc_.c sig_die.c exit_.c \
 		setarg.c setsig.c
@@ -79,7 +79,7 @@
 		secnds.o second.o signal.o sleep.o srand.o stat.o symlnk.o \
 		system.o time.o ttynam.o umask.o unlink.o vxtidt.o vxttim.o
 
-LIBF77SRCS=	${F77SRCS} ${I77SRCS} ${U77SRCS} ${E77SRCS} MAIN.c
+LIBF77SRCS=	${F77SRCS} ${I77SRCS} ${U77SRCS} ${E77SRCS}
 
 SRCS=		${LIBF77SRCS}
 OBJS=		${E77OBJS}
>Release-Note:
>Audit-Trail:

From: Ruslan Ermilov <ru@FreeBSD.org>
To: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
Cc: bug-followup@FreeBSD.org, "David O'Brien" <obrien@FreeBSD.org>
Subject: Re: gnu/38594: Fortan program don't link post gcc-3.1
Date: Mon, 27 May 2002 17:19:24 +0300

 On Sun, May 26, 2002 at 07:41:05PM -0700, Steven G. Kargl wrote:
 > 
 > Fortran programs don't link after the gcc-3.1 due to a missing
 > libfrtbegin.a.  libF77/main.o was split out into libfrtbegin in
 > gcc-3.1 and a dependence was built into g77 (via g77spec.c) to 
 > unconditionally link libfrtbegin into all Fortran programs.
 > 
 > The following patch creates libfrtbegin.  The file
 > libg2c/MAIN.c should be repo-copied to gnu/libfrtbegin.
 > 
 ... and then "cvs remove"d from gnu/lib/libg2c.
 
 > diff -urNb gnu/lib.old/Makefile gnu/lib/Makefile
 > --- gnu/lib.old/Makefile	Wed May 15 09:29:45 2002
 > +++ gnu/lib/Makefile	Sun May 26 14:44:23 2002
 > @@ -19,7 +19,7 @@
 >  .endif
 >  
 >  .if !defined(NO_FORTRAN)
 > -SUBDIR+= libg2c
 > +SUBDIR+= libfrtbegin libg2c
 >  .endif
 >  
 >  .include <bsd.subdir.mk>
 > diff -urNb gnu/lib.old/libfrtbegin/MAIN.c gnu/lib/libfrtbegin/MAIN.c
 > --- gnu/lib.old/libfrtbegin/MAIN.c	Wed Dec 31 16:00:00 1969
 > +++ gnu/lib/libfrtbegin/MAIN.c	Sun May 26 14:44:40 2002
 > @@ -0,0 +1,4 @@
 > +/* $FreeBSD: src/gnu/lib/libg2c/MAIN.c,v 1.2 2000/10/31 11:36:33 obrien Exp $ */
 > +
 > +int
 > +MAIN__(){ return 0; }
 > diff -urNb gnu/lib.old/libfrtbegin/Makefile gnu/lib/libfrtbegin/Makefile
 > --- gnu/lib.old/libfrtbegin/Makefile	Wed Dec 31 16:00:00 1969
 > +++ gnu/lib/libfrtbegin/Makefile	Sun May 26 14:47:02 2002
 > @@ -0,0 +1,16 @@
 > +# $FreeBSD: src/gnu/lib/libg2c/Makefile,v 1.9 2002/05/12 16:00:46 ru Exp $
 > +
 > +SRCDIR=	${.CURDIR}/../../../contrib/libf2c
 > +
 > +.PATH: ${SRCDIR} ${SRCDIR}/libF77
 > +
 
 ${SRCDIR} is not needed in the .PATH.
 
 > +LIB=		frtbegin
 > +SHLIB_MAJOR=	1
 > +SHLIB_MINOR=	0
 > +
 
 There should only be the static frtbegin library, there's no
 point in shared and profiled versions; hence, these SHLIB_*'s
 lines should be replaced by NOPIC=YES and NOPROFILE=YES.
 
 > +SRCS=		main.c MAIN.c
 > +
 > +CFLAGS+=	-I${SRCDIR} -I${SRCDIR}/libF77
 > +CFLAGS+=	-I${.CURDIR}
 > +
 
 This compiles OK without any CFLAGS.
 
 > +.include <bsd.lib.mk>
 > diff -urNb gnu/lib.old/libg2c/Makefile gnu/lib/libg2c/Makefile
 > --- gnu/lib.old/libg2c/Makefile	Sun May 12 09:00:46 2002
 > +++ gnu/lib/libg2c/Makefile	Sun May 26 14:49:59 2002
 > @@ -10,7 +10,7 @@
 >  
 >  # Traditional FORTRAN Library members defined in libF77
 >  
 > -F77MISC=	F77_aloc.c main.c s_rnge.c abort_.c getarg_.c \
 > +F77MISC=	F77_aloc.c s_rnge.c abort_.c getarg_.c \
 >  		iargc_.c getenv_.c signal_.c s_stop.c s_paus.c system_.c \
 >  		cabs.c derf_.c derfc_.c erf_.c erfc_.c sig_die.c exit_.c \
 >  		setarg.c setsig.c
 > @@ -79,7 +79,7 @@
 >  		secnds.o second.o signal.o sleep.o srand.o stat.o symlnk.o \
 >  		system.o time.o ttynam.o umask.o unlink.o vxtidt.o vxttim.o
 >  
 > -LIBF77SRCS=	${F77SRCS} ${I77SRCS} ${U77SRCS} ${E77SRCS} MAIN.c
 > +LIBF77SRCS=	${F77SRCS} ${I77SRCS} ${U77SRCS} ${E77SRCS}
 >  
 >  SRCS=		${LIBF77SRCS}
 >  OBJS=		${E77OBJS}
 > 
 Other than that, looks good.
 
 
 Cheers,
 -- 
 Ruslan Ermilov		Sysadmin and 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

From: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
To: Ruslan Ermilov <ru@FreeBSD.org>
Cc: bug-followup@FreeBSD.org, "David O'Brien" <obrien@FreeBSD.org>
Subject: Re: gnu/38594: Fortan program don't link post gcc-3.1
Date: Mon, 27 May 2002 08:33:57 -0700 (PDT)

 Ruslan Ermilov said:
 > 
 > Other than that, looks good.
 > 
 
 I made the changes you suggested.  libfrtbegin
 built without a problem and I could build some
 test Fortran programs.
 
 Do you want an updated patch or will you or
 David make the minor changes after applying
 the current patch?
 
 -- 
 Steve
 http://troutmask.apl.washington.edu/~kargl/

From: Ruslan Ermilov <ru@FreeBSD.org>
To: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
Cc: bug-followup@FreeBSD.org, "David O'Brien" <obrien@FreeBSD.org>
Subject: Re: gnu/38594: Fortan program don't link post gcc-3.1
Date: Mon, 27 May 2002 18:37:41 +0300

 On Mon, May 27, 2002 at 08:33:57AM -0700, Steven G. Kargl wrote:
 > Ruslan Ermilov said:
 > > 
 > > Other than that, looks good.
 > > 
 > 
 > I made the changes you suggested.  libfrtbegin
 > built without a problem and I could build some
 > test Fortran programs.
 > 
 > Do you want an updated patch or will you or
 > David make the minor changes after applying
 > the current patch?
 > 
 Providing an updated patch might be helpful in saving David's time.
 I don't think you should "spam" the PR database with it though.  :-)
 
 
 Cheers,
 -- 
 Ruslan Ermilov		Sysadmin and 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

From: "Steven G. Kargl" <kargls@attbi.com>
To: freebsd-gnats-submit@FreeBSD.org,
	kargl@troutmask.apl.washington.edu
Cc:  
Subject: Re: gnu/38594: Fortran program don't link post gcc-3.1
Date: Sun, 02 Jun 2002 15:27:30 -0700

 This is a multi-part message in MIME format.
 --------------030002060109020808090204
 Content-Type: text/plain; charset=us-ascii; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Here the corrected patched (i.e., Ruslan's suggestions have been
 incorporated).  This patch had been sent to obrien@freebsd.org.
 
 --
 steve
 
 --------------030002060109020808090204
 Content-Type: text/plain;
  name="f77.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="f77.diff"
 
 diff -urN gnu/lib.old/Makefile gnu/lib/Makefile
 --- gnu/lib.old/Makefile	Tue May 28 17:45:50 2002
 +++ gnu/lib/Makefile	Sun Jun  2 14:11:31 2002
 @@ -19,7 +19,7 @@
  .endif
  
  .if !defined(NO_FORTRAN)
 -SUBDIR+= libg2c
 +SUBDIR+= libfrtbegin libg2c
  .endif
  
  .include <bsd.subdir.mk>
 diff -urN gnu/lib.old/libfrtbegin/MAIN.c gnu/lib/libfrtbegin/MAIN.c
 --- gnu/lib.old/libfrtbegin/MAIN.c	Wed Dec 31 16:00:00 1969
 +++ gnu/lib/libfrtbegin/MAIN.c	Tue Oct 31 03:36:33 2000
 @@ -0,0 +1,4 @@
 +/* $FreeBSD: src/gnu/lib/libg2c/MAIN.c,v 1.2 2000/10/31 11:36:33 obrien Exp $ */
 +
 +int
 +MAIN__(){ return 0; }
 diff -urN gnu/lib.old/libfrtbegin/Makefile gnu/lib/libfrtbegin/Makefile
 --- gnu/lib.old/libfrtbegin/Makefile	Wed Dec 31 16:00:00 1969
 +++ gnu/lib/libfrtbegin/Makefile	Sun Jun  2 14:16:31 2002
 @@ -0,0 +1,12 @@
 +SRCDIR=	${.CURDIR}/../../../contrib/libf2c
 +
 +.PATH: ${SRCDIR} ${SRCDIR}/libF77
 +
 +LIB=		frtbegin
 +
 +SRCS=		MAIN.c main.c
 +
 +NOPIC=		yes
 +NOPROFILE=	yes
 +
 +.include <bsd.lib.mk>
 diff -urN gnu/lib.old/libg2c/Makefile gnu/lib/libg2c/Makefile
 --- gnu/lib.old/libg2c/Makefile	Sun May 12 09:00:46 2002
 +++ gnu/lib/libg2c/Makefile	Sun Jun  2 14:17:20 2002
 @@ -10,7 +10,7 @@
  
  # Traditional FORTRAN Library members defined in libF77
  
 -F77MISC=	F77_aloc.c main.c s_rnge.c abort_.c getarg_.c \
 +F77MISC=	F77_aloc.c s_rnge.c abort_.c getarg_.c \
  		iargc_.c getenv_.c signal_.c s_stop.c s_paus.c system_.c \
  		cabs.c derf_.c derfc_.c erf_.c erfc_.c sig_die.c exit_.c \
  		setarg.c setsig.c
 @@ -79,7 +79,7 @@
  		secnds.o second.o signal.o sleep.o srand.o stat.o symlnk.o \
  		system.o time.o ttynam.o umask.o unlink.o vxtidt.o vxttim.o
  
 -LIBF77SRCS=	${F77SRCS} ${I77SRCS} ${U77SRCS} ${E77SRCS} MAIN.c
 +LIBF77SRCS=	${F77SRCS} ${I77SRCS} ${U77SRCS} ${E77SRCS}
  
  SRCS=		${LIBF77SRCS}
  OBJS=		${E77OBJS}
 
 --------------030002060109020808090204--
 
State-Changed-From-To: open->analyzed 
State-Changed-By: obrien 
State-Changed-When: Sat Jun 8 12:53:24 PDT 2002 
State-Changed-Why:  
I committed a work around; but this PR should stay around a little longer 
to rembmer the issue. 

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

From: "David O'Brien" <obrien@FreeBSD.org>
To: kargl@troutmask.apl.washington.edu, freebsd-bugs@FreeBSD.org
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: gnu/38594: Fortan program don't link post gcc-3.1
Date: Sat, 8 Jun 2002 12:56:06 -0700

 My commited "fix" is a hack.  This diff would be the true fix if we
 wanted to go to all this trouble.
 
 Index: contrib/gcc/f/g77spec.c
 ===================================================================
 RCS file: /home/ncvs/src/contrib/gcc/f/g77spec.c,v
 retrieving revision 1.1.1.4
 diff -u -r1.1.1.4 g77spec.c
 --- contrib/gcc/f/g77spec.c	1 Feb 2002 18:15:47 -0000	1.1.1.4
 +++ contrib/gcc/f/g77spec.c	8 Jun 2002 19:43:59 -0000
 @@ -52,14 +52,23 @@
  #ifndef MATH_LIBRARY
  #define MATH_LIBRARY "-lm"
  #endif
 +#ifndef MATH_LIBRARY_PROFILE
 +#define MATH_LIBRARY_PROFILE "-lm"
 +#endif
  
  #ifndef FORTRAN_INIT
  #define FORTRAN_INIT "-lfrtbegin"
  #endif
 +#ifndef FORTRAN_INIT_PROFILE
 +#define FORTRAN_INIT_PROFILE "-lfrtbegin"
 +#endif
  
  #ifndef FORTRAN_LIBRARY
  #define FORTRAN_LIBRARY "-lg2c"
  #endif
 +#ifndef FORTRAN_LIBRARY_PROFILE
 +#define FORTRAN_LIBRARY_PROFILE "-lg2c"
 +#endif
  
  /* Options this driver needs to recognize, not just know how to
     skip over.  */
 @@ -79,6 +88,7 @@
    OPTION_nostdlib,		/* Aka --no-standard-libraries, or
  				   -nodefaultlibs. */
    OPTION_o,			/* Aka --output. */
 +  OPTION_p,			/* Aka --profile. */
    OPTION_S,			/* Aka --assemble. */
    OPTION_syntax_only,		/* -fsyntax-only. */
    OPTION_v,			/* Aka --verbose. */
 @@ -167,6 +177,9 @@
      opt = OPTION_L, arg = text + 2;
    else if (text[1] == 'o')
      opt = OPTION_o;
 +  else if ((text[1] == 'p') && (text[2] == '\0')
 +           || (text[1] == 'p') && (text[2] == 'g') && (text[3] == '\0'))
 +    opt = OPTION_p;
    else if ((text[1] == 'S') && (text[2] == '\0'))
      opt = OPTION_S, skip = 0;
    else if (text[1] == 'V')
 @@ -291,6 +304,9 @@
    /* By default, we throw on the math library if we have one.  */
    int need_math = (MATH_LIBRARY[0] != '\0');
  
 +  /* If non-zero, the user gave us the `-p' or `-pg' flag.  */ 
 +  int saw_profile_flag = 0;
 +
    /* The number of input and output files in the incoming arg list.  */
    int n_infiles = 0;
    int n_outfiles = 0;
 @@ -359,6 +375,11 @@
  	  ++n_outfiles;
  	  break;
  
 +	case OPTION_p:
 +	  saw_profile_flag = 1;
 +	  library = FORTRAN_LIBRARY_PROFILE;
 +	  break;
 +
  	case OPTION_v:
  	  verbose = 1;
  	  break;
 @@ -432,7 +453,7 @@
  	  /* Not a filename or library. */
  
  	 if (saw_library == 1 && need_math)    /* -l<library>. */
 -	    append_arg (MATH_LIBRARY);
 +	    append_arg (saw_profile_flag ? MATH_LIBRARY_PROFILE : MATH_LIBRARY);
  
  	  saw_library = 0;
  
 @@ -483,10 +504,12 @@
  		{
  		  if (0 == use_init)
  		    {
 -		      append_arg (FORTRAN_INIT);
 +		      append_arg (saw_profile_flag ? FORTRAN_INIT_PROFILE
 +				  : FORTRAN_INIT);
  		      use_init = 1;
  		    }
 -		  append_arg (FORTRAN_LIBRARY);
 +		  append_arg (saw_profile_flag ? FORTRAN_LIBRARY_PROFILE
 +			      : FORTRAN_LIBRARY);
  		}
  	    }
  	  else if (strcmp (argv[i], FORTRAN_LIBRARY) == 0)
 @@ -494,7 +517,8 @@
  	  else
  	    {		/* Other library, or filename. */
  	     if (saw_library == 1 && need_math)
 -		append_arg (MATH_LIBRARY);
 +		append_arg (saw_profile_flag ? MATH_LIBRARY_PROFILE
 +			    : MATH_LIBRARY);
  	      saw_library = 0;
  	    }
  	}
 @@ -513,13 +537,14 @@
  	case 0:
  	  if (0 == use_init)
  	    {
 -	      append_arg (FORTRAN_INIT);
 +	      append_arg (saw_profile_flag ? FORTRAN_INIT_PROFILE
 +			  : FORTRAN_INIT);
  	      use_init = 1;
  	    }
  	  append_arg (library);
  	case 1:
  	 if (need_math)
 -	   append_arg (MATH_LIBRARY);
 +	   append_arg (saw_profile_flag ? MATH_LIBRARY_PROFILE : MATH_LIBRARY);
  	default:
  	  break;
  	}
 Index: gnu/lib/Makefile
 ===================================================================
 RCS file: /home/ncvs/src/gnu/lib/Makefile,v
 retrieving revision 1.38
 diff -u -r1.38 Makefile
 --- gnu/lib/Makefile	29 May 2002 00:45:50 -0000	1.38
 +++ gnu/lib/Makefile	8 Jun 2002 19:44:01 -0000
 @@ -19,7 +19,7 @@
  .endif
  
  .if !defined(NO_FORTRAN)
 -SUBDIR+= libg2c
 +SUBDIR+= libfrtbegin libg2c
  .endif
  
  .include <bsd.subdir.mk>
 Index: gnu/lib/libfrtbegin/Makefile
 ===================================================================
 RCS file: gnu/lib/libfrtbegin/Makefile
 diff -N gnu/lib/libfrtbegin/Makefile
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ gnu/lib/libfrtbegin/Makefile	8 Jun 2002 19:46:34 -0000
 @@ -0,0 +1,9 @@
 +# $FreeBSD$
 +
 +SRCDIR=	${.CURDIR}/../../../contrib/libf2c
 +.PATH: ${SRCDIR}/libF77
 +
 +LIB=	frtbegin
 +SRCS=	main.c
 +
 +.include <bsd.lib.mk>
 Index: gnu/lib/libg2c/Makefile
 ===================================================================
 RCS file: /home/ncvs/src/gnu/lib/libg2c/Makefile,v
 retrieving revision 1.9
 diff -u -r1.9 Makefile
 --- gnu/lib/libg2c/Makefile	12 May 2002 16:00:46 -0000	1.9
 +++ gnu/lib/libg2c/Makefile	8 Jun 2002 19:44:01 -0000
 @@ -10,7 +11,7 @@
  
  # Traditional FORTRAN Library members defined in libF77
  
 -F77MISC=	F77_aloc.c main.c s_rnge.c abort_.c getarg_.c \
 +F77MISC=	F77_aloc.c s_rnge.c abort_.c getarg_.c \
  		iargc_.c getenv_.c signal_.c s_stop.c s_paus.c system_.c \
  		cabs.c derf_.c derfc_.c erf_.c erfc_.c sig_die.c exit_.c \
  		setarg.c setsig.c
 Index: gnu/usr.bin/cc/cc_tools/freebsd-native.h
 ===================================================================
 RCS file: /home/ncvs/src/gnu/usr.bin/cc/cc_tools/freebsd-native.h,v
 retrieving revision 1.19
 diff -u -r1.19 freebsd-native.h
 --- gnu/usr.bin/cc/cc_tools/freebsd-native.h	6 Jun 2002 03:47:02 -0000	1.19
 +++ gnu/usr.bin/cc/cc_tools/freebsd-native.h	8 Jun 2002 19:44:01 -0000
 @@ -49,6 +49,10 @@
  /* For the native system compiler, we actually build libgcc in a profiled
     version.  So we should use it with -pg.  */
  #define LIBGCC_SPEC "%{!pg: -lgcc} %{pg: -lgcc_p}"
 +#define LIBSTDCXX_PROFILE	"-lstdc++_p"
 +#define MATH_LIBRARY_PROFILE	"-lm_p"
 +#define FORTRAN_INIT_PROFILE	"-lfrtbegin_p"
 +#define FORTRAN_LIBRARY_PROFILE	"-lg2c_p"
  
  /* FreeBSD is 4.4BSD derived */
  #define bsd4_4
 Index: gnu/usr.bin/cc/f77/Makefile
 ===================================================================
 RCS file: /home/ncvs/src/gnu/usr.bin/cc/f77/Makefile,v
 retrieving revision 1.18
 diff -u -r1.18 Makefile
 --- gnu/usr.bin/cc/f77/Makefile	8 Jun 2002 18:48:40 -0000	1.18
 +++ gnu/usr.bin/cc/f77/Makefile	8 Jun 2002 19:44:01 -0000
 @@ -10,7 +10,6 @@
  
  CFLAGS+= -DDEFAULT_TARGET_VERSION=\"$(version)\"
  CFLAGS+= -DDEFAULT_TARGET_MACHINE=\"$(target)\"
 -CFLAGS+= -DFORTRAN_INIT=\"-lg2c\"
  
  DPADD=	${LIBCC_INT}
  LDADD=	${LIBCC_INT}
 
State-Changed-From-To: analyzed->feedback 
State-Changed-By: gerald 
State-Changed-When: Wed Mar 26 09:48:44 PST 2003 
State-Changed-Why:  
As far as I can see this has been fixed on 5-CURRENT in the meantime (and 
also doesn't appear to be a problem on 4.7).  Can you confirm this? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38594 
State-Changed-From-To: feedback->analyzed 
State-Changed-By: gerald 
State-Changed-When: Sun Mar 30 15:58:09 PST 2003 
State-Changed-Why:  
We probably should keep this open in case someone (David O'Brien) wants to 
go for the full patch in the audit trail. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38594 
Responsible-Changed-From-To: freebsd-bugs->kan 
Responsible-Changed-By: kris 
Responsible-Changed-When: Sat Jul 12 17:18:24 PDT 2003 
Responsible-Changed-Why:  
Assign to gcc maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38594 
State-Changed-From-To: analyzed->closed 
State-Changed-By: linimon 
State-Changed-When: Tue Jul 10 15:48:02 UTC 2007 
State-Changed-Why:  
Closed at submitter's request (OBE). 

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