[False asumption, sorry!] Unused functions are compiled, how to avoid this?

I tryed an empty sketch on a DUE.
22082 bytes.
And when disassembling there where a lot about serial.