Commit Graph

150 Commits

Author SHA1 Message Date
Jeremy Soller
5e3bcaee08
Add custom target for compiling relibc-freestanding for riscv64gc 2025-04-17 10:10:29 -06:00
Jeremy Soller
cde151ccb7
Drop rust freestanding step 2025-01-14 12:28:58 -07:00
Jeremy Soller
74f0a0eea1 Merge branch 'dynamic_linking' into 'master'
feat(prefix): set default hash style to GNU

See merge request redox-os/redox!1537
2025-01-11 18:39:40 +00:00
Ron Williams
0bf3a56fea Add 'touch sysroot' after copy of relibc-install 2025-01-09 16:15:58 -08:00
Anhad Singh
48ca562cf1
feat(prefix): set default hash style to GNU
Our dynamic linker supports it.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2025-01-09 20:20:21 +11:00
Anhad Singh
34153db14d
fix(prefix.mk): gcc-freestanding
Build libgcc (relibc needs it) and disable shared.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-27 23:23:31 +11:00
Anhad Singh
a7c06e9b72
fix(mk/prefix.mk): fix libtool build
Worked for me before as I had the old sources. Now the ltversion should
be correct and libtool should be correctly built.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-21 20:28:11 +11:00
Anhad Singh
f8d2c7ed4b
fix(mk/prefix.mk): correct ltversion
The script `build-aux/git-version-gen` needs sufficient depth to
correctly determine the version. Also it has to be in tree, otherwise
the version is reported as 'UNKNOWN', breaking some packages.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-21 01:09:52 +11:00
Anhad Singh
008160036d
feat(prefix): libtool
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-02 22:21:45 +11:00
Andrey Turkin
03633046cc Riscv64gc support in the build scripts
This architecture is different from x86/aarch because its rust triplet (riscv64gc-...) differs from gcc/llvm/binutils triplet (more general riscv64-...). Therefore the build scripts have to bridge that mismatch.

This introduces new build-time environment variable GNU_TARGET which corresponds to a target used by C world utilities whereas existing TARGET now describes rust target.
2024-09-30 10:28:37 +03:00
Ribbon
49102f6332 Add explanation comments on the build system files 2024-07-09 12:58:07 +00:00
Jeremy Soller
50c9d3d2ce
Use separate copy of relibc for freestanding 2024-05-11 15:42:00 -06:00
Jeremy Soller
f9823473e2
Use target-specific folder for relibc source for freestanding build 2024-05-11 14:37:47 -06:00
Jeremy Soller
7de457e022
Ensure lib/rustlib/HOST_TARGET/lib exists in prefix tarballs 2024-01-10 09:53:13 -07:00
bjorn3
34acc9cb04 Don't checkout rust submodule by default
It is no longer necessary for regular builds as of the previous commit.
This will drastically improve the time it takes to do the initial clone
of redox.
2024-01-10 15:19:06 +01:00
bjorn3
da380dd368 Don't rebuild lib/rustlib/src in the rust sysroot
The prebuilt tarball already contains it now
2024-01-09 11:05:06 +01:00
Jeremy Soller
7bec121856
Fix clean prefix build 2023-12-13 12:10:42 -07:00
Jeremy Soller
89749d3722
Copy relibc source to prefix to prevent problems when running multiple arch builds at once 2023-12-12 13:49:45 -07:00
Jeremy Soller
69183b3bd8
Clean relibc before build 2023-09-11 12:44:10 -06:00
Jeremy Soller
498deea753
Fix name of binutils tarball 2023-09-08 14:18:17 -06:00
Jeremy Soller
6f171b0ac0
Update binutils and gcc 2023-09-08 13:23:41 -06:00
uuuvn
0da79d81b4
Build rustlib/src together with prefix 2023-05-22 08:42:41 +00:00
Will Angenent
2b1619c1e0 Unset CC and CXX before building prefix, since they could interfere 2023-04-15 18:33:35 +01:00
Jeremy Soller
0427f3ff8c
Update Rust to nightly-2023-01-21 2023-02-11 14:01:00 -07:00
Jeremy Soller
5b4ee80e10 Build Rust source tarball as part of rust-install 2022-12-18 08:06:28 -07:00
Ron Williams
1772f78aa9 Add podman build 2022-11-11 15:23:08 -08:00
Jeremy Soller
a99e4904ec Build lld support for rust 2022-08-16 17:09:46 -06:00
Jeremy Soller
d97d841c18
mk/prefix.mk: Use correct host target 2022-07-26 07:38:01 -06:00
4lDO2
150253bfbc
Update toolchain to 2022-03-18 2022-03-27 13:30:27 +02:00
Jeremy Soller
17bf88b390
Ensure that REDOXER_TOOLCHAIN is set for all makefile targets 2021-07-18 20:48:01 -06:00
Jeremy Soller
db157bc963
Attempt to build HOST_TARGET in rust-install 2021-07-12 07:29:29 -06:00
Jeremy Soller
b35a91576d
Workarounds for compilation issues 2021-06-18 13:54:40 -06:00
Jeremy Soller
848c3f9ec1
Fix incorrect path when copying from rust install to relibc install 2021-06-18 13:44:00 -06:00
4lDO2
97cab676c1
Update toolchain to nightly-2021-06-15. 2021-06-18 09:28:35 +02:00
Robin Randhawa
b9f43dd529 Switch kernel builds away from using xargo
Use cargo's 'build-std=core,alloc' instead.

