Bug 233094

Summary: [meta] Base system tool chain modernization tracking
Product: Base System Reporter: Ed Maste <emaste>
Component: miscAssignee: freebsd-bugs mailing list <bugs>
Status: New ---    
Severity: Affects Only Me CC: cy, grahamperrin, lab+bsd, linimon, ysw
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
See Also: https://bugs.llvm.org/show_bug.cgi?id=25525
https://bugs.llvm.org/show_bug.cgi?id=32462
https://bugs.llvm.org/show_bug.cgi?id=33647
https://bugs.llvm.org/show_bug.cgi?id=39101
Bug Depends on: 205250, 210337, 228919, 229046, 229050, 233405, 233611, 230240, 233056, 233437, 233664, 233751, 234454, 241374, 243119    
Bug Blocks:    

Description Ed Maste freebsd_committer 2018-11-09 19:55:12 UTC
This PR is open to track ongoing efforts to retire outdated components of the base system's tool chain.
Comment 1 Ed Maste freebsd_committer 2018-11-20 16:23:58 UTC
See also GPLinBase wiki page: https://wiki.freebsd.org/GPLinBase
Comment 2 commit-hook freebsd_committer 2018-11-20 16:55:19 UTC
A commit references this bug:

Author: emaste
Date: Tue Nov 20 16:54:43 UTC 2018
New revision: 340681
URL: https://svnweb.freebsd.org/changeset/base/340681

Log:
  stand: remove CLANG_NO_IAS from btx and gptboot

  Many components under stand/ had CLANG_NO_IAS added when Clang's
  Integrated Assembler (IAS) did not handle .codeNN directives.  Clang
  gained support quite some time ago, and we can now build stand/ with
  IAS.

  Note that in some cases there are small differences in the generated
  output, so CLANG_NO_IAS should be removed only after testing (or after
  finding no differences in the output).

  PR:		205250, 233094
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/stand/i386/btx/btx/Makefile
  head/stand/i386/btx/btxldr/Makefile
  head/stand/i386/gptboot/Makefile
Comment 3 commit-hook freebsd_committer 2018-11-26 19:14:55 UTC
A commit references this bug:

Author: emaste
Date: Mon Nov 26 19:14:34 UTC 2018
New revision: 340990
URL: https://svnweb.freebsd.org/changeset/base/340990

Log:
  btx: rename .s files 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 are
  assembled with Clang's integrated assembler; rename two files in
  stand/i386/btx/lib to .S to use IAS as well.

  The generated .text is identical (the entire .o files are not, as Clang
  adds debug info).

  PR:		205250, 233094
  Discussed with:	imp
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/stand/i386/btx/lib/Makefile
  head/stand/i386/btx/lib/btxsys.S
  head/stand/i386/btx/lib/btxsys.s
  head/stand/i386/btx/lib/btxv86.S
  head/stand/i386/btx/lib/btxv86.s
Comment 4 commit-hook freebsd_committer 2018-11-26 19:30:12 UTC
A commit references this bug:

Author: emaste
Date: Mon Nov 26 19:29:18 UTC 2018
New revision: 340991
URL: https://svnweb.freebsd.org/changeset/base/340991

Log:
  stand/i386/libi386: rename .s file 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 are
  assembled with Clang's Integrated Assembler (IAS); rename pxetram.s to
  .S to use IAS as well.

  The generated .text is identical (the entire .o file is not, as Clang
  adds debug info.)

  PR:		205250, 233094
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/stand/i386/libi386/Makefile
  head/stand/i386/libi386/pxetramp.S
  head/stand/i386/libi386/pxetramp.s
Comment 5 Ed Maste freebsd_committer 2018-12-21 19:51:23 UTC
We need to add support for the "/SYM64/" symbol table format to ar to support archives > 4GB in size.
Comment 6 Sean Champ 2020-02-10 12:34:06 UTC
While building without binutils in the base system, using releng/12.1 src, I'd found what may be a couple of quirks, such that I believe may be informative if not simply redundant here.

lib/libmd uses binutils under some build configurations (XAS defined, or not MK_BINUTILS_BOOTSTRAP). I'm not sure if that's been patched for the upcoming changes about binutils in the base system - maybe I've just missed it.

For any other changes that my local build configuration may have bumped into, such that I've noticed that those have been patched under the trunk/master branch, will try to cherry-pick the changesets and test under local build on 12.1.