Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Newlib binary and allocator support #20

Closed
wants to merge 7 commits into from
Closed

Add Newlib binary and allocator support #20

wants to merge 7 commits into from

Commits on Feb 20, 2020

  1. Add Newlib binary and allocator support

    Adds builds of newlib-3.3.0, and implement an allocator in n64lib which
    uses this.
    
    Newlib was configured as follows:
    
        CFLAGS_FOR_TARGET="-DPREFER_SIZE_OVER_SPEED=1 -Os -G0 -mabi=32 -mno-gpopt" \
            ../configure --target=mips-elf
    
    libc.a and libm.a are bundled in the cargo-n64 executable, and written
    to the temp directory where the other temporary build artifacts are
    placed (linker script, for example).
    
    Since our sbrk() starts returning memory at the end of the .bss section,
    up the alignment of this in the linker script to 16 bytes.
    
    Also enable the 'noabicalls' feature in the target.json. This is the
    default in GCC with the mips-elf target, but not for LLVM. The linker
    will emit some warnings without this.
    Kjartan Skjervøy committed Feb 20, 2020
    Configuration menu
    Copy the full SHA
    5b30b35 View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2020

  1. Fix clippy warning for &'static in a static var

    Kjartan Skjervøy committed Feb 25, 2020
    Configuration menu
    Copy the full SHA
    73b6c3c View commit details
    Browse the repository at this point in the history
  2. Vendor-gate platform specific modules in n64lib

    Kjartan Skjervøy committed Feb 25, 2020
    Configuration menu
    Copy the full SHA
    d380459 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2020

  1. Fix sbrk implementation

    Should return the previous pointer, rather than the incremented one.
    Kjartan Skjervøy committed Feb 26, 2020
    Configuration menu
    Copy the full SHA
    50cd582 View commit details
    Browse the repository at this point in the history

Commits on Feb 29, 2020

  1. Remove -lm and fix error message

    Kjartan Skjervøy committed Feb 29, 2020
    Configuration menu
    Copy the full SHA
    ba419a6 View commit details
    Browse the repository at this point in the history
  2. Use memalign instead of malloc to honor layout

    Kjartan Skjervøy committed Feb 29, 2020
    Configuration menu
    Copy the full SHA
    e039332 View commit details
    Browse the repository at this point in the history
  3. Add util::loop_forever() to avoid LLVM UB

    As described in:
    rust-lang/rust#28728
    Kjartan Skjervøy committed Feb 29, 2020
    Configuration menu
    Copy the full SHA
    ea888be View commit details
    Browse the repository at this point in the history