rust.inc: start passing *FLAGS vars to compile
When rust's build system builds llvm itself, it uses these flags. Avoid them interfering with other things by cleaning their usage out of the platform cfg mk file.
This commit is contained in:
@@ -320,6 +320,15 @@ def rust_gen_mk_cfg(d, thing):
|
|||||||
i = open(d.getVar('S', True) + '/mk/cfg/' + rust_base_sys + '.mk', 'r')
|
i = open(d.getVar('S', True) + '/mk/cfg/' + rust_base_sys + '.mk', 'r')
|
||||||
|
|
||||||
r = subprocess.call(['sed',
|
r = subprocess.call(['sed',
|
||||||
|
# CFLAGS, LDFLAGS, CXXFLAGS, CPPFLAGS are used by rust's build for a
|
||||||
|
# wide range of targets (not just HOST). Yocto's settings for them will
|
||||||
|
# be inappropriate, avoid having random targets try to use them, we'll
|
||||||
|
# add as needed.
|
||||||
|
'-e', 's/$(CFLAGS)//',
|
||||||
|
'-e', 's/$(CXXFLAGS)//',
|
||||||
|
'-e', 's/$(CPPFLAGS)//',
|
||||||
|
'-e', 's/$(LDFLAGS)//',
|
||||||
|
|
||||||
# update all triplets to the new one
|
# update all triplets to the new one
|
||||||
'-e', 's/{}/{}/g'.format(rust_base_sys, sys),
|
'-e', 's/{}/{}/g'.format(rust_base_sys, sys),
|
||||||
|
|
||||||
@@ -377,14 +386,6 @@ do_configure () {
|
|||||||
|
|
||||||
# FIXME: target_prefix vs prefix, see cross.bbclass
|
# FIXME: target_prefix vs prefix, see cross.bbclass
|
||||||
|
|
||||||
# CFLAGS, LDFLAGS, CXXFLAGS, CPPFLAGS are used by rust's build for a
|
|
||||||
# wide range of targets (not just HOST). Yocto's settings for them will
|
|
||||||
# be inappropriate, avoid using.
|
|
||||||
unset CFLAGS
|
|
||||||
unset LDFLAGS
|
|
||||||
unset CXXFLAGS
|
|
||||||
unset CPPFLAGS
|
|
||||||
|
|
||||||
# FIXME: this path to rustc (via `which rustc`) may not be quite right in the case
|
# FIXME: this path to rustc (via `which rustc`) may not be quite right in the case
|
||||||
# where we're reinstalling the compiler. May want to try for a real
|
# where we're reinstalling the compiler. May want to try for a real
|
||||||
# path based on bitbake vars
|
# path based on bitbake vars
|
||||||
|
|||||||
Reference in New Issue
Block a user