summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-12-14 21:13:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-16 10:23:23 +0000
commitc4e2c59088765d1f1de7ec57cde91980f887c2ff (patch)
treea2fda8ac5916fb59a711e9220c2177008cca9347 /meta/recipes-devtools/gcc
parentd5e67725ac11e3296cad104470931ffa16824b90 (diff)
downloadpoky-c4e2c59088765d1f1de7ec57cde91980f887c2ff.tar.gz
meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-common.inc32
-rw-r--r--meta/recipes-devtools/gcc/gcc-configure-common.inc2
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross.inc2
-rw-r--r--meta/recipes-devtools/gcc/gcc-multilib-config.inc20
-rw-r--r--meta/recipes-devtools/gcc/libgcc-common.inc38
-rw-r--r--meta/recipes-devtools/gcc/libgfortran.inc2
6 files changed, 48 insertions, 48 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index f540b4d965..d17ba29d1d 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -10,35 +10,35 @@ inherit autotools gettext texinfo
10BPN = "gcc" 10BPN = "gcc"
11 11
12def get_gcc_float_setting(bb, d): 12def get_gcc_float_setting(bb, d):
13 if d.getVar('ARMPKGSFX_EABI', True) == "hf" and d.getVar('TRANSLATED_TARGET_ARCH', True) == "arm": 13 if d.getVar('ARMPKGSFX_EABI') == "hf" and d.getVar('TRANSLATED_TARGET_ARCH') == "arm":
14 return "--with-float=hard" 14 return "--with-float=hard"
15 if d.getVar('TARGET_FPU', True) in [ 'soft' ]: 15 if d.getVar('TARGET_FPU') in [ 'soft' ]:
16 return "--with-float=soft" 16 return "--with-float=soft"
17 if d.getVar('TARGET_FPU', True) in [ 'ppc-efd' ]: 17 if d.getVar('TARGET_FPU') in [ 'ppc-efd' ]:
18 return "--enable-e500_double" 18 return "--enable-e500_double"
19 return "" 19 return ""
20 20
21get_gcc_float_setting[vardepvalue] = "${@get_gcc_float_setting(bb, d)}" 21get_gcc_float_setting[vardepvalue] = "${@get_gcc_float_setting(bb, d)}"
22 22
23def get_gcc_mips_plt_setting(bb, d): 23def get_gcc_mips_plt_setting(bb, d):
24 if d.getVar('TRANSLATED_TARGET_ARCH', True) in [ 'mips', 'mipsel' ] and bb.utils.contains('DISTRO_FEATURES', 'mplt', True, False, d): 24 if d.getVar('TRANSLATED_TARGET_ARCH') in [ 'mips', 'mipsel' ] and bb.utils.contains('DISTRO_FEATURES', 'mplt', True, False, d):
25 return "--with-mips-plt" 25 return "--with-mips-plt"
26 return "" 26 return ""
27 27
28def get_gcc_ppc_plt_settings(bb, d): 28def get_gcc_ppc_plt_settings(bb, d):
29 if d.getVar('TRANSLATED_TARGET_ARCH', True) in [ 'powerpc' ] and not bb.utils.contains('DISTRO_FEATURES', 'bssplt', True, False, d): 29 if d.getVar('TRANSLATED_TARGET_ARCH') in [ 'powerpc' ] and not bb.utils.contains('DISTRO_FEATURES', 'bssplt', True, False, d):
30 return "--enable-secureplt" 30 return "--enable-secureplt"
31 return "" 31 return ""
32 32
33def get_long_double_setting(bb, d): 33def get_long_double_setting(bb, d):
34 if d.getVar('TRANSLATED_TARGET_ARCH', True) in [ 'powerpc', 'powerpc64' ] and d.getVar('TCLIBC', True) in [ 'uclibc', 'glibc' ]: 34 if d.getVar('TRANSLATED_TARGET_ARCH') in [ 'powerpc', 'powerpc64' ] and d.getVar('TCLIBC') in [ 'uclibc', 'glibc' ]:
35 return "--with-long-double-128" 35 return "--with-long-double-128"
36 else: 36 else:
37 return "--without-long-double-128" 37 return "--without-long-double-128"
38 return "" 38 return ""
39 39
40def get_gcc_multiarch_setting(bb, d): 40def get_gcc_multiarch_setting(bb, d):
41 target_arch = d.getVar('TRANSLATED_TARGET_ARCH', True) 41 target_arch = d.getVar('TRANSLATED_TARGET_ARCH')
42 multiarch_options = { 42 multiarch_options = {
43 "i586": "--enable-targets=all", 43 "i586": "--enable-targets=all",
44 "i686": "--enable-targets=all", 44 "i686": "--enable-targets=all",
@@ -54,7 +54,7 @@ def get_gcc_multiarch_setting(bb, d):
54 54
55# this is used by the multilib setup of gcc 55# this is used by the multilib setup of gcc
56def get_tune_parameters(tune, d): 56def get_tune_parameters(tune, d):
57 availtunes = d.getVar('AVAILTUNES', True) 57 availtunes = d.getVar('AVAILTUNES')
58 if tune not in availtunes.split(): 58 if tune not in availtunes.split():
59 bb.error('The tune: %s is not one of the available tunes: %s' % (tune or None, availtunes)) 59 bb.error('The tune: %s is not one of the available tunes: %s' % (tune or None, availtunes))
60 60
@@ -65,15 +65,15 @@ def get_tune_parameters(tune, d):
65 65
66 retdict = {} 66 retdict = {}
67 retdict['tune'] = tune 67 retdict['tune'] = tune
68 retdict['ccargs'] = localdata.getVar('TUNE_CCARGS', True) 68 retdict['ccargs'] = localdata.getVar('TUNE_CCARGS')
69 retdict['features'] = localdata.getVar('TUNE_FEATURES', True) 69 retdict['features'] = localdata.getVar('TUNE_FEATURES')
70 # BASELIB is used by the multilib code to change library paths 70 # BASELIB is used by the multilib code to change library paths
71 retdict['baselib'] = localdata.getVar('BASE_LIB', True) or localdata.getVar('BASELIB', True) 71 retdict['baselib'] = localdata.getVar('BASE_LIB') or localdata.getVar('BASELIB')
72 retdict['arch'] = localdata.getVar('TUNE_ARCH', True) 72 retdict['arch'] = localdata.getVar('TUNE_ARCH')
73 retdict['abiextension'] = localdata.getVar('ABIEXTENSION', True) 73 retdict['abiextension'] = localdata.getVar('ABIEXTENSION')
74 retdict['target_fpu'] = localdata.getVar('TARGET_FPU', True) 74 retdict['target_fpu'] = localdata.getVar('TARGET_FPU')
75 retdict['pkgarch'] = localdata.getVar('TUNE_PKGARCH', True) 75 retdict['pkgarch'] = localdata.getVar('TUNE_PKGARCH')
76 retdict['package_extra_archs'] = localdata.getVar('PACKAGE_EXTRA_ARCHS', True) 76 retdict['package_extra_archs'] = localdata.getVar('PACKAGE_EXTRA_ARCHS')
77 return retdict 77 return retdict
78 78
79get_tune_parameters[vardepsexclude] = "AVAILTUNES TUNE_CCARGS OVERRIDES TUNE_FEATURES BASE_LIB BASELIB TUNE_ARCH ABIEXTENSION TARGET_FPU TUNE_PKGARCH PACKAGE_EXTRA_ARCHS" 79get_tune_parameters[vardepsexclude] = "AVAILTUNES TUNE_CCARGS OVERRIDES TUNE_FEATURES BASE_LIB BASELIB TUNE_ARCH ABIEXTENSION TARGET_FPU TUNE_PKGARCH PACKAGE_EXTRA_ARCHS"
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
index ddebbb8410..00ef89ec57 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -23,7 +23,7 @@ GCCMULTILIB ?= "--disable-multilib"
23GCCTHREADS ?= "posix" 23GCCTHREADS ?= "posix"
24 24
25EXTRA_OECONF = "\ 25EXTRA_OECONF = "\
26 ${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) != 'no']} \ 26 ${@['--enable-clocale=generic', ''][d.getVar('USE_NLS') != 'no']} \
27 --with-gnu-ld \ 27 --with-gnu-ld \
28 --enable-shared \ 28 --enable-shared \
29 --enable-languages=${LANGUAGES} \ 29 --enable-languages=${LANGUAGES} \
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
index cc465a2796..c4f7084ba0 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -5,7 +5,7 @@ EXTRADEPENDS = ""
5DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc ${EXTRADEPENDS} ${NATIVEDEPS}" 5DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc ${EXTRADEPENDS} ${NATIVEDEPS}"
6PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" 6PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
7python () { 7python () {
8 if d.getVar("TARGET_OS", True).startswith("linux"): 8 if d.getVar("TARGET_OS").startswith("linux"):
9 d.setVar("EXTRADEPENDS", "linux-libc-headers") 9 d.setVar("EXTRADEPENDS", "linux-libc-headers")
10} 10}
11 11
diff --git a/meta/recipes-devtools/gcc/gcc-multilib-config.inc b/meta/recipes-devtools/gcc/gcc-multilib-config.inc
index a0a2ac09a7..31b8619be3 100644
--- a/meta/recipes-devtools/gcc/gcc-multilib-config.inc
+++ b/meta/recipes-devtools/gcc/gcc-multilib-config.inc
@@ -21,8 +21,8 @@ python gcc_multilib_setup() {
21 import shutil 21 import shutil
22 import glob 22 import glob
23 23
24 srcdir = d.getVar('S', True) 24 srcdir = d.getVar('S')
25 builddir = d.getVar('B', True) 25 builddir = d.getVar('B')
26 src_conf_dir = '%s/gcc/config' % srcdir 26 src_conf_dir = '%s/gcc/config' % srcdir
27 build_conf_dir = '%s/gcc/config' % builddir 27 build_conf_dir = '%s/gcc/config' % builddir
28 28
@@ -43,12 +43,12 @@ python gcc_multilib_setup() {
43 bb.utils.mkdirhier('%s/%s' % (build_conf_dir, parent_dir)) 43 bb.utils.mkdirhier('%s/%s' % (build_conf_dir, parent_dir))
44 bb.utils.copyfile(fn, '%s/%s' % (build_conf_dir, rel_path)) 44 bb.utils.copyfile(fn, '%s/%s' % (build_conf_dir, rel_path))
45 45
46 pn = d.getVar('PN', True) 46 pn = d.getVar('PN')
47 multilibs = (d.getVar('MULTILIB_VARIANTS', True) or '').split() 47 multilibs = (d.getVar('MULTILIB_VARIANTS') or '').split()
48 if not multilibs and pn != "nativesdk-gcc": 48 if not multilibs and pn != "nativesdk-gcc":
49 return 49 return
50 50
51 mlprefix = d.getVar('MLPREFIX', True) 51 mlprefix = d.getVar('MLPREFIX')
52 52
53 if ('%sgcc' % mlprefix) != pn and (not pn.startswith('gcc-cross-canadian')) and pn != "nativesdk-gcc": 53 if ('%sgcc' % mlprefix) != pn and (not pn.startswith('gcc-cross-canadian')) and pn != "nativesdk-gcc":
54 return 54 return
@@ -155,10 +155,10 @@ python gcc_multilib_setup() {
155 libdirn32 = 'SYSTEMLIBS_DIR' 155 libdirn32 = 'SYSTEMLIBS_DIR'
156 156
157 157
158 target_arch = (d.getVar('TARGET_ARCH_MULTILIB_ORIGINAL', True) if mlprefix 158 target_arch = (d.getVar('TARGET_ARCH_MULTILIB_ORIGINAL') if mlprefix
159 else d.getVar('TARGET_ARCH', True)) 159 else d.getVar('TARGET_ARCH'))
160 if pn == "nativesdk-gcc": 160 if pn == "nativesdk-gcc":
161 header_config_files = gcc_header_config_files[d.getVar("SDK_ARCH", True)] 161 header_config_files = gcc_header_config_files[d.getVar("SDK_ARCH")]
162 write_headers(builddir, header_config_files, libdir32, libdir64, libdirx32, libdirn32) 162 write_headers(builddir, header_config_files, libdir32, libdir64, libdirx32, libdirn32)
163 return 163 return
164 164
@@ -188,7 +188,7 @@ python gcc_multilib_setup() {
188 optsets = [] 188 optsets = []
189 189
190 for ml in ml_list: 190 for ml in ml_list:
191 tune = d.getVar(ml, True) 191 tune = d.getVar(ml)
192 if not tune: 192 if not tune:
193 bb.warn("%s doesn't have a corresponding tune. Skipping..." % ml) 193 bb.warn("%s doesn't have a corresponding tune. Skipping..." % ml)
194 continue 194 continue
@@ -212,7 +212,7 @@ python gcc_multilib_setup() {
212 212
213 # take out '-' mcpu='s and march='s from parameters 213 # take out '-' mcpu='s and march='s from parameters
214 opts = [] 214 opts = []
215 whitelist = (d.getVar("MULTILIB_OPTION_WHITELIST", True) or "").split() 215 whitelist = (d.getVar("MULTILIB_OPTION_WHITELIST") or "").split()
216 for i in d.expand(tune_parameters['ccargs']).split(): 216 for i in d.expand(tune_parameters['ccargs']).split():
217 if i in whitelist: 217 if i in whitelist:
218 # Need to strip '-' from option 218 # Need to strip '-' from option
diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc b/meta/recipes-devtools/gcc/libgcc-common.inc
index 8a13f542c1..74e9faa528 100644
--- a/meta/recipes-devtools/gcc/libgcc-common.inc
+++ b/meta/recipes-devtools/gcc/libgcc-common.inc
@@ -64,18 +64,18 @@ addtask multilib_install after do_install before do_package do_populate_sysroot
64fakeroot python do_multilib_install() { 64fakeroot python do_multilib_install() {
65 import re 65 import re
66 66
67 multilibs = d.getVar('MULTILIB_VARIANTS', True) 67 multilibs = d.getVar('MULTILIB_VARIANTS')
68 if not multilibs or bb.data.inherits_class('nativesdk', d): 68 if not multilibs or bb.data.inherits_class('nativesdk', d):
69 return 69 return
70 70
71 binv = d.getVar('BINV', True) 71 binv = d.getVar('BINV')
72 72
73 mlprefix = d.getVar('MLPREFIX', True) 73 mlprefix = d.getVar('MLPREFIX')
74 if ('%slibgcc' % mlprefix) != d.getVar('PN', True): 74 if ('%slibgcc' % mlprefix) != d.getVar('PN'):
75 return 75 return
76 76
77 if mlprefix: 77 if mlprefix:
78 orig_tune = d.getVar('DEFAULTTUNE_MULTILIB_ORIGINAL', True) 78 orig_tune = d.getVar('DEFAULTTUNE_MULTILIB_ORIGINAL')
79 orig_tune_params = get_tune_parameters(orig_tune, d) 79 orig_tune_params = get_tune_parameters(orig_tune, d)
80 orig_tune_baselib = orig_tune_params['baselib'] 80 orig_tune_baselib = orig_tune_params['baselib']
81 orig_tune_bitness = orig_tune_baselib.replace('lib', '') 81 orig_tune_bitness = orig_tune_baselib.replace('lib', '')
@@ -83,10 +83,10 @@ fakeroot python do_multilib_install() {
83 orig_tune_bitness = '32' 83 orig_tune_bitness = '32'
84 84
85 src = '../../../' + orig_tune_baselib + '/' + \ 85 src = '../../../' + orig_tune_baselib + '/' + \
86 d.getVar('TARGET_SYS_MULTILIB_ORIGINAL', True) + '/' + binv + '/' 86 d.getVar('TARGET_SYS_MULTILIB_ORIGINAL') + '/' + binv + '/'
87 87
88 dest = d.getVar('D', True) + d.getVar('libdir', True) + '/' + \ 88 dest = d.getVar('D') + d.getVar('libdir') + '/' + \
89 d.getVar('TARGET_SYS', True) + '/' + binv + '/' + orig_tune_bitness 89 d.getVar('TARGET_SYS') + '/' + binv + '/' + orig_tune_bitness
90 90
91 if os.path.lexists(dest): 91 if os.path.lexists(dest):
92 os.unlink(dest) 92 os.unlink(dest)
@@ -95,7 +95,7 @@ fakeroot python do_multilib_install() {
95 95
96 96
97 for ml in multilibs.split(): 97 for ml in multilibs.split():
98 tune = d.getVar('DEFAULTTUNE_virtclass-multilib-' + ml, True) 98 tune = d.getVar('DEFAULTTUNE_virtclass-multilib-' + ml)
99 if not tune: 99 if not tune:
100 bb.warn('DEFAULTTUNE_virtclass-multilib-%s is not defined. Skipping...' % ml) 100 bb.warn('DEFAULTTUNE_virtclass-multilib-%s is not defined. Skipping...' % ml)
101 continue 101 continue
@@ -118,11 +118,11 @@ fakeroot python do_multilib_install() {
118 libcextension = '' 118 libcextension = ''
119 119
120 src = '../../../' + tune_baselib + '/' + \ 120 src = '../../../' + tune_baselib + '/' + \
121 tune_arch + d.getVar('TARGET_VENDOR', True) + 'ml' + ml + \ 121 tune_arch + d.getVar('TARGET_VENDOR') + 'ml' + ml + \
122 '-' + d.getVar('TARGET_OS', True) + libcextension + '/' + binv + '/' 122 '-' + d.getVar('TARGET_OS') + libcextension + '/' + binv + '/'
123 123
124 dest = d.getVar('D', True) + d.getVar('libdir', True) + '/' + \ 124 dest = d.getVar('D') + d.getVar('libdir') + '/' + \
125 d.getVar('TARGET_SYS', True) + '/' + binv + '/' + tune_bitness 125 d.getVar('TARGET_SYS') + '/' + binv + '/' + tune_bitness
126 126
127 if os.path.lexists(dest): 127 if os.path.lexists(dest):
128 os.unlink(dest) 128 os.unlink(dest)
@@ -131,7 +131,7 @@ fakeroot python do_multilib_install() {
131 131
132def get_original_os(d): 132def get_original_os(d):
133 vendoros = d.expand('${TARGET_ARCH}${ORIG_TARGET_VENDOR}-${TARGET_OS}') 133 vendoros = d.expand('${TARGET_ARCH}${ORIG_TARGET_VENDOR}-${TARGET_OS}')
134 for suffix in [d.getVar('ABIEXTENSION', True), d.getVar('LIBCEXTENSION', True)]: 134 for suffix in [d.getVar('ABIEXTENSION'), d.getVar('LIBCEXTENSION')]:
135 if suffix and vendoros.endswith(suffix): 135 if suffix and vendoros.endswith(suffix):
136 vendoros = vendoros[:-len(suffix)] 136 vendoros = vendoros[:-len(suffix)]
137 # Arm must use linux-gnueabi not linux as only the former is accepted by gcc 137 # Arm must use linux-gnueabi not linux as only the former is accepted by gcc
@@ -144,11 +144,11 @@ BASETARGET_SYS = "${@get_original_os(d)}"
144 144
145addtask extra_symlinks after do_multilib_install before do_package do_populate_sysroot 145addtask extra_symlinks after do_multilib_install before do_package do_populate_sysroot
146fakeroot python do_extra_symlinks() { 146fakeroot python do_extra_symlinks() {
147 targetsys = d.getVar('BASETARGET_SYS', True) 147 targetsys = d.getVar('BASETARGET_SYS')
148 148
149 if targetsys != d.getVar('TARGET_SYS', True): 149 if targetsys != d.getVar('TARGET_SYS'):
150 dest = d.getVar('D', True) + d.getVar('libdir', True) + '/' + targetsys 150 dest = d.getVar('D') + d.getVar('libdir') + '/' + targetsys
151 src = d.getVar('TARGET_SYS', True) 151 src = d.getVar('TARGET_SYS')
152 if not os.path.lexists(dest) and os.path.lexists(d.getVar('D', True) + d.getVar('libdir', True)): 152 if not os.path.lexists(dest) and os.path.lexists(d.getVar('D') + d.getVar('libdir')):
153 os.symlink(src, dest) 153 os.symlink(src, dest)
154} 154}
diff --git a/meta/recipes-devtools/gcc/libgfortran.inc b/meta/recipes-devtools/gcc/libgfortran.inc
index 58ceb2e073..194363543e 100644
--- a/meta/recipes-devtools/gcc/libgfortran.inc
+++ b/meta/recipes-devtools/gcc/libgfortran.inc
@@ -69,7 +69,7 @@ do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
69do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata" 69do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
70 70
71python __anonymous () { 71python __anonymous () {
72 f = d.getVar("FORTRAN", True) 72 f = d.getVar("FORTRAN")
73 if "fortran" not in f: 73 if "fortran" not in f:
74 raise bb.parse.SkipPackage("libgfortran needs fortran support to be enabled in the compiler") 74 raise bb.parse.SkipPackage("libgfortran needs fortran support to be enabled in the compiler")
75} 75}