Subject: gcc alignment
To: None <tech-pkg@netbsd.org, netbsd-help@netbsd.org>
From: None <collver@linuxfreemail.com>
List: netbsd-help
Date: 06/06/2001 23:49:15
I recently build libflux in NetBSD 1.5, a tarball of it is at
http://amaterasu.math.orst.edu:8080/~sharpej/libflux.tgz

I don't have a use for the library after all, so I won't submit a package.

But it does bring up a good point I've seen mentioned elsewhere..  The GNU
assembler treats .align directives differently for different targets.. the
argument is either a number of bytes, or log2 of a number of bytes, for the
alignment boundary.

In libflux, this is handled by preprocessing assembler code.
For example src/mpi/i386/syntax.h:

#if defined (BSD_SYNTAX)
#define ALIGN(log) .align log
#endif
#if defined (ELF_SYNTAX)
#define ALIGN(log) .align 1<<(log)
#endif

"This inconsistency is due to the different behaviors of the various
native assemblers for these systems which GAS must emulate." --as.info

Did the native assembler of some old BSD use "BSD_SYNTAX", and later on
GAS emulated this?

Ben