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

Subversion Repositories zipcpu

[/] [zipcpu/] [trunk/] [sw/] [gas-script.sh] - Blame information for rev 200

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 94 dgisselq
#!/bin/bash
2 200 dgisselq
################################################################################
3
##
4
## Filename:    gas-script.sh
5
##
6
## Project:     Zip CPU -- a small, lightweight, RISC CPU soft core
7
##
8
## Purpose:     To configure binutils to properly build the binutils portion of
9
##              the ZipCPU toolchain.
10
##
11
## Creator:     Dan Gisselquist, Ph.D.
12
##              Gisselquist Technology, LLC
13
##
14
################################################################################
15
##
16
## Copyright (C) 2016, Gisselquist Technology, LLC
17
##
18
## This program is free software (firmware): you can redistribute it and/or
19
## modify it under the terms of  the GNU General Public License as published
20
## by the Free Software Foundation, either version 3 of the License, or (at
21
## your option) any later version.
22
##
23
## This program is distributed in the hope that it will be useful, but WITHOUT
24
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
25
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
26
## for more details.
27
##
28
## License:     GPL, v3, as defined and found on www.gnu.org,
29
##              http://www.gnu.org/licenses/gpl.html
30
##
31
##
32
################################################################################
33
##
34
##
35 94 dgisselq
if [[ ! -d binutils-2.25 ]]
36
then
37 111 dgisselq
  tar -xjf ./binutils-2.25.tar.bz2
38 94 dgisselq
  cd binutils-2.25
39 103 dgisselq
  patch -p1 <../binutils-2.25.patch
40
  cd ..
41 94 dgisselq
fi
42
 
43 200 dgisselq
uname -a | grep x86 > /dev/null
44
if [[ $? != 0 ]]; then
45
  echo "This build script only works for x86_64 machines"
46
  echo "You will need to change the CLFS_HOST line if you wish to build"
47
  echo "on any other type of host."
48
  exit 1
49
fi
50
 
51 94 dgisselq
set +h
52
set -e
53
CLFS_HOST="x86_64-cross-linux-gnu"
54 200 dgisselq
# CLFS_HOST="arm-unknown-linux-gnueabihf" # For a Raspberry Pi
55 94 dgisselq
CLFS_TARGET="zip"
56 103 dgisselq
INSTALL_BASE=`pwd`/install
57 94 dgisselq
mkdir -p ${INSTALL_BASE}/cross-tools
58 103 dgisselq
mkdir -p build-gas
59
cd build-gas
60 94 dgisselq
AR=ar AS=as     \
61 200 dgisselq
../binutils-2.25/configure --with-gas                           \
62
        --prefix=${INSTALL_BASE}/cross-tools                    \
63 94 dgisselq
        --host=${CLFS_HOST}     --target=${CLFS_TARGET}         \
64 200 dgisselq
        --disable-nls           --disable-multilib              \
65
        --enable-plugins        --enable-threads                \
66 94 dgisselq
        --disable-werror
67
 

powered by: WebSVN 2.1.0

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