#!/bin/sh

g++ -dumpspecs |sed s/--start-group}\ %G\ %L\ /--start-group}\ %G\ %L\ -lstdc++\ -lgcc_pic\ / >/opt/lib/gcc/mipsel-openwrt-linux-gnu/8.4.0/specs
sed -i 's| %{L\*} | %{L*} -rpath-link /opt/lib |' /opt/lib/gcc/mipsel-openwrt-linux-gnu/8.4.0/specs

echo "There are no *-dev packages in Entware(with few exceptions)!"
echo "Please install headers as described in the wiki:"
echo "https://github.com/Entware/Entware/wiki"
