Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Nov 2004 14:19:38 GMT
From:      Tim Bishop <tim@bishnet.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        tim@bishnet.net
Subject:   sparc64/73933: Compiling with -mcpu fails on code including sys/user.h
Message-ID:  <200411141419.iAEEJcXC088836@overlord.sixth.bishnet.net>
Resent-Message-ID: <200411141350.iAEDoQjA064173@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         73933
>Category:       sparc64
>Synopsis:       Compiling with -mcpu fails on code including sys/user.h
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-sparc64
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 14 13:50:26 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Tim Bishop
>Release:        FreeBSD 5.3-RELEASE sparc64
>Organization:
>Environment:
System: FreeBSD overlord.sixth.bishnet.net 5.3-RELEASE FreeBSD 5.3-RELEASE #2: Sun Nov 14 08:21:30 GMT 2004 tdb@overlord.sixth.bishnet.net:/usr/obj/usr/src/sys/OVERLORD sparc64

	Not yet compiled with a 64bit time_t.

>Description:
	If I optimise for my ultrasparc 2 processor by using the
	compile option:

	-mcpu=ultrasparc

	I get the following build failure:

	/usr/include/sys/user.h:105:2: #error "Unknown architecture"

>How-To-Repeat:
	Simple code to demonstrate this:

	#include <stdio.h>
	#include <sys/param.h>
	#include <sys/user.h>
	int main() {
		printf("Hello World\n");
		return 0;
	}

	Testing compiling normally and with -mcpu:

	gcc -Wall -o hello hello.c
	gcc -Wall -mcpu=ultrasparc -o hello2 hello.c
	In file included from hello.c:3:
	/usr/include/sys/user.h:105:2: #error "Unknown architecture"

	The first compile worked fine, and the second failed.

>Fix:
	Unsure. There's some tests in user.h which are all failing.
	Maybe another case needs to be added?

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411141419.iAEEJcXC088836>