always put -Wl,--as-needed to the front of the system libs