Skip to content

Conversation

@am11
Copy link

@am11 am11 commented May 25, 2020

With this script present in the official repository, both rust and dotnet can source it from a single source of truth. e.g. https://github.com/am11/arcade/blob/cc67bb38f3bcafe34c3d04b92cb04747b3d58a97/eng/common/cross/build-rootfs.sh#L284

I have made some modifications (additional commits) on @jclulow's original script from his rust fork.

  • Cherry-pick initial commit from jclow/rust.
  • Parameterize SYSROOT_DIR.
  • Rev binutils to 2.33.1.
    • with v2.25.1, we were getting the relocation error from assembler (as) or archiever (ar?):
      ....pal/src/libcoreclrpal.a(context2.S.o): warning: relocation against CONTEXT_CaptureContext' in readonly section .text'.
      ....pal/src/libcoreclrpal.a(context2.S.o): relocation R_X86_64_PC32 against symbol `CONTEXT_CaptureContext' can not be used when making a shared object; recompile with -fPIC
      ....final link failed: Bad value
    • only revving buildutils version fixed the error above and build went through (without any code modifications).
  • Overwrite existing links.
    • when we re-run the script, ln -fs (instead of ln -s) avoids removing the existing links.
  • Remove xtrace.
    • we can use bash -x scripts/gcc-toolchain.sh.

@am11
Copy link
Author

am11 commented May 25, 2020

cc @jclulow, please take a look. :)

Aside, I have not yet figured out how to include these few headers in sysroot's Makefile: https://github.com/am11/arcade/blob/cc67bb38f3bcafe34c3d04b92cb04747b3d58a97/eng/common/cross/build-rootfs.sh#L313. If you could help getting those headers in the sysroot's next release, that would be great. Meanwhile, I am fetching them from illumos-gate repo for dotnet libraries build.

@am11
Copy link
Author

am11 commented Jun 2, 2020

As per the discussion on IRC, due to the different version requirements in various downstreams, I have inlined this script in: dotnet/arcade#5584.

When next release of sysroot will pick up the missing headers, I will cleanup the wget calls to acquire those headers from illumos-gate repository.

@am11 am11 closed this Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants