cflags missing in makefile
Migrated from: [SAVANNAH-32114]
Anonymous reported:
Hello. I have built freetype from source as part of my BuildRoot setup. I am targeting an embedded system with an armv4t based processor. I use a toolchain from CodeSourcery, which is a multi-lib toolchain that targets various architectures. It's important to pass the -march=armv4t on the cflags to all instances of CC for the target processor so the toolchain picks the right library.
In freetype's /builds/unix/unix-cc.in file, line 91 has an isolated command labeld "CCraw". I'm not sure what the intention here is, but since no cflags are passed with CCraw, the toolchain picks the wrong library. The net result is that I get "illegal instruction" errors when using freetype on my device.
It works if I pass the cflags, but I don't know if this has other unintended consequences or not, since I'm not familiar with the development of this project.
In other words, changing:
CCraw := $(CC)
to
CCraw := $(CC) $(CFLAGS)
solves the problem for me.
Please let me know if this is a reasonable fix, and if so - please commit it to your source so the next release will have it automatically.
Thanks.