Also: Cargo is now given the complete path to the target specific JSON file.
This forces the use of the JSON file (the file is silently ignored if
the target in question was built into the rust compiler).
2020-10-06 14:00:30 +01:00
Jeremy Soller
8703773f76
Undo CFLAGS hack after finding cause 2020-07-17 14:16:43 -06:00
Jeremy Soller
abe99bba7c
Set march to x86-64 in CFLAGS and CXXFLAGS when compiling prefix 2020-07-15 15:41:14 -06:00
Jeremy Soller
1b3ded69be
Attempt to compile binutils and gcc for generic x86_64 2020-07-15 13:10:16 -06:00
Mark Harris
3f3c8a23a3
Fix build of rust-install 2020-06-12 09:16:36 -07:00
Jeremy Soller
52982d83a4
Fix relibc-freestanding path 2020-06-06 21:12:15 -06:00
Jeremy Soller
b830f48d20 Update prefix.mk 2020-06-01 20:33:30 +00:00
Jeremy Soller
52b8045fc5
Use gcc-install as base of rust-install and fix compilation of relibc-freestanding-install 2020-05-28 16:39:56 -06:00
Jeremy Soller
34d4e2dcfd
Clean up prefix and fix PREFIX_BINARY=0 build 2020-05-28 14:55:57 -06:00
Jeremy Soller
92b9c3892f
Set RUSTUP_TOOLCHAIN to rust-install by default 2020-05-22 19:54:57 -06:00
Jeremy Soller
621066cb53
Remove PREFIX_RUSTC 2020-05-22 16:00:40 -06:00
Jeremy Soller
5be4d46b50
Set relibc base depending on PREFIX_BINARY and PREFIX_RUSTC 2020-05-22 15:55:19 -06:00
Jeremy Soller
5d6a610024
Download rust-install if PREFIX_BINARY is 1 2020-05-22 15:45:13 -06:00
Xavier L'Heureux
bed8fcc41a
Start adding basic support for FreeBSD 2020-05-02 20:13:21 -04:00
Graham MacDonald
cfc3d24fe5 Simplify relibc install steps 2020-03-29 10:41:51 +01:00
Jeremy Soller
175039bded
Revert "Fix .partial paths"
This reverts commit 8cccf0edaa.
2020-01-21 19:39:28 -07:00
Tibor Nagy
8cccf0edaa Fix .partial paths
Fixes #1283
2020-01-14 17:24:22 +01:00
jD91mZM2
fc39474f3f
Fix xargo deadlock 2019-08-10 18:01:42 +02:00
Jeremy Soller
c35d9e39f7
Link to stdcpp statically 2019-06-20 18:38:54 -06:00
Jeremy Soller
f4786da9be
Compile cargo statically 2019-06-20 18:37:26 -06:00
Jeremy Soller
2dd140995d
Remove freestanding rust files as much as possible from rust install, build cargo only 2019-06-19 21:19:59 -06:00
Jeremy Soller
c3be572aa5
Build rust toolchains with tools like cargo 2019-06-19 20:09:48 -06:00
jD91mZM2
99d181f13d
Remove nix-related patches and files
Everything has now been moved to
https://gitlab.redox-os.org/redox-os/redox-nix :)
2019-06-17 15:22:00 +02:00
Jeremy Soller
b94a77d9b9
Remove duplicate rust-install target 2019-06-15 09:05:12 -06:00
jD91mZM2
a95d366047
Fix PREFIX_BINARY for NixOS users 2019-06-11 17:00:06 +02:00
Jeremy Soller
84062b7e11
Add full rust toolchain tarball 2019-05-14 21:15:08 -06:00
Jeremy Soller
344f9b3044
Set use PREFIX_RUSTC when using PREFIX_BINARY 2019-04-20 10:37:26 -06:00
Jeremy Soller
f81513eb5a
Fix failure to statically link 2019-04-19 21:24:21 -06:00
Jeremy Soller
bdf32d1873
Also strip libraries using --strip-unneeded 2019-04-15 21:19:54 -06:00
Jeremy Soller
bb2b3fa60b
Remove libtool files 2019-04-15 21:19:40 -06:00
Jeremy Soller
f903bc383b
Do not allow multilib 2019-04-15 21:07:50 -06:00
Jeremy Soller
185fd55884
Fix build of gcc-freestanding 2019-04-12 11:32:09 -06:00
Jeremy Soller
78d75cdc73
Fix prefix 2019-04-11 15:20:37 -06:00
Jeremy Soller
ea0e7fa0c2
Enable shared libraries 2019-04-10 20:49:09 -06:00
Jeremy Soller
13add4c0f8
Fix build of relibc-freestanding 2019-04-07 16:39:27 -06:00
Jeremy Soller
5c09549072
It looks like gcc-install still needs C libs 2019-04-07 11:27:20 -06:00
Jeremy Soller
137db4615a
Fix build of prefix 2019-04-07 10:12:28 -06:00
Jeremy Soller
ebee179b5b
Only build headers for relibc freestanding install 2019-04-07 09:55:45 -06:00
Jeremy Soller
d0eee110bd
Fix PREFIX_BASE_INSTALL definition 2019-03-31 15:55:14 -06:00
Jeremy Soller
6f6de7507b
Include custom Rust when compiling with PREFIX_RUSTC 2019-03-29 20:57:33 -06:00
Jeremy Soller
278478d42a
Add PREFIX_BASE variables that point to either binutils or rust 2019-03-29 20:50:38 -06:00
Jeremy Soller
f2a38f35af
Building rust does not require gcc freestanding 2019-03-29 20:46:23 -06:00
Robin Randhawa
a5d04a31e3 prefix: Fix RUSTUP_TOOLCHAIN spec
Needs full path to PREFIX_FREESTANDING_INSTALL.
2019-03-24 00:05:54 +00:00
Robin Randhawa
8c3241e7a6 prefix: Fix build breakage due to invalid prefix argument
Building a rust compiler for x86_64-unknown-redox using:

$ PREFIX_RUSTC=1 PREFIX_BINARY=0 make prefix

fails with a message citing 'could not canonicalize prefix path'. As
seen in rust/bootstrap/install.rs:

https://gitlab.redox-os.org/redox-os/rust/blob/redox/src/bootstrap/install.rs#L77

.. the expectation is that either the '--prefix' argument passed to
rust's configure script is a valid path or not specified at all (in
which case a correct default is used).

This patch uses the former approach resulting in a correct build.
2019-03-23 22:15:40 +00:00
Robin Randhawa
548b946f88 Fix incorrect path to rust's configure script
Needed to build rustc from source using:

$ PREFIX_RUSTC=1 PREFIX_BINARY=0 make prefix
2019-03-18 17:31:17 +00:00
Jeremy Soller
2c4f853c4a
Fix issue with binutils missing libexec 2019-03-16 21:47:10 -06:00
Jeremy Soller
8a75b46e8a
Update prefix strip to prevent stripping libgcc 2019-03-16 21:37:06 -06:00
Jeremy Soller
68883b867d
Strip only host binaries 2019-03-16 21:29:33 -06:00
Jeremy Soller
7402f72531
Do not keep build directories 2019-03-16 21:20:02 -06:00
Jeremy Soller
6c6e989437
Strip all prefix binaries 2019-03-16 21:11:08 -06:00
Jeremy Soller
4105029d0d
Also create relibc toolchain tarball 2019-03-16 20:01:34 -06:00
Jeremy Soller
f947d2b0dd
Fix issue with not clearing out old gcc-install when extracting new one 2019-03-16 19:54:24 -06:00
Jeremy Soller
40d9117b17
Makefile cleanup, default to binary prefix 2019-03-16 19:50:08 -06:00
Jeremy Soller
7f9a82752d
Significant changes to prefix in order to generate path agnostic toolchain. Addition of ci-toolchain target 2019-03-16 19:09:43 -06:00
Jeremy Soller
ad559bfec5
Update to add pthread support to gcc and c++ 2018-12-14 16:01:31 -07:00
Jeremy Soller
878abd66d2
Cleanup for gcc make targets 2018-11-27 20:47:13 -07:00
Jeremy Soller
0fd0a2d895
Enable c++ 2018-11-27 20:36:09 -07:00
Jeremy Soller
373566aee5
Update prefix logic from aarch64 2018-11-27 19:55:15 -07:00
Jeremy Soller
9cece170b1
Backport prefix changes from aarch64 2018-11-27 19:45:52 -07:00
Jeremy Soller
b2bfc74fe2
Improve definition of targets for prefix 2018-11-26 13:28:51 -07:00
Jeremy Soller
5d256f4996
Use xargo to compile relibc, to allow patching of rust core and alloc 2018-11-11 08:14:01 -07:00
Jeremy Soller
e90ab78641 Fix incorrect clean in prefix build 2018-09-17 21:30:15 -06:00
Jeremy Soller
580287392b - Do not copy relibc before building
- Remove debug section from live kernel as well
2018-09-15 07:25:49 -06:00
Jeremy Soller
dea9942d27 Set path to include binutils when building freestanding gcc 2018-08-19 14:11:29 -06:00
Jeremy Soller
233295bc17 Specify prefix as a dependency 2018-08-17 18:47:48 -06:00
Jeremy Soller
2027210677 Update relibc 2018-08-17 18:41:27 -06:00