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

Subversion Repositories zipcpu

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 103 dgisselq
#!/bin/bash
2 200 dgisselq
################################################################################
3
##
4
## Filename:    gcc-script.sh
5
##
6
## Project:     Zip CPU -- a small, lightweight, RISC CPU soft core
7
##
8
## Purpose:     To handle all of the GCC configuration options properly.  This
9 209 dgisselq
##              runs the GCC configure script, using options known to work
10
##      with the ZipCPU.
11 200 dgisselq
##
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=gcc-6.2.0
38
ZVERSION=gcc-6.2.0-zip
39
# if [[ ! -d $ZVERSION ]]
40
# then
41
  # tar -xjf ./$VERSION.tar.bz2 --transform s,$VERSION,$ZVERSION,
42
  # if [[ -e ../gcc-zippatch.path ]];
43
  # then
44
    # cd gcc-6.2.0-zip
45
    # patch -p1 <../gcc6-zippatch.patch
46
    # cd ..
47
  # else
48
    # echo "No Patch file!"
49
    # exit -1;
50
  # fi
51
  # if [[ -d build-gcc ]]
52
  # then
53
    # # Remove any incomplete build projects from ... possibly other versions
54
    # # This way we can reuse the build directory
55
    # rm -rf build-gcc/
56
  # fi
57
# fi
58 103 dgisselq
 
59
set +h
60
set -e
61 202 dgisselq
CLFS_HOST=$MACHTYPE
62 103 dgisselq
CLFS_TARGET="zip"
63 209 dgisselq
if [[ -z "$INSTALLD" ]]
64
then
65
  INSTALLD=`pwd`/install
66
fi
67
if [[ ! $(which zip-as) ]]
68
then
69
  echo "GCC-script ERROR: Unable to find zip-as, the ZipCPU assembler, in your path"
70
  exit -1
71
fi
72
INSTALL_BASE=${INSTALLD}
73 200 dgisselq
mkdir -p ${INSTALL_BASE}/cross-tools
74 103 dgisselq
mkdir -p ${INSTALL_BASE}/tools/lib
75
mkdir -p ${INSTALL_BASE}/usr/include
76
mkdir -p build-gcc
77
cd build-gcc
78
 
79 202 dgisselq
AS_FOR_TARGET=${INSTALL_BASE}/cross-tools/bin/zip-as
80 111 dgisselq
AR_FOR_TARGET=${INSTALL_BASE}/cross-tools/bin/zip-ar
81 202 dgisselq
NM_FOR_TARGET=${INSTALL_BASE}/cross-tools/bin/zip-nm
82 111 dgisselq
LD_FOR_TARGET=${INSTALL_BASE}/cross-tools/bin/zip-ld
83 103 dgisselq
 
84 202 dgisselq
../$ZVERSION/configure --with-gas                       \
85
        --prefix=${INSTALL_BASE}/cross-tools            \
86
        --target=${CLFS_TARGET}                         \
87
        --with-pkgversion=zip-gcc-`date +%y%m%d`        \
88
        --disable-multilib                              \
89
        --disable-threads --disable-tls                 \
90
        --enable-checking --disable-nls                 \
91 209 dgisselq
        --with-newlib
92 103 dgisselq
 
93 171 dgisselq
echo $PATH | grep ${INSTALL_BASE}/cross-tools/bin \
94 202 dgisselq
        || export PATH=$PATH:${INSTALL_BASE}/cross-tools/bin

powered by: WebSVN 2.1.0

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