OpenCores
URL https://opencores.org/ocsvn/zipcpu/zipcpu/trunk

Subversion Repositories zipcpu

[/] [zipcpu/] [trunk/] [sw/] [nlib-script.sh] - Blame information for rev 209

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 202 dgisselq
#!/bin/bash
2 209 dgisselq
################################################################################
3
##
4
## Filename:    nlib-script.sh
5
##
6
## Project:     Zip CPU -- a small, lightweight, RISC CPU soft core
7
##
8
## Purpose:     To handle all of the newlib configuration options properly.
9
##              This runs the newlib C-library configure script, using options
10
##      that are currently known to work.
11
##
12
##
13
## Creator:     Dan Gisselquist, Ph.D.
14
##              Gisselquist Technology, LLC
15
##
16
################################################################################
17
##
18
## Copyright (C) 2016, Gisselquist Technology, LLC
19
##
20
## This program is free software (firmware): you can redistribute it and/or
21
## modify it under the terms of  the GNU General Public License as published
22
## by the Free Software Foundation, either version 3 of the License, or (at
23
## your option) any later version.
24
##
25
## This program is distributed in the hope that it will be useful, but WITHOUT
26
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
27
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
28
## for more details.
29
##
30
## License:     GPL, v3, as defined and found on www.gnu.org,
31
##              http://www.gnu.org/licenses/gpl.html
32
##
33
##
34
################################################################################
35
##
36
##
37 202 dgisselq
VERSION="newlib-2.5.0"
38 209 dgisselq
if [[ -z "$INSTALLD" ]]
39
then
40
  INSTALLD=`pwd`/install
41
fi
42
INSTALL_BASE=${INSTALLD}
43 202 dgisselq
if [[ ! -d $INSTALL_BASE ]]
44
then
45
  echo "I cant seem to find the install directory," $INSTALL_BASE
46 209 dgisselq
  exit -1
47 202 dgisselq
fi
48 209 dgisselq
which zip-gcc > /dev/null
49
if [[ $? != 0 ]]
50
then
51
  echo "Nlib-script Error: Unable to find zip-gcc in your path"
52
  echo "PATH=$PATH"
53
  exit -1
54
fi
55 202 dgisselq
 
56
if [[ -d build-nlib ]]
57
then
58
  rm -rf build-nlib
59
fi
60
 
61
cp -R $VERSION-zip/newlib/libc/include/* ${INSTALL_BASE}/usr/include
62
 
63
set +h
64
set -e
65
 
66
mkdir build-nlib
67
cd build-nlib
68
 
69
CLFS_HOST=$MACHTYPE
70
CLFS_TARGET="zip"
71
GCC_BASE=${INSTALL_BASE}/../build-gcc/
72
PATH=$PATH:${INSTALL_BASE}/cross-tools/bin:${GCC_BASE}/gcc
73
../$VERSION-zip/configure --prefix=${INSTALL_BASE}/cross-tools  \
74 209 dgisselq
        --target=${CLFS_TARGET} --host=$MACHTYPE

powered by: WebSVN 2.1.0

© copyright 1999-2021 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.