g++-uc 893 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env bash
  2. WRAPPER_INCLUDEDIR="${WRAPPER_INCLUDEDIR:=-I${STAGING_DIR:-/srv/openwrt/ar71xx/build/staging_dir/target-mips_34kc_musl-1.1.15}/usr/include/uClibc++/}"
  3. WRAPPER_LIBDIR="${WRAPPER_LIBDIR:=-L${STAGING_DIR:-/srv/openwrt/ar71xx/build/staging_dir/target-mips_34kc_musl-1.1.15}/lib/}"
  4. WRAPPER_OPTIONS=""
  5. WRAPPER_LIBS="-lc -lgcc_s -lssp_nonshared "
  6. WRAPPER_INCLIB="Y"
  7. while [ -n "$1" ]
  8. do
  9. WRAPPER_OPTIONS="$WRAPPER_OPTIONS $1"
  10. if [ "$1" = "-c" -o "$1" = "-E" -o "$1" = "-S" -o "$1" = "-MF" ]
  11. then
  12. WRAPPER_INCLIB="N"
  13. fi
  14. if [ "$1" = "-static" ]
  15. then
  16. WRAPPER_LIBS="-lc -lgcc_s -lssp_nonshared -lgcc_eh"
  17. fi
  18. shift
  19. done
  20. if [ "$WRAPPER_INCLIB" = "Y" ]
  21. then
  22. WRAPPER_OPTIONS="$WRAPPER_OPTIONS -nodefaultlibs $WRAPPER_LIBDIR -luClibc++ $WRAPPER_LIBS"
  23. fi
  24. exec mips-openwrt-linux-musl-g++ -fno-builtin -nostdinc++ -DGCC_HASCLASSVISIBILITY $WRAPPER_INCLUDEDIR $WRAPPER_OPTIONS