12345678910111213141516171819202122232425262728 |
- #!/usr/bin/env bash
- WRAPPER_INCLUDEDIR="${WRAPPER_INCLUDEDIR:=-I${STAGING_DIR:-/srv/openwrt/ar71xx/build/staging_dir/target-mips_34kc_musl-1.1.15}/usr/include/uClibc++/}"
- WRAPPER_LIBDIR="${WRAPPER_LIBDIR:=-L${STAGING_DIR:-/srv/openwrt/ar71xx/build/staging_dir/target-mips_34kc_musl-1.1.15}/lib/}"
- WRAPPER_OPTIONS=""
- WRAPPER_LIBS="-lc -lgcc_s -lssp_nonshared "
- WRAPPER_INCLIB="Y"
- while [ -n "$1" ]
- do
- WRAPPER_OPTIONS="$WRAPPER_OPTIONS $1"
- if [ "$1" = "-c" -o "$1" = "-E" -o "$1" = "-S" -o "$1" = "-MF" ]
- then
- WRAPPER_INCLIB="N"
- fi
- if [ "$1" = "-static" ]
- then
- WRAPPER_LIBS="-lc -lgcc_s -lssp_nonshared -lgcc_eh"
- fi
- shift
- done
- if [ "$WRAPPER_INCLIB" = "Y" ]
- then
- WRAPPER_OPTIONS="$WRAPPER_OPTIONS -nodefaultlibs $WRAPPER_LIBDIR -luClibc++ $WRAPPER_LIBS"
- fi
- exec mips-openwrt-linux-musl-g++ -fno-builtin -nostdinc++ -DGCC_HASCLASSVISIBILITY $WRAPPER_INCLUDEDIR $WRAPPER_OPTIONS
|