Commit Graph

120 Commits

Author SHA1 Message Date
Wildan M 3ab012e441 Switch x86 GCC to i586 2025-11-16 13:23:56 +07:00
bjorn3 782fe53aa4 Support the i586-unknown-redox target
This is necessary to allow switching to unpatched rustc in the future
2025-11-01 15:32:05 +01:00
Wildan Mubarok 3593615918 Revert changes 2025-10-05 16:48:28 +00:00
Wildan M 9351537ca0 Strip conflicting symbols from compiler builtins 2025-10-05 23:42:35 +07:00
Jeremy Soller 82084440ad Support nightly-2025-10-03 2025-10-03 21:51:10 -06:00
Wildan Mubarok 7a4a32e52b Add CC_WRAPPER support 2025-07-04 19:53:50 -06:00
Jeremy Soller b919a83efd Respect CARGO_TARGET_DIR 2025-05-11 15:03:00 -06:00
Jeremy Soller 8312a67d17 Set ld.so path based on target 2025-04-17 09:34:24 -06:00
Josh Megnauth 7eb0968e91 Remove obsolete varargs workaround 2025-02-22 23:53:11 -05:00
Anhad Singh a631703837 cleanup(makefile): unify rule for libc.so
Does the same thing.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2025-01-15 19:16:37 +11:00
Anhad Singh cf21cf24fc feat(libc.so): link flags
* -z pack-relative-relocs
* --sort-common
* --gc-sections

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2025-01-15 13:49:28 +11:00
Anhad Singh aae27c5e0c feat(ld.so): switch to object crate
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2025-01-08 16:50:47 +11:00
Anhad Singh 632716ada7 fix(Makefile): delay
I noticed a pretty significant delay (of ~5s on my machine) after
executing `make`.

This was because TARGET was currently defined as a recursively expanded
variable. This means that the command:

rustc -Z unstable-options --print target-spec-json | grep llvm-target | cut -d '"' -f4

..will get run everytime TARGET is mentioned. This patch fixes the above
by defining the variable as an immediately expanded value. This will
ensure the command only get run once and still skips if predefined.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-17 15:57:17 +11:00
Anhad Singh c286ad2868 fix(ld.so): do not depend on TLS at all
In the next big refactor (next PR), all of the platform functionality
used by both relibc and ld.so will be moved into a `platform`/`sysdeps`
crate and then ld.so would be moved out of relibc and not link with it.

I think doing it in a seperate PR would make it more managable, as when
I did half of it, the diff was pretty huge and that way it would be
easier to review too :)

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-05 23:11:59 +11:00
Anhad Singh b9bef59d8a fix(libc.so): link with libgcc
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-11-25 12:20:32 +11:00
Jeremy Soller 95affabb18 For now, do not build C compiler-rt 2024-10-18 15:52:42 -06:00
Jeremy Soller d7b130942d Include C-only compiler builtins, improves aarch64 target 2024-10-18 15:06:43 -06:00
Andrey Turkin a4122753e6 Initial RISC-V64 support 2024-10-11 06:44:54 +03:00
Ron Williams d2ef712fa7 Improve test running on Redox 2024-10-06 04:26:13 -07:00
4lDO2 d0b02a3fb7 Simplify Makefile and remove debug. 2024-09-12 16:10:28 +02:00
4lDO2 c0e7af5289 Backwards-compatibly rewrite getdents to use special syscall. 2024-09-11 23:32:19 +02:00
Agoston Szepessy 51e264ddf2 Exclude dirs with no cbindgen.toml
Fixes the panic that occurs on builds.
2024-07-21 14:06:35 +02:00
4lDO2 326c8a6231 Split shared ld_so code and actual ld_so stubs. 2024-06-08 11:36:06 +02:00
4lDO2 5630b6e0df Make relibc (except libm) pure Rust 2024-01-11 13:08:06 +00:00
Jeremy Soller 75cc16a559 Add empty libpthread.a 2023-05-11 14:16:51 -06:00
Jeremy Soller 848fde933b Merge branch 'remove_pthreads_emb' into 'master'
Replace pthreads-emb with a native implementation

