allweax / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

Gyp's Makefile generator not fully compatible with cross compiling #484

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Originally reported as 
https://code.google.com/p/chromium/issues/detail?id=473025

If you declare actions in gyp with 'toolsets': ['host', 'target'] and generate 
Makefiles for the project, you get multiple makefiles with the same rules and 
you get warnings about conflicting/overriding rules such as:

third_party/icu/icu_zone_res_files.target.ia32.release.mk:640: warning: 
overriding commands for target 
`/home/bratell/src/v8/v8/out/ia32.release/obj/gen/icudt54l/zone/in.res'
third_party/icu/icu_zone_res_files.host.ia32.release.mk:640: warning: ignoring 
old commands for target 
`/home/bratell/src/v8/v8/out/ia32.release/obj/gen/icudt54l/zone/in.res'

The rules look like 

$(obj)/gen/icudt54l/zone/root.res: obj := $(abs_obj)
$(obj)/gen/icudt54l/zone/root.res: builddir := $(abs_builddir)
$(obj)/gen/icudt54l/zone/root.res: TOOLSET := $(TOOLSET)
$(obj)/gen/icudt54l/zone/root.res: 
$(srcdir)/third_party/icu/source/data/zone/root.txt $(builddir)/genrb 
$(srcdir)/third_party/icu/source/data/zone/pool.res FORCE_DO_CMD
    $(call do_cmd,third_party_icu_icu_data_gyp_icu_zone_res_files_target_genrb_0)

I believe the problem here is that $(obj) should not be $(obj). It needs to 
either be expanded to the real path or somehow modified to refer to the right 
directory.

Sorry for the terseness of this bug report. I don't fully understand the 
problems myself.

Original issue reported on code.google.com by brat...@opera.com on 14 Apr 2015 at 1:09