URL
https://opencores.org/ocsvn/zipcpu/zipcpu/trunk
Subversion Repositories zipcpu
[/] [zipcpu/] [trunk/] [sw/] [gcc-script.sh] - Rev 202
Go to most recent revision | Compare with Previous | Blame | View Log
#!/bin/bash
################################################################################
##
## Filename: gcc-script.sh
##
## Project: Zip CPU -- a small, lightweight, RISC CPU soft core
##
## Purpose: To handle all of the GCC configuration options properly. This
## both runs the GCC configure script, as well as initially running
## make on the resulting configured directory.
##
##
## Creator: Dan Gisselquist, Ph.D.
## Gisselquist Technology, LLC
##
################################################################################
##
## Copyright (C) 2016, Gisselquist Technology, LLC
##
## This program is free software (firmware): you can redistribute it and/or
## modify it under the terms of the GNU General Public License as published
## by the Free Software Foundation, either version 3 of the License, or (at
## your option) any later version.
##
## This program is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
## for more details.
##
## License: GPL, v3, as defined and found on www.gnu.org,
## http://www.gnu.org/licenses/gpl.html
##
##
################################################################################
##
##
VERSION=gcc-6.2.0
ZVERSION=gcc-6.2.0-zip
# if [[ ! -d $ZVERSION ]]
# then
# tar -xjf ./$VERSION.tar.bz2 --transform s,$VERSION,$ZVERSION,
# if [[ -e ../gcc-zippatch.path ]];
# then
# cd gcc-6.2.0-zip
# patch -p1 <../gcc6-zippatch.patch
# cd ..
# else
# echo "No Patch file!"
# exit -1;
# fi
# if [[ -d build-gcc ]]
# then
# # Remove any incomplete build projects from ... possibly other versions
# # This way we can reuse the build directory
# rm -rf build-gcc/
# fi
# fi
set +h
set -e
CLFS_HOST=$MACHTYPE
CLFS_TARGET="zip"
INSTALL_BASE=`pwd`/install
mkdir -p ${INSTALL_BASE}/cross-tools
mkdir -p ${INSTALL_BASE}/tools/lib
mkdir -p ${INSTALL_BASE}/usr/include
mkdir -p build-gcc
cd build-gcc
AS_FOR_TARGET=${INSTALL_BASE}/cross-tools/bin/zip-as
AR_FOR_TARGET=${INSTALL_BASE}/cross-tools/bin/zip-ar
NM_FOR_TARGET=${INSTALL_BASE}/cross-tools/bin/zip-nm
LD_FOR_TARGET=${INSTALL_BASE}/cross-tools/bin/zip-ld
../$ZVERSION/configure --with-gas \
--prefix=${INSTALL_BASE}/cross-tools \
--target=${CLFS_TARGET} \
--with-pkgversion=zip-gcc-`date +%y%m%d` \
--disable-multilib \
--disable-threads --disable-tls \
--enable-checking --disable-nls \
--without-fp --with-newlib
echo $PATH | grep ${INSTALL_BASE}/cross-tools/bin \
|| export PATH=$PATH:${INSTALL_BASE}/cross-tools/bin
Go to most recent revision | Compare with Previous | Blame | View Log
