From owner-freebsd-arm@FreeBSD.ORG Mon Apr 14 20:34:13 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35147770 for ; Mon, 14 Apr 2014 20:34:13 +0000 (UTC) Received: from smtp.hs-karlsruhe.de (smtp.HS-Karlsruhe.DE [193.196.64.25]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA35817EE for ; Mon, 14 Apr 2014 20:34:12 +0000 (UTC) Received: from iz-wera01.hs-karlsruhe.de ([193.196.65.46]) by smtp.hs-karlsruhe.de with esmtp (Exim 4.80.1) (envelope-from ) id 1WZnZx-004VDY-U1; Mon, 14 Apr 2014 22:34:09 +0200 X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.5 From: Ralf Wenk To: Andreas Schwarz Subject: Re: screen(1) crashes plus weird output for screen -ls In-reply-to: <443afb9423c.5a6681a6@mail.schwarzes.net> References: <18ADCE9C-C604-4067-B4D1-32EC07499231@bsdimp.com> <443afb9423c.5a6681a6@mail.schwarzes.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Mon, 14 Apr 2014 22:34:09 +0200 Message-Id: Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 20:34:13 -0000 Andreas Schwarz wrote: > On 10.04.14, Ralf Wenk wrote: >=20 > > I was not successful in compiling a gcc from the ports on armv6. > > ONLY_FOR_ARCHS prohibits it. =5B...=5D >=20 > The legacy standard freebsd gcc is still included in the source tree, y= ou can use the=20 > WITH_GCC/WITH_GNUCXX options in scr.conf when building and installing w= orld. I had some minor trouble to get it going. Adding both options terminates the build here with -- gnu/lib/libsupc++__L --- /root/rpi/head/gnu/lib/libsupc++/../../../contrib/libstdc++/libsupc++/eh_= arm.cc :44:1: error: functions that differ only in their return type cannot be=20 overloaded __cxa_type_match(_Unwind_Exception* ue_header, =5E Just setting WITH_GCC got me finally a successful build. Now back to the problem with screen on arm. Compiling screen with gcc instead of clang using the standard optimizatio= n (-O) results in a correct working screen as =22screen -ls=22 prints There is a screen on: 3164.pts-2.raspberry-pi (Detached) 1 Socket in /tmp/screens/S-pi. while a fresh with clang -O compiled screen prints There is a screen on: 3164.pts-2.raspberry-pi (Detached) -1073746600 Socket =D0=A0=E1 in =F0=F5=FF=BF8=E8. Compiling screen with clang -O0 results in the same output as gcc. I think this supports my idea of suspecting the clang optimizations. The gcc used is =24 gcc -v Using built-in specs. Target: armv6-undermydesk-freebsd Configured with: FreeBSD/armv6 system compiler Thread model: posix gcc version 4.2.1 20070831 patched =5BFreeBSD=5D =24 Ralf