Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 May 2002 07:20:03 -0700 (PDT)
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: gnu/38594: Fortan program don't link post gcc-3.1
Message-ID:  <200205271420.g4REK3g43045@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR gnu/38594; it has been noted by GNATS.

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

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




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