Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,23 @@ The following is a non-exhaustive list of `$(TARGET)` tuples that are
believed to work:

- `aarch64[_be]-linux-musl`
- `arm[eb]-linux-musleabi[hf]`
- `arm-linux-musleabi[hf]`
- `armeb-linux-musleabi[hf][be8]`
- `i*86-linux-musl`
- `loongarch64-linux-musl[sf]`
- `m68k-linux-musl`
- `microblaze[el]-linux-musl`
- `mips-linux-musl`
- `mips[el]-linux-musl[sf]`
- `mips64[el]-linux-musl[n32][sf]`
- `mips[isa32][el]-linux-musl[sf]`
- `mipsisa32r2[el]-linux-musl[nan2008][sf]`
- `mipsisa32r6[el]-linux-musl[sf]`
- `mips[isa]64[el]-linux-musl[n32][sf]`
- `mipsisa64r2[el]-linux-musl[n32][nan2008][sf]`
- `mipsisa64r6[el]-linux-musl[n32][sf]`
Comment on lines -54 to +62

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine this will be confusing, so to clarify:

  • MIPS r2 added optional support for nan2008.
  • MIPS r6 made nan2008 mandatory.
  • Earlier MIPS versions only supported the legacy format.

I'm also listing the r6 targets on their own since r6 is effectively a distinct ISA due to instruction encoding changes.

- `or1k-linux-musl`
- `powerpc-linux-musl[sf]`
- `powerpc64[le]-linux-musl`
- `riscv64-linux-musl`
- `riscv32-linux-musl[f32|sf]`
- `riscv64-linux-musl[f32|sf]`
- `s390x-linux-musl`
- `sh*[eb]-linux-musl[fdpic][sf]`
- `x86_64-linux-musl[x32]`
Expand Down
28 changes: 28 additions & 0 deletions litecross/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ ifneq ($(findstring powerpc64,$(TARGET)),)
GCC_CONFIG_FOR_TARGET += --with-abi=elfv2
endif

ifneq ($(findstring nan2008,$(TARGET)),)
GCC_CONFIG_FOR_TARGET += --with-nan=2008
endif

ifneq ($(findstring mips64,$(TARGET))$(findstring mipsisa64,$(TARGET)),)
ifneq ($(findstring n32,$(TARGET)),)
GCC_CONFIG_FOR_TARGET += --with-abi=n32
Expand All @@ -40,13 +44,37 @@ GCC_CONFIG_FOR_TARGET += --with-long-double-128
endif

ifneq ($(filter %sf,$(TARGET)),)
ifeq ($(findstring loongarch,$(TARGET)),)
ifeq ($(findstring riscv,$(TARGET)),)
GCC_CONFIG_FOR_TARGET += --with-float=soft
endif
endif
endif
Comment on lines 46 to +52

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GCC does not accept --with-float=... for LoongArch and RISC-V, which is why we need --with-abi=... stuff below.


ifneq ($(filter %hf,$(TARGET)),)
GCC_CONFIG_FOR_TARGET += --with-float=hard
endif

ifneq ($(filter armeb%be8,$(TARGET)),)
GCC_CONFIG_FOR_TARGET += --with-arch=armv7-a
endif

ifneq ($(filter riscv32%f32,$(TARGET)),)
GCC_CONFIG_FOR_TARGET += --with-arch=rv32imafc_zicsr_zifencei --with-abi=ilp32f
endif

ifneq ($(filter riscv32%sf,$(TARGET)),)
GCC_CONFIG_FOR_TARGET += --with-arch=rv32imac_zicsr_zifencei --with-abi=ilp32
endif

ifneq ($(filter riscv64%f32,$(TARGET)),)
GCC_CONFIG_FOR_TARGET += --with-arch=rv64imafc_zicsr_zifencei --with-abi=lp64f
endif

ifneq ($(filter riscv64%sf,$(TARGET)),)
GCC_CONFIG_FOR_TARGET += --with-arch=rv64imac_zicsr_zifencei --with-abi=lp64
endif
Comment thread
alexrp marked this conversation as resolved.

ifneq ($(LIBTOOL),)
LIBTOOL_ARG = LIBTOOL=$(LIBTOOL)
endif
Expand Down