[Buildroot] freetype: fix for multilib toolchain

Matt Johnson mj1856 at hotmail.com
Fri Jan 14 16:04:43 UTC 2011


>
> So, as I said in another e-mail, I think ld does allows to choose between
different ld variants.
> So the link should always be done with gcc, which then drives ld, giving
it the correct path to the appropriate libraries and runtime.
>

Sorry, perhaps I confused the issue.  It's not that -march needs to be
passed to LD, it's needed because of how the freetype makefile is designed
to use libtool.

>From freetype-2.4.4/builds/unix/unix-cc.in:

# Library linking
#
LINK_LIBRARY = $(LIBTOOL) --mode=link $(CCraw) -o $@ $(OBJECTS_LIST) \
                          -rpath $(libdir) -version-info $(version_info) \
                          $(LDFLAGS) -no-undefined \
                          # -export-symbols $(EXPORTS_LIST)


Earlier in the file, they do this:

CCraw := $(CC)
CC    := $(LIBTOOL) --mode=compile $(CCraw)

I opened a bug with the FreeType team here:
https://savannah.nongnu.org/bugs/?32114

, suggesting that they pass the CFLAGS as part of CCraw, but one of their
lead devs suggested that just -march should be passed in the LDFLAGS.  Any
actual calls to LD would ignore the flag anyway.

Since FreeType is not updated anywhere near as often as BuildRoot, it seems
to make sense.

-Matt




More information about the buildroot mailing list