Date: Sun, 26 May 2002 19:41:05 -0700 (PDT) From: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu> To: FreeBSD-gnats-submit@FreeBSD.org Cc: obrien@FreeBSD.org Subject: gnu/38594: Fortan program don't link post gcc-3.1 Message-ID: <200205270241.g4R2f5YN036332@troutmask.apl.washington.edu>
next in thread | raw e-mail | index | archive | help
>Number: 38594 >Category: gnu >Synopsis: Fortan program don't link post gcc-3.1 >Confidential: no >Severity: critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun May 26 19:50:03 PDT 2002 >Closed-Date: >Last-Modified: >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: >Unformatted: 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?200205270241.g4R2f5YN036332>