A versatile (cross-)toolchain generator.
Go to file
Hans-Christian Noren Egtvedt 146fee59bc packages:mold: add version 2.33.0
Add newly released mold version 2.33.0 from upstream
https://github.com/rui314/mold

New features
- mold gained a new linker flag --separate-debug-file to bundle debug
  info sections into a separate file instead of putting them into a main
  output file. You can optionally specify a filename in the form of
  --separate-debug-file=<filename>. By default, a debug info file is
  created in the same directory as the main output file with the .dbg
  extension. mold embeds the debug file's filename into the main output
  file so that gdb can automatically follow the link to find debug info
  when debugging the main output file.

- The main objective of this flag is to speed up the mold linker even
  more. By default, mold creates a separate debug file in the background
  after creating a main output file, so that you can start running the
  executable as soon as possible while mold is still working on linking
  its debug info sections. For example, linking clang with debug info
  normally takes ~1.70s on a Threadripper 7980X machine, while it takes
  only ~0.52s with --separate-debug-info. Shaving off a full second in
  quick edit-rebuild-run cycles should improve programmers'
  productivity. If you do not want mold to work in the background, pass
  the --no-detach option. (596ffa9)

- mold now supports the --no-allow-shlib-undefined flag. If the option
  is given, mold checks if all undefined symbols are resolved not only
  for input object files but also for shared libraries passed to the
  linker. To use the feature, you need to pass all shared libraries,
  including transitively dependent ones, to the linker so that the
  linker can resolve all symbols that are available at runtime.
  (3001f02)

- mold gained the --dynamic-list-data flag for the sake of compatibility
  with GNU ld. If the flag is given, all data symbols are exported as
  dynamic symbols. (dd8d971)

- [x86-64] -z x86-64-v2, -z x86-64-v3, -z x86-64-v4 flags are supported.
  (5606087)

Bug fixes and compatibility improvements
- [x86-64] Recent x86-64 processors support Intel CET to protect control
  flow integrity. When the feature is enabled, the instruction that is
  executed immediately after an indirect branch must be endbr64 or a CPU
  fault will raise. In other words, it restricts the locations where the
  control can transfer to with indirect branches. Doing that makes ROP
  attacks harder to conduct.

- A problem with that is the compiler needs to conservatively emit an
  endbr64 at the beginning of each global function because the compiler
  doesn't know whether or not the function's address is taken in other
  translation units. As a result, the resulting binary contains more
  endbr64s than necessary, weakening the protection.

- mold supports the -z rewrite-endbr option to conduct a whole program
  analysis and rewrite endbr64 with nop if a function's address is not
  actually taken within the program. Previously, mold didn't take
  section symbols into account when conducting the analysis, which
  resulted in culling some endbr64s that must not be removed. Now, the
  bug has been fixed. We confirmed that mold can build itself with -z
  rewrite-endbr, and the resulting mold executable works fine with Intel
  CET. (ed7eec5)

- mold now creates a .eh_frame section even if it's empty. (14a4b05)

- [LoongArch] The following relocations are now supported:
  R_LARCH_TLS_LE_HI20_R, R_LARCH_TLS_LE_ADD_R, R_LARCH_TLS_LE_LO12_R,
  R_LARCH_CALL36, R_LARCH_RELAX (36e5b4b, 98a7cff, 2c6f379)

- [LoongArch] Some relaxations that reduce the section size are now
  supported. (74b359f, 121f917)

- [LoongArch] Range extension thunk support has been removed in favor of
  R_LARCH_CALL36 relocations. (47c092a)

Signed-off-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>
2024-08-22 13:02:56 +12:00
.github/workflows musl: Mark not EXPERIMENTAL 2024-05-24 10:14:13 +12:00
bash-completion Add upgrade logic to version-check.sh 2019-01-27 22:55:26 -08:00
config binutils: Allow gold to be statically linked 2024-07-29 13:12:59 +12:00
contrib/gcc-test-suite contrib: Remove openrisc-or32.patch.lzma 2022-02-11 15:05:23 +13:00
debian Add missing dependencies for Debian build 2023-03-01 20:06:29 +13:00
docs User manual installation 2018-04-07 12:03:17 -07:00
kconfig kconfig: Use ncurses location determined by ./configure 2022-02-28 20:59:14 +13:00
licenses.d Rename directory "licenses" to "licenses.d" for those filesystems unable to handle lower/upper case. 2007-03-11 09:46:22 +00:00
m4 m4/ctng_python.m4: Use AC_PATH_PROGS for full path 2023-11-02 20:48:53 +13:00
maintainer maintainer/manage-packages.sh: Fix typo 2023-02-01 21:58:43 +13:00
packages packages:mold: add version 2.33.0 2024-08-22 13:02:56 +12:00
samples Add support for newer Oracle Linux toolchain versions 2024-06-26 14:55:01 +12:00
scripts scripts: Save toolchain config as regular file 2024-07-29 13:13:26 +12:00
testing testing/docker: Document policy 2022-05-15 11:19:49 +12:00
.gitignore Update .gitignore: Ignore .DS_Store on MacOS 2022-07-01 16:34:01 +12:00
.yamllint Minor yaml cleanup 2023-03-14 08:56:50 +13:00
bootstrap Add mold linker build 2024-06-05 19:31:45 +12:00
configure.ac Check for bash version 4 or higher 2024-03-08 09:56:12 +13:00
COPYING Update and clarify COPYING (plus a typo). 2008-09-14 18:20:03 +00:00
ct-ng.in Add mold linker build 2024-06-05 19:31:45 +12:00
issue_template.md Doc renames & issue template 2017-04-13 00:07:29 -07:00
LICENSE Doc renames & issue template 2017-04-13 00:07:29 -07:00
Makefile.am Do not process 'packages' folder twice 2023-08-21 20:31:24 +12:00
paths.sh.in Make checking for python more predictable. 2023-03-16 16:54:05 +13:00
README.md Fix typo in README.md 2021-01-12 14:12:14 -06:00
TODO Add gnatls & gnatlink 2023-11-02 20:48:03 +13:00

