Skip to content

Commit 5fa609b

Browse files
committed
Fix help of yosys-config.in and provide backward compatibility
1 parent cf7b6c6 commit 5fa609b

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

misc/yosys-config.in

+10-4
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,18 @@ help() {
99
echo "Replacement args:"
1010
echo " --cxx @CXX@"
1111
echo " --cxxflags $( echo '@CXXFLAGS@' | fmt -w60 | sed ':a;N;$!ba;s/\n/ \\\n /g' )"
12-
echo " --ldflags @LINKFLAGS@"
13-
echo " --ldlibs @LIBS@"
12+
echo " --linkflags @LINKFLAGS@"
13+
echo " --ldflags (alias of --linkflags)"
14+
echo " --libs @LIBS@"
15+
echo " --ldlibs (alias of --libs)"
1416
echo " --bindir @BINDIR@"
1517
echo " --datdir @DATDIR@"
1618
echo ""
1719
echo "All other args are passed through as they are."
1820
echo ""
1921
echo "Use --exec to call a command instead of generating output. Example usage:"
2022
echo ""
21-
echo " $0 --exec --cxx --cxxflags --ldflags -o plugin.so -shared plugin.cc --ldlibs"
23+
echo " $0 --exec --cxx --cxxflags --ldflags -o plugin.so -shared plugin.cc --libs"
2224
echo ""
2325
echo "The above command can be abbreviated as:"
2426
echo ""
@@ -44,7 +46,7 @@ fi
4446

4547
if [ "$1" == "--build" ]; then
4648
modname="$2"; shift 2
47-
set -- --exec --cxx --cxxflags --ldflags -o "$modname" -shared "$@" --ldlibs
49+
set -- --exec --cxx --cxxflags --ldflags -o "$modname" -shared "$@" --libs
4850
fi
4951

5052
prefix="--"
@@ -63,6 +65,10 @@ for opt; do
6365
tokens=( "${tokens[@]}" @CXX@ ) ;;
6466
"$prefix"cxxflags)
6567
tokens=( "${tokens[@]}" @CXXFLAGS@ ) ;;
68+
"$prefix"linkflags)
69+
tokens=( "${tokens[@]}" @LINKFLAGS@ ) ;;
70+
"$prefix"libs)
71+
tokens=( "${tokens[@]}" @LIBS@ ) ;;
6672
"$prefix"ldflags)
6773
tokens=( "${tokens[@]}" @LINKFLAGS@ ) ;;
6874
"$prefix"ldlibs)

0 commit comments

Comments
 (0)