A note regarding portability:

The assembler, 'as', is no longer a required program on developer machines.

FreeBSD 14.0 ships with clang as default compiler, and clang has an
embedded assembler. Yes, one can install the 'binutils' package and then
gets a /usr/local/bin/as program, but it is not part of the default
installation.

For a long time already, it was easier to invoke
  $CC -c foo.s
or
  $CC -c -x none foo.s
rather than
  as -c foo.s
because the compiler front end took over the jobs of
  - determining the location of the assembler (not necessarily in /usr/bin),
  - determining the ABI and CPU related flags to pass to the assembler.

Now, 'as' can be gone entirely.

'clang -print-prog-name=as' still prints 'as', even when there is no 'as'
any more.

clang has an option '-no-integrated-as', to force the use of a separate
assembler instead of the embedded one. But when there is no 'as' any more,
a command with that option fails.

Bruno




Reply via email to