GCC & A/UX 2.0

John Coolidge coolidge at casca.cs.uiuc.edu
Fri Jul 27 03:41:51 AEST 1990


I hate to do this to everyone right after they've compiled the
recently released patches :-), but... 

Announcing yet another round of gcc patches!

What's different about these patches compared to the ones David
Berry just released? First, those patches are incorporated in these.
Gas support is included. In addition, there are a bunch of things
I've been working on, and some extensions to the gas and g++ support.
I'll include the readme at the end of this message, but here's the
gist of the changes:

1) Support for A/UX 2.0 shared libraries. gcc now uses the right
	crt files and the right loaded directives file.
2) Support for easy use of the 'big' version of as (if you're not
	using gas) and ld via compiler flags.
3) Different predefined symbols such that (if you compile the
	compiler right) it's easy to check if you're on 1.1 or 2.0,
	if you're on a mac at all, and what standards you want to be
	compatible with (A/UX, BSD, SVID, or POSIX).
4) Support for the register prefix option of COFF-gas. This causes
	registers to be written with a leading '%' (i.e. %pc, not pc),
	which prevents name clashes between registers and user
	variables (I've already seen one program which has a 'PC'
	variable).
5) A commando dialog. Makes it a lot easier to remember the obscure
	options and features.

In addition to the distribution files mentioned in the README file,
there's also a gcc.update.patch file which converts from the most
recent apple.com patches to my version. All the files are available
on wuarchive.wustl.edu in systems/aux/gnu.

--John

---------------------------------------------------------------------------

This set of patches should allow gcc 1.37.91 to work under A/UX 1.1 and
A/UX 2.0. Most of them are from David Berry (dwb at apple.com), while I've
added some bugfixes and additions. For installation instructions, please
read the file INSTALL.aux.

Distribution: The following files should be available on wuarchive.wustl.edu
in the systems/aux directory (/archive/systems/aux for those NFS mounting
wuarchive) or in the gnu directory:
gcc-1.37.aux.bin.Z		Binaries for gcc-1.37 on A/UX (tar format).
					These are a 1.1 build and will
					definitely work with it.
gcc-1.37.91.aux2.bin.tar.Z	Binaries for gcc-1.37.91 on A/UX. These
					were built with 2.0. I don't know if
					they will run on 1.1.
gcc-1.37.91.aux.diffs.Z		Patches for gcc-1.37.91 supporting A/UX.
					These should not break support
					for any other machine, and
					should work for A/UX 1.1 and 2.0.
gcc-1.37.91.aux.src.tar.Z	Sources for gcc-1.37.91 with the above
					diffs already applied.

New in this release: There is now a AUX2 flag. If you have A/UX 2.0,
add '-DAUX2' to the flags used to make gcc and some 2.0 features will
be compiled in. These include support for shared libraries and support
for the new syntax for getting the 'big' versions of as and ld. There
are also new predefined symbols and one bugfix. The linker directives
now specify default searching of /usr/local/lib and /usr/local/Gnu/lib,
since that makes things much easier most of the time. The gas support has
been modified to produce register names with a leading '%' (to
disambiguate them from variable names) --- hence, '%pc' and not 'pc'.
This feature is enabled by default --- to turn it off, edit out the
"#define REGISTER_PREFIX" in config/tm-aux.h. To make gas understand
the percent prefix, you need to link m68k.h to m-prefix.h when
building gas (the gas provided with the aux2 binaries supports this;
the gas provided with the aux binaries doesn't). Finally, there is a
Commando dialog for gcc on A/UX 2.0.

Support for shared libraries: gcc now supports linking with A/UX
shared libraries. The compiler automatically uses the right crtN.o
startup files and the right loader directives file for shared
libraries. If you specify -lc_s on the command line, you'll get the
shared C library instead of the statically linked library.

New compiler flags: If you're running A/UX 2.0, the following flags
are valid on the command line:
	-big:	Use big tables in as and ld. Actually, the patches
		default to using moderately big tables in as anyway,
		while ld defaults to small tables (because ld with
		big tables is SLOW).
	-vbig:	Use VERY big tables in as and ld. You can get quite
		a bit bigger than this, but these should be big
		enough for almost any program, I think.
If you're using gas, the big tables options only affect ld (gas
doesn't use fixed sized tables).

New predefined symbols: One of the biggest complaints about the
standard A/UX cc is that it doesn't define any useful symbols to
allow people to target code to A/UX. This should be banished by
the plethora of symbols defined by gcc. The following symbols are
always defined (both the listed symbols and __SYMBOL__ versions):
	unix m68k _AUX_SOURCE AUX macII
If you're running A/UX 2.0 (compiled with -DAUX2), AUX2 is also
defined. If you're using the A/UX assembler (compiled with
-DAUX_ASM), AUX_ASM is defined. WARNING: The symbols _SYSV_SOURCE
and _BSD_SOURCE are _not_ predefined. However, there are a number
of standard include files that demand one or both to be defined.
IMHO this is a bug in the include files (_AUX_SOURCE should always
produce the default "A/UX" behavior specified in the man pages
while _SYSV_SOURCE and _BSD_SOURCE should specify compatibility
modes only), but for the moment you may need to hand-define them.
I don't like having the compiler predefine them, because it makes
actually using them to target code for one standard or another more
difficult.

Bugfix: There was a bug in the original patches which caused bad
debugging information to be generated (duplicate entries). This is
now fixed.

Commando dialog: The file gcc.commando contains a Commando dialog
for gcc. Virtually every useful feature of gcc can be specified
from this dialog (the only exceptions are flags passed on to the
linker and assembler, flags which are nonsensical on the 680x0
series, and the 3 -f flags which affect specific registers). The
dialog can be placed in /mac/lib/cmdo/g or in a directory specified
by the environment variable CMDODIR (in either case, rename the file
to just 'gcc' when you move it).

Bug reports: From the original readme:
	Bug reports should be sent to dwb at apple.com if they appear
	to be in the A/UX port, or the appropriate individuals of
	the FSF if they appear to be in the basic compiler.  Be
	warned that due to the current fanaticism by FSF any bug
	reports mentioning A/UX or Apple are likely to be ignored...

Bugs in the A/UX 2.0 support (shared libraries, big tables, Commando
dialog), feature enhancements, etc., should be sent to either
David Berry (dwb at apple.com) or myself (coolidge at cs.uiuc.edu) or both.

Good luck!

--John Coolidge
coolidge at cs.uiuc.edu



More information about the Comp.unix.aux mailing list