From owner-freebsd-sparc64@FreeBSD.ORG Sun Feb 25 02:00:13 2007 Return-Path: X-Original-To: freebsd-sparc64@hub.freebsd.org Delivered-To: freebsd-sparc64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 65AAE16A404 for ; Sun, 25 Feb 2007 02:00:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 4726A13C4A3 for ; Sun, 25 Feb 2007 02:00:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l1P20DOP023119 for ; Sun, 25 Feb 2007 02:00:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l1P20D8a023118; Sun, 25 Feb 2007 02:00:13 GMT (envelope-from gnats) Resent-Date: Sun, 25 Feb 2007 02:00:13 GMT Resent-Message-Id: <200702250200.l1P20D8a023118@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-sparc64@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Steven Hillis Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C888D16A403 for ; Sun, 25 Feb 2007 01:54:53 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id BA5D713C467 for ; Sun, 25 Feb 2007 01:54:53 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l1P1sr1W021444 for ; Sun, 25 Feb 2007 01:54:53 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l1P1srAJ021443; Sun, 25 Feb 2007 01:54:53 GMT (envelope-from nobody) Message-Id: <200702250154.l1P1srAJ021443@www.freebsd.org> Date: Sun, 25 Feb 2007 01:54:53 GMT From: Steven Hillis To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: sparc64/109510: mcpu flags break buildworld in Sparc64 line X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Feb 2007 02:00:13 -0000 >Number: 109510 >Category: sparc64 >Synopsis: mcpu flags break buildworld in Sparc64 line >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-sparc64 >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Feb 25 02:00:12 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Steven Hillis >Release: 6.2 >Organization: >Environment: FreeBSD popp.tops 6.2-RELEASE-p1 FreeBSD 6.2-RELEASE-p1 #0: Sat Feb 24 14:15:14 PST 2007 steven@popp.tops:/usr/src/sys/sparc64/compile/MYKERN sparc64 >Description: Setting -mcpu=ultrasparc or -mcpu=v9 in /etc/make.conf causes "unknown architecture" errors on world or kernel builds. Setting the flags overwrites the CPU_SPEC that's normally set to __sparc64__. >How-To-Repeat: Add -mcpu=ultrasparc to you CFLAGS= configuration in /etc/make.conf, then try to compile world or any kernel. >Fix: Apply the attached patch which adds the following to /usr/src/contrib/gcc/config/sparc/freebsd.h: builtin_define ("__sparc64__"); builtin_define ("__sparc_v9__"); builtin_define ("__sparcv9"); builtin_define ("__arch64__"); Patch attached with submission follows: *** contrib/gcc/config/sparc/freebsd.h Tue Jul 27 22:00:13 2004 --- contrib/gcc/config/sparc/temp/freebsd.h Sat Feb 24 16:56:33 2007 *************** *** 34,44 **** #undef FBSD_TARGET_CPU_CPP_BUILTINS #define FBSD_TARGET_CPU_CPP_BUILTINS() \ do \ { \ builtin_define ("__LP64__"); \ ! } \ while (0) #define LINK_SPEC "%(link_arch) \ %{!mno-relax:%{!r:-relax}} \ %{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \ --- 34,48 ---- #undef FBSD_TARGET_CPU_CPP_BUILTINS #define FBSD_TARGET_CPU_CPP_BUILTINS() \ do \ { \ builtin_define ("__LP64__"); \ ! builtin_define ("__sparc64__"); \ ! builtin_define ("__sparc_v9__"); \ ! builtin_define ("__sparcv9"); \ ! builtin_define ("__arch64__"); \ ! } \ while (0) #define LINK_SPEC "%(link_arch) \ %{!mno-relax:%{!r:-relax}} \ %{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \ >Release-Note: >Audit-Trail: >Unformatted: