The Australian sharemarket gave up most of its early gains to close flat ahead of federal budget night, despite local tech stocks posting a solid session.