Bug 233611 - [meta] base system migration from obsolete GNU as 2.17.50
Summary: [meta] base system migration from obsolete GNU as 2.17.50
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks: 205250 233094
  Show dependency treegraph
 
Reported: 2018-11-28 15:37 UTC by Ed Maste
Modified: 2018-12-03 19:17 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer 2018-11-28 15:37:05 UTC
One of the goals for FreeBSD 13.0 is to retire obsolete binutils 2.17.50.  In order to do so we need to address a few assembly files in the tree that are currently assembled by GNU as.  (Most assembly files have a .S extension and are assembled by invoking the compiler driver, which uses Clang's Integrated Assembler (IAS) by default on many architectures.)

Below is a list of .s files (typically assembled by GNU as) in the tree, sorted by architecture.


i386/amd64 (used by both):

stand/i386/kgzldr/crt.s
stand/i386/kgzldr/sio.s
stand/i386/kgzldr/start.s
stand/i386/mbr/mbr.s
stand/i386/pmbr/pmbr.s


amd64:

sys/crypto/skein/amd64/skein_block_asm.s


i386:

cddl/contrib/opensolaris/cmd/dtrace/test/tst/i386/pid/tst.badinstr.s
cddl/contrib/opensolaris/cmd/dtrace/test/tst/i386/pid/tst.branch.s
cddl/contrib/opensolaris/cmd/dtrace/test/tst/i386/pid/tst.embedded.s
cddl/contrib/opensolaris/cmd/dtrace/test/tst/i386/pid/tst.ret.s
cddl/contrib/opensolaris/cmd/dtrace/test/tst/i386/pid/tst.retlist.s
cddl/contrib/opensolaris/cmd/dtrace/test/tst/i386/ustack/tst.circstack.s
sys/i386/i386/apic_vector.s
sys/i386/i386/atpic_vector.s
sys/i386/i386/bioscall.s
sys/i386/i386/copyout_fast.s
sys/i386/i386/exception.s
sys/i386/i386/locore.s
sys/i386/i386/mpboot.s
sys/i386/i386/sigtramp.s
sys/i386/i386/support.s
sys/i386/i386/swtch.s
sys/i386/i386/vm86bios.s
sys/i386/linux/linux_vdso.lds.s
tools/test/vm86/vm86_test_asm.s


*** sparc64:

cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.br.s
cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.branch.s
cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.embedded.s
cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.circstack.s
lib/libc/sparc64/gen/assym.s
lib/libc/sparc64/sys/assym.s
stand/sparc64/boot1/_start.s


*** arm:

sys/arm/arm/setstack.s


*** unused / not applicable:

contrib/libpcap/msdos/pkt_rx1.s
sys/amd64/linux/linux_vdso.lds.s
sys/amd64/linux32/linux32_vdso.lds.s
sys/arm64/linux/linux_vdso.lds.s

(lds.s are linker script files, typically named "ldscript.${arch}" elsewhere in the tree.)
Comment 1 Ed Maste freebsd_committer 2018-11-28 15:45:55 UTC
It turns out Clang IAS accepts -Wa,-defsym,FOO=BAR but not -Wa,--defsym,FOO=BAR -- see LLVM PR 39825 https://llvm.org/pr39825
Comment 2 Ed Maste freebsd_committer 2018-11-28 15:59:54 UTC
These two reviews address all of the assembly files used by amd64 except for skein_block_asm.s:
https://reviews.freebsd.org/D18344
https://reviews.freebsd.org/D18369
Comment 3 commit-hook freebsd_committer 2018-12-03 19:17:27 UTC
A commit references this bug:

Author: emaste
Date: Mon Dec  3 19:16:35 UTC 2018
New revision: 341437
URL: https://svnweb.freebsd.org/changeset/base/341437

Log:
  stand/i386: rename .s to .S to use Clang IAS

  As part of the migration away from obsolete binutils we want to retire
  GNU as.  Most assembly files used on amd64 have a .S extension and
  (via rules in share/mk/bsd.suffixes.mk) are assembled with Clang's
  Integrated Assembler (IAS).  Rename files in stand/i386 to .S to use
  the integrated assembler.

  Clang's IAS supports the defsym option (via -Wa,) but only with one
  dash, not two.  As both -defsym and --defsym are accepted by GNU as,
  use the former.

  PR:		233611
  Reviewed by:	tsoome
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D18369

Changes:
  head/stand/i386/kgzldr/Makefile
  head/stand/i386/kgzldr/crt.S
  head/stand/i386/kgzldr/crt.s
  head/stand/i386/kgzldr/sio.S
  head/stand/i386/kgzldr/sio.s
  head/stand/i386/kgzldr/start.S
  head/stand/i386/kgzldr/start.s
  head/stand/i386/mbr/Makefile
  head/stand/i386/mbr/mbr.S
  head/stand/i386/mbr/mbr.s
  head/stand/i386/pmbr/Makefile
  head/stand/i386/pmbr/pmbr.S
  head/stand/i386/pmbr/pmbr.s