diff options
author | Mike Crowe <mac@mcrowe.com> | 2021-02-28 12:20:54 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-03-28 22:31:55 +0100 |
commit | 4aaa1a4f9400c33f891d552f43f6e0660094c3ee (patch) | |
tree | e6e195114d63ace09b3ef23891fd7640f9c3f53a /meta/recipes-devtools | |
parent | 2d88e1c2098c357d8b7541564109fdeb77ba8185 (diff) | |
download | poky-4aaa1a4f9400c33f891d552f43f6e0660094c3ee.tar.gz |
gcc-sanitizers: Move content from gcclibdir into libdir
In e9e5744ba8b0d43c8b874d365f83071ce20bf0a1, Khem Raj wrote:
> OE does not use the traditional /usr/lib/gcc prefix to store
> gcc-runtime it basically is moved into libdir, however some newer
> files were installed by newer versions of gcc especially libgomp (
> omp.h openacc.h ) into gcclibdir, so we have content in both
> directories, this confuses other tools which are trying to guess the
> gcc installation and its runtime location, since now we have two
> directories, the tools either choose one or other and we get
> inconsistent behavior, e.g. clang for aarch64 uses /usr/lib but same
> clang for riscv64 chose /usr/lib/gcc
> This change ensures that OE ends up with single valid location for gcc
> runtime files
I think that the same thing needs to happen in gcc-sanitizers.inc,
otherwise I get errors like:
| .../recipe-sysroot/usr/include/gpg-error-64.h:884:11: fatal error: sanitizer/lsan_interface.h: No such file or directory
when attempting to compile with sanitizers enabled.
FILES_${PN} needs updating to match too.
(From OE-Core rev: 6b9e85e48ba43be74d51c7af703ba787f36e3241)
Signed-off-by: Mike Crowe <mac@mcrowe.com>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 862b4fac3ee7d951758c8c93462331ad52bf0190)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-sanitizers.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc index 668e14a59f..9e643ee277 100644 --- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc +++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc | |||
@@ -35,6 +35,11 @@ do_compile () { | |||
35 | do_install () { | 35 | do_install () { |
36 | cd ${B}/${TARGET_SYS}/libsanitizer/ | 36 | cd ${B}/${TARGET_SYS}/libsanitizer/ |
37 | oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/libsanitizer/ install | 37 | oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/libsanitizer/ install |
38 | if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include ]; then | ||
39 | install -d ${D}${libdir}/${TARGET_SYS}/${BINV}/include | ||
40 | mv ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/* ${D}${libdir}/${TARGET_SYS}/${BINV}/include | ||
41 | rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include | ||
42 | fi | ||
38 | if [ -d ${D}${infodir} ]; then | 43 | if [ -d ${D}${infodir} ]; then |
39 | rmdir --ignore-fail-on-non-empty -p ${D}${infodir} | 44 | rmdir --ignore-fail-on-non-empty -p ${D}${infodir} |
40 | fi | 45 | fi |
@@ -109,4 +114,4 @@ FILES_libtsan-dev += "\ | |||
109 | " | 114 | " |
110 | FILES_libtsan-staticdev += "${libdir}/libtsan.a" | 115 | FILES_libtsan-staticdev += "${libdir}/libtsan.a" |
111 | 116 | ||
112 | FILES_${PN} = "${libdir}/*.spec ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/sanitizer/*.h" | 117 | FILES_${PN} = "${libdir}/*.spec ${libdir}/${TARGET_SYS}/${BINV}/include/sanitizer/*.h" |