Subject: port-alpha/5586: port alpha does not define "unix"
To: None <gnats-bugs@gnats.netbsd.org>
From: Charlie Root <root@polaris.garbled.net>
List: netbsd-bugs
Date: 06/14/1998 06:31:19
>Number:         5586
>Category:       port-alpha
>Synopsis:       port-alpha does not define "unix"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 14 06:35:01 1998
>Last-Modified:
>Originator:     Charlie Root
>Organization:
Tim Rightnour    -  root@garbled.net
http://www.zynetwc.com/~garbled/garbled.html
>Release:        6-10-98<NetBSD-current source date>
>Environment:
	
System: NetBSD polaris 1.3 NetBSD 1.3 (POLARIS) #0: Thu Mar 26 13:17:18 MST 1998 root@polaris:/usr/src/sys/arch/i386/compile/POLARIS i386


>Description:

Tried to compile mkimod pkg under alpha.  Gives a very strange problem about
not finding a reference to "MyGlob". It's surrounded by #ifndef unix.

The alpha port doesn't define this by default, and the build fails.

	
>How-To-Repeat:
#include <stdio.h>
main() {
printf ("This\n\r");
#ifdef unix
printf ("Works\n\r");
#endif
}

on i386:
polaris# cc test.c
polaris# ./a.out
This
Works
polaris# 

on alpha:
rigel# cc test.c
rigel# ./a.out
This
rigel# 

	
>Fix:

from /src/gnu/usr.bin/gcc/arch/i386/gas.h
#define CPP_PREDEFINES "-Dunix -Di386 -Asystem(unix) -Acpu(i386) -Amachine(i386)"

I dont happen to have toolchain source here (I really should get it) but
I'm pretty sure that define just needs to be changed in the corresponding
alpha tree.  Apologies for not having a real patch.

	
>Audit-Trail:
>Unformatted: