Use gcc option "-ffile-prefix-map" if available.
This will remap any hard-coded __FILE__ containing build host
path to a reproducible value, with the absolute build-host path
stripped.

Signed-off-by: Juro Bystricky <[email protected]>
---
 meta/classes/module.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
index 78d1b21..e0670bf 100644
--- a/meta/classes/module.bbclass
+++ b/meta/classes/module.bbclass
@@ -1,4 +1,4 @@
-inherit module-base kernel-module-split pkgconfig
+inherit module-base kernel-module-split pkgconfig compiler-options
 
 addtask make_scripts after do_prepare_recipe_sysroot before do_configure
 do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
@@ -40,9 +40,10 @@ python do_devshell_prepend () {
 
 module_do_compile() {
        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+       cc_extra=$(file_prefix_map_option_supported ${KERNEL_CC})
        oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR}   \
                   KERNEL_VERSION=${KERNEL_VERSION}    \
-                  CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
+                  CC="${KERNEL_CC} $cc_extra" LD="${KERNEL_LD}" \
                   AR="${KERNEL_AR}" \
                   O=${STAGING_KERNEL_BUILDDIR} \
                   KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \
-- 
2.7.4

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to