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: 205250
Blocks: 233094
  Show dependency treegraph
 
Reported: 2018-11-28 15:37 UTC by Ed Maste
Modified: 2019-08-04 20:41 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
Comment 4 Ed Maste freebsd_committer 2019-08-01 18:14:46 UTC
skein_block_asm.s modified to assemble with LLVM IAS in review D18758

https://reviews.freebsd.org/D18758
Comment 5 commit-hook freebsd_committer 2019-08-01 19:02:04 UTC
A commit references this bug:

Author: emaste
Date: Thu Aug  1 19:01:28 UTC 2019
New revision: 350518
URL: https://svnweb.freebsd.org/changeset/base/350518

Log:
  as: add deprecation notice to the man page

  In the future FreeBSD will ship without GNU binutils 2.17.50.  Add a
  note advising users who require GNU as to install the binutils port
  or package.

  Note that on armv7, arm64, amd64, i386 we currently ship only two
  binutils tools (as and objdump).  A deprecation notice was added to
  objdump's man page some time ago.

  PR:		233611
  Discussed with:	jhb
  MFC after:	1 week
  Relnotes:	Yes
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/contrib/binutils/gas/doc/as.texinfo
  head/gnu/usr.bin/binutils/as/as.1
Comment 6 commit-hook freebsd_committer 2019-08-04 20:41:42 UTC
A commit references this bug:

Author: emaste
Date: Sun Aug  4 20:40:48 UTC 2019
New revision: 350574
URL: https://svnweb.freebsd.org/changeset/base/350574

Log:
  MFC r350518: as: add deprecation notice to the man page

  In the future FreeBSD will ship without GNU binutils 2.17.50.  Add a
  note advising users who require GNU as to install the binutils port
  or package.

  Note that on armv7, arm64, amd64, i386 we currently ship only two
  binutils tools (as and objdump).  A deprecation notice was added to
  objdump's man page some time ago.

  PR:		233611
  Sponsored by:	The FreeBSD Foundation

Changes:
_U  stable/12/
  stable/12/contrib/binutils/gas/doc/as.texinfo
  stable/12/gnu/usr.bin/binutils/as/as.1