Seems like you did run out of flash... any idea what the total program size is like? Eg, how many lines of code and how many large buffers/strings? I knew libmaple was getting bloated for use with RAM but i'm surprised all the flash got used up attempting to compile a relatively simple library.
I'm assuming this SD library is targeted to the Arduino? This is a long shot, but if it uses a lot of "int" variables or arrays those will take up more bytes on a 32bit chip; you could try replacing with uint8 or uint16.
The easiest way to cut a couple kilobytes of useless strings and code is to disable all the ASSERT() functions embedded in libmaple; each instance stores a large string with the exact file and line number, which is reported over Serial2 if the assertion fails. We've been meaning to expose a compiler flag or just remove all instances of these debugging strings, but for now you would have to go in by hand and modify the file util.h and set MAPLE_DEBUG to 0.
Having the full breakdown of memory usage by file is really important for this; i'll make sure to modify the output for the next IDE release.