Lines Matching +full:host +full:- +full:gcc
3 # Script to build all cross and native compilers supported by musl-libc.
6 if [ ! -d litecross ]
8 echo Run this script in musl-cross-make directory to make "ccc" directory.
10 echo " "git clone https://github.com/richfelker/musl-cross-make
11 echo " "cd musl-cross-make
12 echo ' ~/toybox/scripts/mcm-buildall.sh'
17 # can be statically linked against musl on the host, for binary portability.)
19 BOOTSTRAP=i686-linux-musl
21 [ -z "$OUTPUT" ] && OUTPUT="$PWD/ccc"
25 rm -rf "$OUTPUT" host-* *.log
34 if [ -z "$TYPE" ]
36 OUTPUT="$PWD/host-$TARGET"
41 HOST=$BOOTSTRAP
42 [ "$TARGET" = "$HOST" ] && LP="$PWD/host-$HOST/bin:$LP"
45 LP="$OUTPUT/$HOST-cross/bin:$LP"
47 HOST="$TARGET"
49 LP="$OUTPUT/${RENAME:-$TARGET}-cross/bin:$LP"
51 COMMON_CONFIG="CC=\"$HOST-gcc -static --static\" CXX=\"$HOST-g++ -static --static\""
52 export -n HOST
53 OUTPUT="$OUTPUT/${RENAME:-$TARGET}-$TYPE"
56 if [ -e "$OUTPUT.sqf" ] || [ -e "$OUTPUT/bin/$TARGET-ld" ] ||
57 [ -e "$OUTPUT/bin/ld" ]
64 echo === building $TARGET-$TYPE
65 echo -en "\033]2;$TARGET-$TYPE\007"
67 rm -rf build/"$TARGET" "$OUTPUT" &&
68 if [ -z "$CPUS" ]
73 set -x &&
75 …GCC_CONFIG="--disable-nls --disable-libquadmath --disable-decimal-float --disable-multilib --enabl…
76 …COMMON_CONFIG="CFLAGS=\"$CFLAGS -g0 -Os\" CXXFLAGS=\"$CXXFLAGS -g0 -Os\" LDFLAGS=\"$LDFLAGS -s\" $…
77 install -j$CPUS || exit 1
79 echo -e '#ifndef __MUSL__\n#define __MUSL__ 1\n#endif' \
82 if [ ! -z "$RENAME" ] && [ "$TYPE" == cross ]
84 CONTEXT="output/$RENAME-cross/bin"
85 for i in "$CONTEXT/$TARGET-"*
87 X="$(echo $i | sed "s@.*/$TARGET-\([^-]*\)@\1@")"
88 ln -sf "$TARGET-$X" "$CONTEXT/$RENAME-$X"
92 # Prevent cross compiler reusing dynamically linked host build files for
94 [ -z "$TYPE" ] && make clean
98 # gcc looks in "../usr/include" but not "/bin/../include" (relative to the
99 # executable). That means /usr/bin/gcc looks in /usr/usr/include, so that's
101 ln -s . "$OUTPUT/usr" || exit 1
102 [ ! -z "$(which mksquashfs 2>/dev/null)" ] &&
103 mksquashfs "$OUTPUT" "$OUTPUT.sqf" -all-root &&
104 [ -z "$CLEANUP" ] && rm -rf "$OUTPUT"
108 # Expand compressed target into binutils/gcc "tuple" and call make_toolchain
113 PART2=${1:$((${#PART1}+1)):$((${#1}-${#PART3}-${#PART1}-2))}
119 TARGET=${PART1}-linux-musl${PART2}
121 [ -z "$NOCLEAN" ] && rm -rf build
126 make_toolchain 2>&1 | tee "$OUTPUT"/log/${RENAME:-$PART1}-${TYPE}.log
130 mkdir -p "$OUTPUT"/log
132 # Make bootstrap compiler (no $TYPE, dynamically linked against host libc)
134 # musl-libc, because glibc doesn't fully support static linking and dynamic
136 TARGET=$BOOTSTRAP make_toolchain 2>&1 | tee -a "$OUTPUT/log/$BOOTSTRAP"-host.log
138 if [ $# -gt 0 ]
150 aarch64:eabi: armv4l:eabihf:"--with-arch=armv5t --with-float=soft" \
151 armv5l:eabihf:--with-arch=armv5t armv7l:eabihf:--with-arch=armv7-a \
152 … "armv7m:eabi:--with-arch=armv7-m --with-mode=thumb --disable-libatomic --enable-default-pie" \
153 armv7r:eabihf:"--with-arch=armv7-r --enable-default-pie" \
155 powerpc64:: powerpc64le:: s390x:: sh2eb:fdpic:--with-cpu=mj2 \
156 sh4::--enable-incomplete-targets x86_64:: x86_64@x32:x32: