Skip to content
This repository has been archived by the owner on Nov 4, 2021. It is now read-only.

Commit

Permalink
yosys: cleanup GHDL_LDLIBS
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Jan 4, 2021
1 parent 247113d commit c6c373c
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions scripts/compile_yosys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,19 @@ if [ $COMPILE_GHDL == "1" ]
then
patch < $WORK_DIR/scripts/yosys_ghdl.diff

mkdir -p frontends/ghdl
cp -R ../$dir_name_gyp/src/* frontends/ghdl

if [ $ARCH == "darwin" ]; then
GHDL_LDLIBS="$PACKAGE_DIR/$NAME/lib/libghdl.a $(tr -s '\n' ' ' < $PACKAGE_DIR/$NAME/lib/libghdl.link)"
elif [ ${ARCH:0:7} == "windows" ]; then
GHDL_LDLIBS="$(cygpath -m -a $PACKAGE_DIR/$NAME/lib/libghdl.a) $(cat $PACKAGE_DIR/$NAME/lib/libghdl.link | tr -s '\n' ' ' | tr -s '\\' '/' )"
else
GHDL_LDLIBS="$PACKAGE_DIR/$NAME/lib/libghdl.a $(tr -s '\n' ' ' < $PACKAGE_DIR/$NAME/lib/libghdl.link)"
fi
#if [ ${ARCH:0:7} == "windows" ]; then
# sed -i -e 's@.*\(/mingw.*\)@\1@' $PACKAGE_DIR/$NAME/lib/libghdl.link
#fi

GHDL_LDLIBS="$PACKAGE_DIR/$NAME/lib/libghdl.a $(cat $PACKAGE_DIR/$NAME/lib/libghdl.link)"
fi

_ghdl_conf() {
if [ $COMPILE_GHDL == "1" ]
then
mkdir -p frontends/ghdl
cp -R ../$dir_name_gyp/src/* frontends/ghdl

echo 'ENABLE_GHDL := 1' >> Makefile.conf
echo "GHDL_PREFIX := $PACKAGE_DIR/$NAME" >> Makefile.conf
fi
Expand Down

0 comments on commit c6c373c

Please sign in to comment.