Skip to content

Commit

Permalink
PKGBUILD: add cross compile support, curtsy of Ankur Kotwal
Browse files Browse the repository at this point in the history
  • Loading branch information
thefossguy committed Mar 7, 2023
1 parent 48f2946 commit 7bc50e1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ source=(01-riscv-makefile.patch
sha512sums=('50006cd147adc770edb936afc3e31c8ac41ac9e2e3249e99aa8736b570cc2dbfb2366946bcfce98c086b7bbe7857093daead9f2136c9ac0225eec3f92c25ff92'
'12d6f609ef48e0e0503fa907b6d5b15114978648740a68dd03ccb5b8b97414bf50b6e8a45bdf16635a2583b6e24e80b6c011e6aa09caf17d72cc04be56c73f0d')

if [ "$(uname -m)" != "riscv64" ]; then
makedepends+=(riscv64-linux-gnu-gcc)
export CARCH=riscv64
export CROSS_COMPILE=riscv64-linux-gnu-
alias strip=riscv64-linux-gnu-strip
fi

export ARCH=riscv
export CFLAGS="-march=rv64imafdc_zicsr_zba_zbb -mcpu=sifive-u74 -mtune=sifive-7-series -O2 -pipe"
export KBUILD_BUILD_HOST=archlinux
Expand Down

0 comments on commit 7bc50e1

Please sign in to comment.