summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-multilib-config.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-multilib-config.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-multilib-config.inc25
1 files changed, 16 insertions, 9 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-multilib-config.inc b/meta/recipes-devtools/gcc/gcc-multilib-config.inc
index dcd08190b1..8c07c2d5f8 100644
--- a/meta/recipes-devtools/gcc/gcc-multilib-config.inc
+++ b/meta/recipes-devtools/gcc/gcc-multilib-config.inc
@@ -39,13 +39,14 @@ python gcc_multilib_setup() {
39 bb.utils.mkdirhier('%s/%s' % (build_conf_dir, parent_dir)) 39 bb.utils.mkdirhier('%s/%s' % (build_conf_dir, parent_dir))
40 bb.utils.copyfile(fn, '%s/%s' % (build_conf_dir, rel_path)) 40 bb.utils.copyfile(fn, '%s/%s' % (build_conf_dir, rel_path))
41 41
42 pn = d.getVar('PN', True)
42 multilibs = (d.getVar('MULTILIB_VARIANTS', True) or '').split() 43 multilibs = (d.getVar('MULTILIB_VARIANTS', True) or '').split()
43 if not multilibs: 44 if not multilibs and pn != "nativesdk-gcc":
44 return 45 return
45 46
46 mlprefix = d.getVar('MLPREFIX', True) 47 mlprefix = d.getVar('MLPREFIX', True)
47 pn = d.getVar('PN', True) 48
48 if ('%sgcc' % mlprefix) != pn and (not pn.startswith('gcc-cross-canadian')): 49 if ('%sgcc' % mlprefix) != pn and (not pn.startswith('gcc-cross-canadian')) and pn != "nativesdk-gcc":
49 return 50 return
50 51
51 52
@@ -74,7 +75,7 @@ python gcc_multilib_setup() {
74 def write_headers(root, files, libdir32, libdir64, libdirx32, libdirn32): 75 def write_headers(root, files, libdir32, libdir64, libdirx32, libdirn32):
75 def wrap_libdir(libdir): 76 def wrap_libdir(libdir):
76 if libdir.find('SYSTEMLIBS_DIR') != -1: 77 if libdir.find('SYSTEMLIBS_DIR') != -1:
77 return libdir 78 return '"%r"'
78 else: 79 else:
79 return '"/%s/"' % libdir 80 return '"/%s/"' % libdir
80 81
@@ -135,17 +136,23 @@ python gcc_multilib_setup() {
135 'powerpc64' : ['gcc/config/rs6000/linux64.h'], 136 'powerpc64' : ['gcc/config/rs6000/linux64.h'],
136 } 137 }
137 138
139 libdir32 = 'SYSTEMLIBS_DIR'
140 libdir64 = 'SYSTEMLIBS_DIR'
141 libdirx32 = 'SYSTEMLIBS_DIR'
142 libdirn32 = 'SYSTEMLIBS_DIR'
143
144
138 target_arch = (d.getVar('TARGET_ARCH_MULTILIB_ORIGINAL', True) if mlprefix 145 target_arch = (d.getVar('TARGET_ARCH_MULTILIB_ORIGINAL', True) if mlprefix
139 else d.getVar('TARGET_ARCH', True)) 146 else d.getVar('TARGET_ARCH', True))
147 if pn == "nativesdk-gcc":
148 header_config_files = gcc_header_config_files[d.getVar("SDK_ARCH", True)]
149 write_headers(builddir, header_config_files, libdir32, libdir64, libdirx32, libdirn32)
150 return
151
140 if target_arch not in gcc_target_config_files: 152 if target_arch not in gcc_target_config_files:
141 bb.warn('gcc multilib setup is not supported for TARGET_ARCH=' + target_arch) 153 bb.warn('gcc multilib setup is not supported for TARGET_ARCH=' + target_arch)
142 return 154 return
143 155
144 libdir32 = 'SYSTEMLIBS_DIR'
145 libdir64 = 'SYSTEMLIBS_DIR'
146 libdirx32 = 'SYSTEMLIBS_DIR'
147 libdirn32 = 'SYSTEMLIBS_DIR'
148
149 target_config_files = gcc_target_config_files[target_arch] 156 target_config_files = gcc_target_config_files[target_arch]
150 header_config_files = gcc_header_config_files[target_arch] 157 header_config_files = gcc_header_config_files[target_arch]
151 158