diff options
| -rw-r--r-- | meta/recipes-support/libunwind/libunwind-1.1/musl-header-conflict.patch | 37 | ||||
| -rw-r--r-- | meta/recipes-support/libunwind/libunwind_1.1.bb | 1 |
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-support/libunwind/libunwind-1.1/musl-header-conflict.patch b/meta/recipes-support/libunwind/libunwind-1.1/musl-header-conflict.patch new file mode 100644 index 0000000000..79f63fd84e --- /dev/null +++ b/meta/recipes-support/libunwind/libunwind-1.1/musl-header-conflict.patch | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | If you: | ||
| 2 | |||
| 3 | TCLIBC=musl bitbake unwind | ||
| 4 | TCLIBC=musl bitbake gcc-runtime -c cleansstate | ||
| 5 | TCLIBC=musl bitbake gcc-runtime | ||
| 6 | |||
| 7 | you will see libstdc++ fail to build due to finding libunwind's header file. | ||
| 8 | |||
| 9 | Khem: "When we build any of gcc components they expect to use internal version | ||
| 10 | and that works with glibc based gcc since the search headers first look into gcc | ||
| 11 | headers, however with musl the gcc headers are searched after the standard | ||
| 12 | headers ( which is by design the right thing )." | ||
| 13 | |||
| 14 | This patch hacks around the issue by looking for a define used during gcc-runtime's | ||
| 15 | build and skipping to the internal header in that case. | ||
| 16 | |||
| 17 | [YOCTO #10129] | ||
| 18 | |||
| 19 | RP 2016/8/18 | ||
| 20 | |||
| 21 | Upstream-Status: Inappropriate [really need to fix gcc] | ||
| 22 | |||
| 23 | Index: git/include/unwind.h | ||
| 24 | =================================================================== | ||
| 25 | --- git.orig/include/unwind.h | ||
| 26 | +++ git/include/unwind.h | ||
| 27 | @@ -23,6 +23,10 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER L | ||
| 28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
| 29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ | ||
| 30 | |||
| 31 | +#ifdef _GLIBCXX_SHARED | ||
| 32 | +#include_next <unwind.h> | ||
| 33 | +#endif | ||
| 34 | + | ||
| 35 | #ifndef _UNWIND_H | ||
| 36 | #define _UNWIND_H | ||
| 37 | |||
diff --git a/meta/recipes-support/libunwind/libunwind_1.1.bb b/meta/recipes-support/libunwind/libunwind_1.1.bb index 1e76c1a8c4..d9da1ad9a9 100644 --- a/meta/recipes-support/libunwind/libunwind_1.1.bb +++ b/meta/recipes-support/libunwind/libunwind_1.1.bb | |||
| @@ -15,6 +15,7 @@ SRC_URI_append_libc-musl = "\ | |||
| 15 | file://0001-x86-Stub-out-x86_local_resume.patch \ | 15 | file://0001-x86-Stub-out-x86_local_resume.patch \ |
| 16 | file://0001-disable-tests.patch \ | 16 | file://0001-disable-tests.patch \ |
| 17 | file://0001-Fix-build-on-mips-musl.patch \ | 17 | file://0001-Fix-build-on-mips-musl.patch \ |
| 18 | file://musl-header-conflict.patch \ | ||
| 18 | " | 19 | " |
| 19 | SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce" | 20 | SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce" |
| 20 | SRC_URI[sha256sum] = "9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a" | 21 | SRC_URI[sha256sum] = "9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a" |
