Skip to content

Commit

Permalink
riscv32: fix drivewire, turn off relaxation
Browse files Browse the repository at this point in the history
Unfortunately it seems that this is another GNU toolchain that is too
buggy to build Fuzix stuff. Turn off relaxing in the linker to work
around the mess.
  • Loading branch information
EtchedPixels committed Jul 16, 2023
1 parent 97e2d84 commit c605b75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Applications/dw/Makefile.riscv32
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include Makefile.common
4 changes: 2 additions & 2 deletions Library/link/ldriscv32
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ esac
done

# Link it twice 4K apart
riscv64-linux-gnu-ld -n -m elf32lriscv_ilp32 $ARGS -o "$TARGET.b0" -T "$FUZIX_ROOT/Library/link/riscv32.link"
riscv64-linux-gnu-ld -n -m elf32lriscv_ilp32 $ARGS -o "$TARGET.b1" -T "$FUZIX_ROOT/Library/link/riscv32.link2"
riscv64-linux-gnu-ld -n -m elf32lriscv_ilp32 --no-relax $ARGS -o "$TARGET.b0" -T "$FUZIX_ROOT/Library/link/riscv32.link"
riscv64-linux-gnu-ld -n -m elf32lriscv_ilp32 --no-relax $ARGS -o "$TARGET.b1" -T "$FUZIX_ROOT/Library/link/riscv32.link2"
# Generate a map from the non-offset one
riscv64-linux-gnu-nm -n "$TARGET.b0" > "$TARGET.map"
#riscv64-linux-gnu-nm -n "$TARGET.b1" > "$TARGET.map2"
Expand Down

0 comments on commit c605b75

Please sign in to comment.