Summary: | fontconfig-2.7.2 fail to cross compile, require navtive HOST helper utils | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Yixun Lan <dlan> |
Component: | Current packages | Assignee: | Gentoo Fonts Team <fonts> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | bertrand, btarquini, embedded, j-pi, yodayado |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build err log for fontconfig
patch against fontconfig-2.7.2.ebuild to fix the problem sorry, previous submmit fix cross compile fix cross-compilation by modifiyng Makefile.am |
Description
Yixun Lan
![]() ![]() Created attachment 203938 [details]
build err log for fontconfig
Created attachment 203939 [details]
patch against fontconfig-2.7.2.ebuild to fix the problem
When calling HOST gcc compiler, we should remove TARGET cflags
Created attachment 203941 [details]
sorry, previous submmit
@embedded: could you review this patch? Looks like it fails because of wrong compiler was called, not because of some tools built with wrong compiler... Created attachment 232525 [details, diff]
fix cross compile
Works for 2.7.3 too.
Previous patch remove old cross compile fix, it is no longer necessary. Created attachment 233013 [details, diff]
fix cross-compilation by modifiyng Makefile.am
Instead of removing CFLAGS in Makefile.in, this patch override COMPILE and LINK variables in {doc,fc-arch,fc-case,fc-glyphname,fc-lang}/Makefile.am.
Thoses tools are used at buildtime and should be build with CC_FOR_BUILD (eg $CBUILD-gcc) without the CFLAGS (which are customized for the host compiler)
The changes is from:
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
to:
COMPILE = $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) (AM_CPPFLAGS) \
$(CPPFLAGS_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD)
LINK = $(CC_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD) -o $@
So, CC is replaced by CC_FOR_BUILD, and {C,LD}FLAGS by {C,LD}FLAGS_FOR_BUILD (theses variables are left empty for now), It sounds less confusing that overriding CC by CC_FOR_BUILD.
*** Bug 447000 has been marked as a duplicate of this bug. *** I have applied Pinky's fix in fontconfig-2.10.2. I'd like to hear from embedded if this works and whether there is a better fix they prefer. (In reply to comment #9) unfortunately, that fix isn't really that much better, nor is it really needed anymore. the subdirs specifically check for cross-compiling now: if CROSS_COMPILING $(TARG): $(STMPL) fc-glyphname.c $(SGLYPHNAME) @echo Warning: cannot rebuild $(TARG) when cross-compiling else $(TARG): $(STMPL) fc-glyphname$(EXEEXT) $(SGLYPHNAME) $(AM_V_GEN) $(RM) $(TARG); \ ./fc-glyphname$(EXEEXT) $(SGLYPHNAME) < $(STMPL) > $(TARG).tmp && \ mv $(TARG).tmp $(TARG) endif also, the latest version no longer has a fc-arch/ subdir to `sed`: sed: can't read fc-arch/Makefile.in: No such file or directory i've dropped all the cross-compiling workarounds in 2.10.2 http://sources.gentoo.org/media-libs/fontconfig/fontconfig-2.10.2.ebuild?r1=1.1&r2=1.2 |