aboutsummaryrefslogtreecommitdiffstats
path: root/dist
diff options
context:
space:
mode:
author1138-4EB <1138-4EB@users.noreply.github.com>2018-06-04 01:09:31 +0100
committertgingold <tgingold@users.noreply.github.com>2018-06-05 05:25:07 +0200
commit2627c62f344bc002e39bd0f1c7e076b01effa5d6 (patch)
treeccc51e7639e48833b64a9d9841e6ae9691ea35df /dist
parentdd75420147fc8df66e8104cafb57a950236dddfd (diff)
downloadghdl-2627c62f344bc002e39bd0f1c7e076b01effa5d6.tar.gz
ghdl-2627c62f344bc002e39bd0f1c7e076b01effa5d6.tar.bz2
ghdl-2627c62f344bc002e39bd0f1c7e076b01effa5d6.zip
add gcc case to build.sh
Diffstat (limited to 'dist')
-rwxr-xr-xdist/travis/build.sh51
1 files changed, 47 insertions, 4 deletions
diff --git a/dist/travis/build.sh b/dist/travis/build.sh
index 297a8561b..d3a1e2429 100755
--- a/dist/travis/build.sh
+++ b/dist/travis/build.sh
@@ -71,6 +71,30 @@ mkdir "build-$BLD"
cd "build-$BLD"
case "$BLD" in
+ gcc*)
+ echo "travis_fold:start:get_gcc"
+ travis_time_start
+ printf "$ANSI_YELLOW[GHDL] Get gcc sources $ANSI_NOCOLOR\n"
+ echo "https://github.com/gcc-mirror/gcc/archive/$(echo ${BLD} | sed -e 's/\./_/g')-release.tar.gz"
+ mkdir gcc-srcs
+ curl -L "https://github.com/gcc-mirror/gcc/archive/$(echo ${BLD} | sed -e 's/\./_/g')-release.tar.gz" | tar -xz -C gcc-srcs --strip-components=1
+ cd gcc-srcs
+ sed -i.bak s/ftp:/http:/g ./contrib/download_prerequisites
+ ./contrib/download_prerequisites
+ cd ..
+ travis_time_finish
+ echo "travis_fold:end:get_gcc"
+
+ echo "travis_fold:start:configure_gcc"
+ travis_time_start
+ printf "$ANSI_YELLOW[GHDL] Configure gcc $ANSI_NOCOLOR\n"
+ ../configure --with-gcc=gcc-srcs --prefix="$prefix"
+ make copy-sources
+ mkdir gcc-objs; cd gcc-objs
+ ../gcc-srcs/configure --prefix="$prefix" --enable-languages=c,vhdl --disable-bootstrap --disable-lto --disable-multilib --disable-libssp --disable-libgomp --disable-libquadmath "`gcc -v 2>&1 | grep -o -- --enable-default-pie`"
+ travis_time_finish
+ echo "travis_fold:end:configure_gcc"
+ ;;
mcode)
config_opts=""
CXX=""
@@ -103,8 +127,12 @@ case "$BLD" in
echo "$ANSI_RED[GHDL - build] Unknown build $BLD $ANSI_NOCOLOR"
exit 1;;
esac
-echo "../configure --prefix=$prefix $config_opts"
-../configure "--prefix=$prefix" $config_opts
+
+if [ ! "$(echo $BLD | grep gcc)" ]; then
+ echo "../configure --prefix=$prefix $config_opts"
+ ../configure "--prefix=$prefix" $config_opts
+fi
+
echo "travis_fold:end:configure"
#--- make
@@ -112,7 +140,7 @@ echo "travis_fold:end:configure"
echo "travis_fold:start:make"
travis_time_start
printf "$ANSI_YELLOW[GHDL - build] Make $ANSI_NOCOLOR\n"
-make
+make -j$(nproc)
travis_time_finish
echo "travis_fold:end:make"
@@ -122,6 +150,21 @@ make install
cd ..
echo "travis_fold:end:install"
+if [ "$(echo $BLD | grep gcc)" ]; then
+ echo "travis_fold:start:make_ghdllib"
+ travis_time_start
+ printf "$ANSI_YELLOW[GHDL - build] Make ghdllib $ANSI_NOCOLOR\n"
+ make ghdllib
+ travis_time_finish
+ echo "travis_fold:end:make_ghdllib"
+
+ echo "travis_fold:start:install_ghdllib"
+ printf "$ANSI_YELLOW[GHDL - build] Install ghdllib $ANSI_NOCOLOR\n"
+ make install
+ cd ..
+ echo "travis_fold:end:install_ghdllib"
+fi
+
#--- package
echo "travis_fold:start:tar.bin"
@@ -136,7 +179,7 @@ echo "travis_fold:end:tar.bin"
gnatls --version | grep 'GNATLS'
gcc --version | grep 'gcc'
if [ "$CXX" != "" ]; then
- $CXX --version | grep 'clang'
+ $CXX --version | grep 'clang'
fi
} > BUILD_TOOLS