From owner-freebsd-ports@FreeBSD.ORG Sun Jan 9 15:36:35 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D22416A4D3 for ; Sun, 9 Jan 2005 15:36:35 +0000 (GMT) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBF8443D5E for ; Sun, 9 Jan 2005 15:36:34 +0000 (GMT) (envelope-from jaffer@voluntocracy.org) Received: from mail.voluntocracy.org (voluntocracy.org[24.218.212.143]) by comcast.net (rwcrmhc12) with ESMTP id <2005010915363401400gd3qie>; Sun, 9 Jan 2005 15:36:34 +0000 Received: from voluntocracy.org (aubrey.jaffer [192.168.1.252]) by mail.voluntocracy.org (Postfix) with ESMTP id 00BC24345; Sun, 9 Jan 2005 10:36:55 -0500 (EST) Received: by voluntocracy.org (Postfix, from userid 500) id 3C5131B772C; Sun, 9 Jan 2005 10:37:02 -0500 (EST) From: Aubrey Jaffer To: inukai.d@jeans.ocn.ne.jp In-reply-to: <20041031.041810.74752652.inukai.d@jeans.ocn.ne.jp> References: <20041031.041810.74752652.inukai.d@jeans.ocn.ne.jp> Message-Id: <20050109153702.3C5131B772C@voluntocracy.org> Date: Sun, 9 Jan 2005 10:37:02 -0500 (EST) cc: ports@FreeBSD.org Subject: Re: /usr/ports/lang/scm on 5.3-STABLE and 6.0-CURRENT X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jan 2005 15:36:35 -0000 | Date: Sun, 31 Oct 2004 04:18:10 +0900 (JST) | From: "dai inukai" | | I recently realized and regret that "scm-5d9_1 is marked as broken: | Segfault during build." This seems not the scm fault but due to the | bug introduced by the gcc FreeBSD adopted for STABLE and CURRENT. I | say gcc bug because scm compiles correctly with gcc-3.4.3 | (prerelease from the port.) Thanks for your patch. I put your (regex freebsd "-I/usr/include/gnu" "-lgnuregex" "" () ()) into build.scm. The development version is updated: http://swissnet.ai.mit.edu/ftpdir/users/jaffer/scm.zip Rather than modify "build.scm" to include -DGCC_SPARC_BUG, I suggest building thus: ./build -DGCC_SPARC_BUG --linker-options=-DGCC_SPARC_BUG | My system: 1 CPU Athlon XP 1800+ on M/B K7T266 PRO2 | | 5.3-STABLE: % uname -a | FreeBSD daip 5.3-STABLE FreeBSD 5.3-STABLE #0: Tue Oct 26 21:47:52 JST | 2004 daip@daip:/usr/obj/usr/src/sys/DAIKERNEL i386 | | 6.0-CURRENT: % uname -a | FreeBSD daip 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Sat Oct 23 02:55:12 | JST 2004 daip@daip:/usr/obj/usr/src/sys/DAIKERNEL i386 | | % cc --version | cc (GCC) 3.4.2 [FreeBSD] 20040728 | | When compiled with FreeBSD defaults, scmlit and scm crash with | Segmentation Fault in eval.c at the line 2090 with core dump output: | | eval.c: 2090 x = arg1; | | If I trace the program with gdb and dumped core files, the variable | arg1 in the function "static SCM ceval_1(x)" disappears except the | case compiled with the optimization option "-O0 (gcc default)." | | This seems to be a similar bug to: | | http://gcc.gnu.org/ml/gcc-bugs/2003-10/msg00520.html | | and can be avoided with "-DGCC_SPARC_BUG" during the make. | | I propose the attached patches until the next version of gcc is | adopted as default. | | dai -- http://www4.ocn.ne.jp/~inukai/scheme.html | | | ----Next_Part(Sun_Oct_31_04:18:10_2004_586)-- | Content-Type: Text/Plain; charset=us-ascii | Content-Transfer-Encoding: 7bit | Content-Disposition: inline; filename="Makefile.diff" | | *** Makefile.orig Mon Dec 1 13:49:57 2003 | --- Makefile Sat Oct 30 20:58:29 2004 | *************** | *** 40,54 **** | | # "Makefile" for scm Scheme Interpreter | # Author: Aubrey Jaffer | | SHELL = /bin/sh | ! #CC = gcc | #CFLAGS = -g | #LIBS = | #LD = $(CC) -g | ! LD = $(CC) | SCMLIT = ./scmlit | SCMEXE = ./scm | | #BUILD = ./build -hsystem -p svr4-gcc-sun-ld | BUILD = ./build -hsystem | --- 40,54 ---- | | # "Makefile" for scm Scheme Interpreter | # Author: Aubrey Jaffer | | SHELL = /bin/sh | ! #CC = ccache cc | #CFLAGS = -g | #LIBS = | #LD = $(CC) -g | ! LD = $(CC) -O3 -DGCC_SPARC_BUG | SCMLIT = ./scmlit | SCMEXE = ./scm | | #BUILD = ./build -hsystem -p svr4-gcc-sun-ld | BUILD = ./build -hsystem | | ----Next_Part(Sun_Oct_31_04:18:10_2004_586)-- | Content-Type: Text/Plain; charset=us-ascii | Content-Transfer-Encoding: 7bit | Content-Disposition: inline; filename="build.scm.diff" | | *** build.scm.orig Fri Aug 27 21:55:10 2004 | --- build.scm Sun Oct 31 02:45:32 2004 | *************** | *** 623,633 **** | (regex darwin "" "" #f () ()) | | (c freebsd "" "-export-dynamic" #f () ()) | (m freebsd "" "-lm" #f () ()) | (curses freebsd "" "-lncurses" "/usr/lib/libncurses.a" () ()) | ! (regex freebsd "" "-lgnuregex" "" () ()) | (editline freebsd "" "-lreadline" "" () ()) | (dlll freebsd "-DSUN_DL" "-export-dynamic" "" () ()) | (nostart freebsd "" "-e start -dc -dp -Bstatic -lgnumalloc" #f ("pre-crt0.c") ()) | (dump freebsd "" "/usr/lib/crt0.o" "" ("unexsunos4.c") ()) | (curses netbsd "-I/usr/pkg/include" "-lncurses" "-Wl,-rpath -Wl,/usr/pkg/lib -L/usr/pkg/lib" () ()) | --- 623,633 ---- | (regex darwin "" "" #f () ()) | | (c freebsd "" "-export-dynamic" #f () ()) | (m freebsd "" "-lm" #f () ()) | (curses freebsd "" "-lncurses" "/usr/lib/libncurses.a" () ()) | ! (regex freebsd "-I/usr/include/gnu" "-lgnuregex" "" () ()) | (editline freebsd "" "-lreadline" "" () ()) | (dlll freebsd "-DSUN_DL" "-export-dynamic" "" () ()) | (nostart freebsd "" "-e start -dc -dp -Bstatic -lgnumalloc" #f ("pre-crt0.c") ()) | (dump freebsd "" "/usr/lib/crt0.o" "" ("unexsunos4.c") ()) | (curses netbsd "-I/usr/pkg/include" "-lncurses" "-Wl,-rpath -Wl,/usr/pkg/lib -L/usr/pkg/lib" () ()) | *************** | *** 1586,1596 **** | | (defcommand compile-c-files freebsd | (lambda (files parms) | (and (batch:try-chopped-command | parms | ! "cc" "-O3 -pipe " "-c" | (c-includes parms) | (c-flags parms) | files) | (map c->o files)))) | (defcommand link-c-program freebsd | --- 1586,1597 ---- | | (defcommand compile-c-files freebsd | (lambda (files parms) | (and (batch:try-chopped-command | parms | ! ; "cc" "-O3 -pipe " "-c";;gcc 3.4.2 for FreeBSD does not allow options other than default i.e. -O0 if NO -DGCC_SPARC_BUG - dai 2004-10-30 | ! "cc" "-O3 -pipe -DGCC_SPARC_BUG " "-c" | (c-includes parms) | (c-flags parms) | files) | (map c->o files)))) | (defcommand link-c-program freebsd | | ----Next_Part(Sun_Oct_31_04:18:10_2004_586)---- |