See merge request redox-os/relibc!380
2023-05-11 13:56:11 +00:00
Jeremy Soller 410e897807 Fix double build when building sysroot 2023-05-11 07:48:23 -06:00
4lDO2 ccfbdc0ae4 Run regular non-expect-based tests too. 2023-05-06 17:02:54 +02:00
4lDO2 5cd110a92b WIP: Add pthread tests. 2023-05-06 17:02:54 +02:00
4lDO2 5b56d6305d Remove pthreads-emb, add custom sched.h 2023-05-06 17:02:50 +02:00
Will Angenent 9ddb2b1b47 Fix symlinking on MacOS that doesn't have the -r option 2023-04-02 13:59:51 +00:00
Jeremy Soller ba87e4893a Create empty libdl and librt libraries 2022-12-19 09:33:39 -07:00
4lDO2 2186cd1fbd Implement fexec in userspace. 2022-07-26 21:32:56 +02:00
Jeremy Soller 559387cc64 Initial support for x86 32-bit 2022-07-22 16:24:45 -06:00
4lDO2 ebd597f748 Update dependencies for rust 2022-03-18. 2022-03-24 17:12:02 +01:00
Jeremy Soller 7f7d73de3c Link crt1.o to crt0.o 2021-08-03 16:11:22 -06:00
Jeremy Soller 606bfc9c50 Weaken more rust symbols 2021-07-18 20:21:12 -06:00
4lDO2 700c53cf17 Update toolchain to 2021-06-15 2021-06-17 22:31:30 +02:00
Jeremy Soller 3c1300e8ec Improvements for aarch64 support 2021-01-11 08:52:20 -07:00
hasheddan e5539a570f Add submodules target to main makefile
Adds a submodules convenience target to main makefile. Submodules must
be initialized before other targets can run successfully.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2020-10-18 13:45:29 -05:00
Jeremy Soller 9529e09568 Force overwrite of libc.so.6 if it exists 2020-10-06 11:12:42 -06:00
Mateusz Tabaka c000373a08 Add symlink from libc.so to libc.so.6
Typically it's the other way around, but we can't have shared library named libc.so.6 in target/release directory.
cargo includes 'target/release' in LD_LIBRARY_PATH for build script, so even if clean build runs fine,
every subsquent run will make build script link with relibc.
2020-09-29 00:08:11 +02:00
Esteban Blanc 9e0e88346d link: Weaken __rust_probestack symbol 2020-09-06 10:26:42 +02:00
Jeremy Soller 3a0d2177cd Variable for weakened symbols, weaken umodti3 2020-08-25 08:21:31 -06:00
Jeremy Soller 5472e117a5 Weaken __fixdfti 2020-08-21 21:28:51 -06:00
Jeremy Soller 7db83596a2 Merge branch 'gcc_compile' into 'master'
Gcc compile

See merge request redox-os/relibc!303
2020-08-14 15:19:14 +00:00
oddcoder 9826cea092 Add SONAME for libc.so
Usually it is possible to refer to library either by the file name or by
elf "soname" soname is very similar for specifying something like
(LIB/API version) combination so if for example you have ./prog that
loads libx.so which is version 5.1.1 and there is ./plugin.so that ./prog
would load that requires libx.so version 5.1.2 both libx.so should have
the same soname to hint that they offer the exact same functionality.
And this patch specifies the soname for relibc libc.so.
2020-08-12 18:57:37 +02:00
jD91mZM2 7b6ba2c73a Merge branch 'lD_PATH' into 'master'
L d path

See merge request redox-os/relibc!300
2020-08-12 10:19:32 +00:00
Ahmed Abd El Mawgood 40328a0d09 Modify ld_script so that it works on linux.
Honestly, I have no idea why are these modifications needed, but it
seams they are needed
2020-08-12 10:19:32 +00:00
jD91mZM2 d827c0f166 Run Linux tests in CI
commit 09cb17e66f46c6687fa0b9dc0895ad3279caa092
Author: jD91mZM2 <me@krake.one>
Date:   Mon Aug 10 18:03:20 2020 +0200

    comment out cargo tests

commit 1915c7306e40f5c6af36b04c765e25ad9ffe9d16
Author: jD91mZM2 <me@krake.one>
Date:   Mon Aug 10 17:58:52 2020 +0200

    Update redoxer docker image
2020-08-11 11:14:13 +02:00