This repository has been archived by the owner on Nov 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from open-tool-forge/feature/4-add-ghdl
Feature/4 add ghdl
- Loading branch information
Showing
9 changed files
with
284 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
ghdl=ghdl | ||
commit=master | ||
git_ghdl=https://github.com/ghdl/ghdl.git | ||
|
||
cd $UPSTREAM_DIR | ||
|
||
# -- Clone the sources from github | ||
test -e $ghdl || git clone $git_ghdl $ghdl | ||
git -C $ghdl pull | ||
git -C $ghdl checkout $commit | ||
git -C $ghdl log -1 | ||
|
||
# -- Copy the upstream sources into the build directory | ||
rsync -a $ghdl $BUILD_DIR --exclude .git | ||
|
||
cd $BUILD_DIR/$ghdl | ||
|
||
# add a static libghdl.a target to the Makefile | ||
# remove unwanted -lz linker flag on Darwin (because it causes a dynamic link) | ||
patch -p1 < $WORK_DIR/scripts/libghdl_static.diff | ||
|
||
# -- Compile it | ||
if [ $ARCH == "darwin" ]; then | ||
OLD_PATH=$PATH | ||
export PATH="$GNAT_ROOT/bin:$PATH" | ||
|
||
./configure --prefix=$PACKAGE_DIR/$NAME | ||
|
||
$MAKE -j$J GNAT_LARGS="-static-libgcc $ZLIB_ROOT/lib/libz.a" | ||
$MAKE install | ||
|
||
export PATH="$OLD_PATH" | ||
else | ||
./configure --prefix=$PACKAGE_DIR/$NAME | ||
$MAKE -j$J GNAT_BARGS="-bargs -E -static" GNAT_LARGS="-static -lz" | ||
$MAKE install | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.