File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- # Convenience wrapper to set CROSS_COMPILE variable to musl-cross-make pathname
4
- # using "mcm" symlink to musl-cross-make output directory.
3
+ # Convenience wrapper to set CROSS_COMPILE variable from short name using "ccc"
4
+ # symlink (Cross cc) to directory of cross compilers named $TARGET-*-cross.
5
+ # Tested with musl-cross-make output directory.
5
6
6
- # Usage: ./cross.sh TARGET ./mkroot.sh
7
+ # Usage: ./cross.sh TARGET make defconfig toybox_clean root
7
8
# With no arguments, lists available targets.
8
9
# Use target "all" to iterate through all targets.
9
10
10
- MCM =" $( dirname " $( readlink -f " $0 " ) " ) " /mcm
11
- if [ ! -d " $MCM " ]
11
+ CCC =" $( dirname " $( readlink -f " $0 " ) " ) " /ccc
12
+ if [ ! -d " $CCC " ]
12
13
then
13
- echo " Create symlink 'mcm ' to musl- cross-make output directory"
14
+ echo " Create symlink 'ccc ' to cross compiler directory"
14
15
exit 1
15
16
fi
16
17
@@ -19,7 +20,7 @@ unset X Y
19
20
# Display target list?
20
21
list ()
21
22
{
22
- ls " $MCM " | sed ' s/-.*//' | sort -u | xargs
23
+ ls " $CCC " | sed ' s/-.*//' | sort -u | xargs
23
24
}
24
25
[ $# -eq 0 ] && list && exit
25
26
42
43
43
44
# Call command with CROSS_COMPILE= as its first argument
44
45
45
- Y=$( readlink -f " $MCM " /$X -* cross)
46
+ Y=$( readlink -f " $CCC " /$X -* cross)
46
47
X=$( basename " $Y " )
47
48
X=" $Y /bin/${X/ -cross/ -} "
48
49
[ ! -e " ${X} cc" ] && echo " ${X} cc not found" && exit 1
You can’t perform that action at this time.
0 commit comments