经验分享 · 2024年1月15日

Solved “someone does not honour COPTS correctly”

It usually means that your Makefile overrides CFLAGS instead of appending to it.

I wasn’t setting CFLAGS to TARGET_CFLAGS in the top level package makefile although I had the lower project level makefile appending to it correctly. I haven’t looked at the values passed down from TARGET_CFLAGS but my executable has now shrunk from 165k to 133k so I’m a happy camper smile