Skip to content

Commit 03618b6

Browse files
committed
Allow passing one-off configure flags
1 parent e53104f commit 03618b6

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

cross-as

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
#!/bin/sh
22

33
tree="$1"
4-
if [ "$#" -ne "1" -o -z "$tree" -o ! -e "$tree/configure" ]
4+
if [ "$#" -lt "1" -o -z "$tree" -o ! -e "$tree/configure" ]
55
then
66
cat <<-tac
7-
USAGE: `basename "$0"` <path to binutils source tree>
7+
USAGE: `basename "$0"` <path to binutils source tree> [configuration flag]...
88
99
Note that source tarballs to not include the simulator (run command);
1010
for that, you must clone the full binutils-gdb repository.
1111
tac
1212
exit 1
1313
fi
14+
shift
1415

15-
exec "$tree/configure" --prefix=/usr/local --target=riscv32 --with-arch=rv32i --disable-gdb --disable-gold --disable-gprof --disable-gprofng
16+
exec "$tree/configure" --prefix=/usr/local --target=riscv32 --with-arch=rv32i --disable-gdb --disable-gold --disable-gprof --disable-gprofng "$@"

cross-cc

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/sh
22

33
tree="$1"
4-
if [ "$#" -ne "1" -o -z "$tree" -o ! -e "$tree/configure" ]
4+
if [ "$#" -lt "1" -o -z "$tree" -o ! -e "$tree/configure" ]
55
then
6-
echo "USAGE: `basename "$0"` <path to gcc source tree>"
6+
echo "USAGE: `basename "$0"` <path to gcc source tree> [configuration flag]..."
77
exit 1
88
elif [ ! -e "$tree/bfd" -o ! -e "$tree/binutils" -o ! -e "$tree/gas" -o ! -e "$tree/gnulib" -o ! -e "$tree/ld" -o ! -e "$tree/libctf" -o ! -e "$tree/libsframe" -o ! -e "$tree/opcodes" ]
99
then
@@ -21,5 +21,6 @@ then
2121
tac
2222
exit 2
2323
fi
24+
shift
2425

25-
exec "$tree/configure" --prefix=/usr/local --target=riscv32-elf --with-arch=rv32i --program-prefix=riscv32- --disable-libssp --enable-languages=c --without-headers
26+
exec "$tree/configure" --prefix=/usr/local --target=riscv32-elf --with-arch=rv32i --program-prefix=riscv32- --disable-libssp --enable-languages=c --without-headers "$@"

0 commit comments

Comments
 (0)