[U-Boot] [PATCH 2/2 RESEND] SPL: Allow user to disable CPU support library

Marek Vasut
2011-09-16T22:48:36Z

On Saturday, September 17, 2011 12:07:52 AM Scott Wood wrote:
> On 09/16/2011 04:47 PM, Marek Vasut wrote:
> > On Friday, September 16, 2011 11:42:50 PM Scott Wood wrote:
> >> On 09/16/2011 04:38 PM, Marek Vasut wrote:
> >>> On Friday, September 16, 2011 09:49:28 PM Scott Wood wrote:
> >>>> Still, this seems hackish. Shouldn't the control be on specific files
> >>>> that you include, not directories?
> >>>
> >>> I don't think so ... why ?
> >>
> >> That's how the main U-Boot build does it... More specifically, the
> >> config.h controls should be on features, and the makefiles should decide
> >> which (if any) files are required for that feature. If there are no
> >> files from arch/$(ARCH)/cpu/$(CPU) needed, then we get an empty
> >> lib$(CPU).o -- nothing special needed to avoid it.
> >
> > Yes, but you basically _always_ want that CPU support code in ... and I
> > have no idea why you'd like to avoid particular files.
>
> You have no idea why I'd like to be extremely selective with what I
> include in a 4K binary?

That I do understand -- but that kind of selection is there.
>
> It's not about avoiding particular files. It's about including
> *nothing* but what is explicitly asked for through some SPL-specific
> CONFIG symbol. Maybe that includes everything in arch/$(ARCH)/cpu.
> Maybe it includes nothing in there. More likely, it includes just a
> fraction of it.

The stuff in arch/arm/cpu should be exactly what you need, nothing more !
>
> If your answer is gc-sections, why do you need to drop the whole
> directory? And why waste time building entire files that we know we
> don't want? Why waste time debugging where the sudden bloat came from
> instead of getting a simple and clear undefined-symbol error?
>
> -Scott