[Buildroot] freetype: fix for multilib toolchain

Bjørn Forsman bjorn.forsman at gmail.com
Fri Jan 14 12:47:54 UTC 2011


Hi,

On 14 January 2011 09:11, Thomas Petazzoni
<thomas.petazzoni at free-electrons.com> wrote:
> Hello Matt,
>
> On Thu, 13 Jan 2011 21:18:33 -0700
> Matt Johnson <mj1856 at hotmail.com> wrote:
>
>> FreeType's makefile needs to have the architecture (example, -march=armv4t) passed in the LDFLAGS in order to work properly with a multilib toolchain, like CodeSourcery.  This is the easiest way I could think of to do it.  Tested and works.
>
> The description of your patch should be wrapped at ~80 columns.
>
>> Signed-off-by: Matt Johnson <mj1856 at hotmail.com>
>> ---
>>  package/freetype/freetype.mk |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>> diff --git a/package/freetype/freetype.mk b/package/freetype/freetype.mk
>> index ad4292f..7e59b57 100644
>> --- a/package/freetype/freetype.mk
>> +++ b/package/freetype/freetype.mk
>> @@ -8,6 +8,7 @@ FREETYPE_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/
>>  FREETYPE_SOURCE = freetype-$(FREETYPE_VERSION).tar.bz2
>>  FREETYPE_INSTALL_STAGING = YES
>>  FREETYPE_INSTALL_TARGET = YES
>> +FREETYPE_CONF_ENV = LDFLAGS="-march=$(CC_TARGET_ARCH_) $(TARGET_LDFLAGS)"
>
> I am not sure I want to see this fixed this way. It looks like the
> issue reported by Divick Kishore on sshd is similar: we need to pass
> the -march argument in the LDFLAGS for all packages.
>
> So probably we should rather adjust TARGET_LDFLAGS globally (its
> definition is in package/Makefile.in) so that it contains the
> appropriate -march.

AFAIK, ld does not have an "-march" option (just looked at the man page).
So I'd say that it is the freetype (and sshd?) package that needs to be fixed
(and not BR) because they are using LDFLAGS wrong.

Best regards,
Bjørn Forsman


More information about the buildroot mailing list