diff options
-rw-r--r-- | meta/classes/archiver.bbclass | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 4064674294..d709f788a7 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass | |||
@@ -73,8 +73,15 @@ python () { | |||
73 | # We can't use "addtask do_ar_configured after do_configure" since it | 73 | # We can't use "addtask do_ar_configured after do_configure" since it |
74 | # will cause the deptask of do_populate_sysroot to run not matter what | 74 | # will cause the deptask of do_populate_sysroot to run not matter what |
75 | # archives we need, so we add the depends here. | 75 | # archives we need, so we add the depends here. |
76 | d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_configure' % pn) | 76 | |
77 | # There is a corner case with "gcc-source-${PV}" recipes, they don't have | ||
78 | # the "do_configure" task, so we need to use "do_preconfigure" | ||
79 | if pn.startswith("gcc-source-"): | ||
80 | d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_preconfigure' % pn) | ||
81 | else: | ||
82 | d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_configure' % pn) | ||
77 | d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_configured' % pn) | 83 | d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_configured' % pn) |
84 | |||
78 | elif ar_src: | 85 | elif ar_src: |
79 | bb.fatal("Invalid ARCHIVER_MODE[src]: %s" % ar_src) | 86 | bb.fatal("Invalid ARCHIVER_MODE[src]: %s" % ar_src) |
80 | 87 | ||
@@ -168,11 +175,18 @@ python do_ar_configured() { | |||
168 | ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) | 175 | ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) |
169 | if d.getVarFlag('ARCHIVER_MODE', 'src', True) == 'configured': | 176 | if d.getVarFlag('ARCHIVER_MODE', 'src', True) == 'configured': |
170 | bb.note('Archiving the configured source...') | 177 | bb.note('Archiving the configured source...') |
178 | pn = d.getVar('PN', True) | ||
179 | # "gcc-source-${PV}" recipes don't have "do_configure" | ||
180 | # task, so we need to run "do_preconfigure" instead | ||
181 | if pn.startswith("gcc-source-"): | ||
182 | d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR', True)) | ||
183 | bb.build.exec_func('do_preconfigure', d) | ||
184 | |||
171 | # The libtool-native's do_configure will remove the | 185 | # The libtool-native's do_configure will remove the |
172 | # ${STAGING_DATADIR}/aclocal/libtool.m4, so we can't re-run the | 186 | # ${STAGING_DATADIR}/aclocal/libtool.m4, so we can't re-run the |
173 | # do_configure, we archive the already configured ${S} to | 187 | # do_configure, we archive the already configured ${S} to |
174 | # instead of. | 188 | # instead of. |
175 | if d.getVar('PN', True) != 'libtool-native': | 189 | elif pn != 'libtool-native': |
176 | # Change the WORKDIR to make do_configure run in another dir. | 190 | # Change the WORKDIR to make do_configure run in another dir. |
177 | d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR', True)) | 191 | d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR', True)) |
178 | if bb.data.inherits_class('kernel-yocto', d): | 192 | if bb.data.inherits_class('kernel-yocto', d): |