Crosstool-NG

Introduction

Crosstool-NG aims at building toolchains. Toolchains are an essential component in a software development project. It will compile, assemble and link the code that is being developed. Some pieces of the toolchain will eventually end up in the resulting binaries: static libraries are but an example.

Before reporting a bug, please read bug reporting guidelines. Bugs that do not provide the required information will be closed without explanation.

Refer to documentation at crosstool-NG website for more information on how to configure, install and use crosstool-NG.

Note 1: If you elect to build a uClibc-based toolchain, you will have to prepare a config file for uClibc with <= crosstool-NG-1.21.0. In >= crosstool-NG-1.22.0 you only need to prepare a config file for uClibc(or uClibc-ng) if you really need a custom config for uClibc.

Note 2: If you call ct-ng --help you will get help for make(2). This is because ct-ng is in fact a make(2) script. There is no clean workaround for this.

Repository layout

To clone the crosstool-NG repository:

git clone https://github.com/crosstool-ng/crosstool-ng

Build Status

  • CI

Old repositories

These are the old Mercurial repositories. They are now read-only: http://crosstool-ng.org/hg/

Pull Requests and Issues

You can find open Pull Requests on GitHub here and you can find open issues here.

Contributing

To contribute to crosstool-NG it is helpful to provide as much information as you can about your change, including any updates to documentation (if appropriate), and test... test... test.

git clone https://github.com/crosstool-ng/crosstool-ng
  • Create a topic branch for your work
git checkout -b fix_comment_typo
  • Make changes
  • hack
  • test
  • hack
  • etc...
  • Add your changes
git add [file(s) that changed, add -p if you want to be more specific]
  • Verify you are happy with your changes to be commited
git diff --cached
  • Commit changes
git commit -s

The -s automatically adds your Signed-off-by: [name] <email> to your commit message. Your commit will be rejected without this.

Also, please explain what your change does. "Fix stuff" will be rejected. For examples of good commit messages, read the changelog.

  • Push your topic branch with your changes to your fork
git push origin fix_comment_typo
  • Go to the crosstool-ng project and click the Compare & pull request button for the branch you want to open a pull request with.
  • Review the pull request changes, and verify that you are opening a pull request for the appropriate branch. The title and message should reflect the nature/theme of the changes in the PR, say the title is Fix comment typos and the message details any specifics you can provide.
  • You might change the crosstool-ng branch, if you are opening a pull request that is intended for a different branch. For example, when you created your topic branch you could have done:
git checkout -b fix_out_of_date_patch origin/1.22

Then when you get to this pull request screen change the base branch from master to 1.22

  • By creating a pull request, the PR is entered into the backlog. A travis-ci job will run to test your changes against a select set of samples. As they start to get worked, they should be placed in the Ready state. PRs that are being worked are In Progress. If a questions come up about the commit that might involve changes to the commit then the PR is placed in Waiting For Response, you have two options:
  1. Fix the issue with the commit by adding a new commit in the topic branch that fixes the code review. Then push your changes to your branch. This option keeps the comments in the PR, and allows for further code review. I personally dislike this, because people are lazy and fix reviews with fix more review issues. Please make good commit messages! All rules about commits from above apply! THIS IS PREFERED

Add your changes

git add [file(s) that changed, add -p if you want to be more specific]

Verify you are happy with your changes to be commited

git diff --cached

Commit changes

git commit -s
  • Push your topic branch with your changes to your fork
git push origin fix_comment_typo

At this point the PR will be updated to have the latest commit to that branch, and can be subsequently reviewed.

  1. Interactively rebase the offending commit(s) to fix the code review. This option is slightly annoying on Github, as the comments are stored with the commits, and are hidden when new commits replace the old commits. They used to disappear completely; now Github shows a grey 'View outdated' link next to the old commits.

This recipe also comes handy with other issues, like your topic branch not being up-to-date with master:

git fetch --all
git rebase --ignore-whitespace origin master
git rebase -i <offending-commit-id>^

NOTE: The --ignore-whitespace stops git apply (which is called by rebase) from changing any whitespace when it runs.

Replace pick with edit or remove the line to delete a commit. Fix the issue in the code review.

git add [file(s)]
git rebase --continue
<update commit comment if needed>
git push --force origin fix_comment_typo

Patchwork

We previously used patchwork for development, but it is no longer used. I'd like to see patches that are still applicable turned into Pull Requests on GitHub.

You can find the list of pending patches available on patchwork.

More Info

You can find all of this and more at crosstool-ng.org

Report issues at the project site on GitHub.

We have a mailing list. Archive and subscription info can be found here: https://sourceware.org/ml/crossgcc/

Aloha! :-)