mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
* added switch statement to link musl-based linux distros to ld-musl-x86-64.so.2
* Update linker.c
/lib/ld-musl-x86-64.so.1 is musl's ld so. My bad
* don't need ENV_MUSLEABI.* in the switch for x86_64
* typo
* Added a CI test for an Alpine Linux container
* Update main.yml
Forgot to have bundle_output job use `env.LLVM_RELEASE_VERSION_ALPINEv3_22`.
* Added env.LLVM_RELEASE_VERSION_ALPINEv3_22 to `upload artifacts`
* changed bundle name to c3-musl-${{matrix,build_type}}.tar.gz
* Undid an accidental name change in build-linux-ubuntu22
* Update main.yml
sudo doesn't exist in alpine by default, and runs in root by default.
* Update main.yml
* Update main.yml
* Update main.yml
* Update main.yml
`--linker=builtin` fails because it forces search of `/lib64/ld-linux-x86-64.so.2`. lib64 doesn't exist on musl unless created as a symlink, and the appropriate so is /lib/ld-musl-<arch>.so.1
* Update main.yml
* Update main.yml
* Update main.yml
* Update main.yml
make isn't in alpine by default. added it in for risc-v example.
* gcc-riscv-none-elf is alpine's package
* using realpath for c3c over using relative pathing
* Have to use relative path for arguments in compiler test
* added --linker=builtin to
* Added linux-musl-<arch> targets
* Added more ld targets for glibc
* set both testproject libs as folders until they behave better
* added linux-musl-x64 target to clib2
* added riscv targets for ld-linux
* ubuntu doesn't have ld in /lib, but solely in /lib64?
* Make MUSL distinct from the target.
* Fix default in project schema
* Fix define
* Fix manifests.
* Update main.yml
add --linux-libc flag for builtin linking
* Grammar refresh
* Update releasenotes.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
24 lines
828 B
Makefile
24 lines
828 B
Makefile
SRCS_C3 := $(wildcard *.c3)
|
|
|
|
default: hello.elf
|
|
|
|
hello.a: $(SRCS_C3)
|
|
$(C3C_PATH)c3c -g --use-stdlib=no --no-entry --target elf-riscv32 static-lib $(SRCS_C3)
|
|
|
|
start.o: start.s
|
|
riscv64-unknown-elf-as -g -march=rv32i -mabi=ilp32 -misa-spec=20191213 -o start.o start.s \
|
|
|| riscv-none-elf-as -g -march=rv32i -mabi=ilp32 -misa-spec=20191213 -o start.o start.s
|
|
|
|
hello.elf: hello.a start.o baremetal.ld
|
|
riscv64-unknown-elf-ld -T baremetal.ld -m elf32lriscv -o hello.elf hello.a start.o \
|
|
|| riscv-none-elf-ld -T baremetal.ld -m elf32lriscv -o hello.elf hello.a start.o
|
|
|
|
run: hello.elf
|
|
qemu-system-riscv32 -nographic -serial mon:stdio -machine virt -semihosting -bios hello.elf
|
|
|
|
debug: hello.elf
|
|
qemu-system-riscv32 -nographic -serial mon:stdio -machine virt -semihosting -s -S -bios hello.elf
|
|
|
|
clean:
|
|
rm -f *.o *.a hello.elf
|