Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
toolchain build: allow install/build/source prefixes to be overridden. (
Browse files Browse the repository at this point in the history
#210)

* toolchain build: allow install/build/source prefixes to be overridden.
* toolchain/README.md: describe how to override INSTALLPREFIX and friends.
  • Loading branch information
gsmecher committed Feb 4, 2023
1 parent b9e5e3c commit 7347087
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
12 changes: 11 additions & 1 deletion toolchain/README.md
Expand Up @@ -13,7 +13,17 @@ This repository uses submodules for Newlib, GCC and Binutils.

There is a script provided which will build all of the required elements for the toolchain, along with standard libraries

$ sh gcc.sh
$ ./gcc.sh

This script uses the following default paths:

* `INSTALLPREFIX`: prefix/
* `BUILDPREFIX`: build/
* `SRCPREFIX`: .

These paths can be overridden as follows:

$ INSTALLPREFIX=/usr/local ./gcc.sh

## Install

Expand Down
6 changes: 3 additions & 3 deletions toolchain/gcc.sh
Expand Up @@ -8,9 +8,9 @@
# SPDX-License-Identifier: GPL-3.0-or-later

# Variables used in this script
INSTALLPREFIX=${PWD}/install
BUILDPREFIX=${PWD}/build
SRCPREFIX=${PWD}
INSTALLPREFIX=${INSTALLPREFIX:-${PWD}/install}
BUILDPREFIX=${BUILDPREFIX:-${PWD}/build}
SRCPREFIX=${SRCPREFIX:-${PWD}}
DEFAULTARCH=rv32imac
DEFAULTABI=ilp32

Expand Down

0 comments on commit 7347087

Please sign in to comment.