From owner-freebsd-questions@FreeBSD.ORG Mon Feb 19 13:14:08 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 14EEF16A402 for ; Mon, 19 Feb 2007 13:14:08 +0000 (UTC) (envelope-from news@nermal.rz1.convenimus.net) Received: from mx2.netclusive.de (mx2.netclusive.de [89.110.132.132]) by mx1.freebsd.org (Postfix) with ESMTP id CB6DE13C4A5 for ; Mon, 19 Feb 2007 13:14:07 +0000 (UTC) (envelope-from news@nermal.rz1.convenimus.net) Received: from nermal.rz1.convenimus.net (Fdc9f.f.ppp-pool.de [195.4.220.159]) by mx2.netclusive.de (Postfix) with ESMTP id 49B2F260073 for ; Mon, 19 Feb 2007 14:14:05 +0100 (CET) Received: by nermal.rz1.convenimus.net (Postfix, from userid 8) id 511AA15213; Mon, 19 Feb 2007 14:14:04 +0100 (CET) To: freebsd-questions@freebsd.org Path: not-for-mail From: Christian Baer Newsgroups: gmane.os.freebsd.questions Date: Mon, 19 Feb 2007 14:14:04 +0100 (CET) Organization: Convenimus Projekt Lines: 37 Message-ID: NNTP-Posting-Host: garfield.rz1.convenimus.net X-Trace: nermal.rz1.convenimus.net 1171890844 27498 192.168.100.11 (19 Feb 2007 13:14:04 GMT) X-Complaints-To: abuse@convenimus.net NNTP-Posting-Date: Mon, 19 Feb 2007 13:14:04 +0000 (UTC) User-Agent: slrn/0.9.8.1 (FreeBSD) Subject: Compiler Flags for SPARC64 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Feb 2007 13:14:08 -0000 Hello everybody out there! Please excuse my posting this question again on this list, but the last post on the freebsd-sparc64 didn't help much. There isn't really much traffic on that list. Assuming that gcc when run on sparc64 produces v7 code (for sun4/4c) by default, I went about trying to improve that as v7 code is known to be a fair bit slower as v9 (sun4u) code. The improvement can be as much as 100% for some apps like OpenSSL or OpenSSH. I went about trying some Compiler flags. -mcpu=ultrasparc and -mcpu=v9 both came into mind. However this lead to several problems of programs not compiling anymore. Most notably was the failure of 'make buildworld'. When gcc is told to produce v9 code, it doesn't produce 64bit code (you have to set -m64 for that), it just uses a few additional commands the CPU knows, which should make the resulting code faster but no longer compatible with older CPUs (non-UltraSPARC). This means that there shouldn't be any problem with pointers that are now "strange" to the code. But even if I explicitly set the -m32 flag, I still can't make the world. I discussed this in a German newsgroup, where someone told me that the CPU is set to v9 by default on FreeBSD, as it only supports SPARC64 and not SPARC32. Although this assumption makes sense, I couldn't find any evidence to back it up. While some compiler flags are set by default on some platforms for optimization for that particular CPU, there doesn't seem to be anything set for sparc64. Additionaly, if the mcpu were really set to ultrasparc or v9, then setting it again shouldn't cause buildworld to stop with the error "I don't know what platform this is." Has anyone got any ideas on how to go on with this? Regards Chris