sparc64/73933: Compiling with -mcpu fails on code including sys/user.h

Tim Bishop tim at bishnet.net
Sun Nov 14 05:50:27 PST 2004


>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 at 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:


More information about the freebsd-sparc64 mailing list