Build libcxx and libcxxabi statically for armv7 and test building a C++ hello world

This commit is contained in:
Martin Storsjö authored and Martin Storsjo committed 2017-08-25 14:21:45 +03:00
1 parent 43906e77d6
commit ed96326423
5 files changed
+194 -60

No files matched your search

+42
View File
@@ -0,0 +1,42 @@
From 8dedb3528699061cab1fde4c80847ee492226d42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
Date: Fri, 25 Aug 2017 10:55:45 +0300
Subject: [PATCH 1/2] headers: Add casts in ua_wcs*chr in stralign.h
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When building libcxx, a version of wcschr that returns const
is provided, breaking compilation here since the return from
wcschr is returned directly as if it were a const pointer.
By adding these casts, compilation succeeds.
This matches the calls to uaw_wcschr and uaw_wcsrchr directly
below, having similar casts.
Signed-off-by: Martin Storsjö <martin@martin.st>
---
mingw-w64-headers/include/stralign.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mingw-w64-headers/include/stralign.h b/mingw-w64-headers/include/stralign.h
index 9b5637d..f4d9d6d 100644
--- a/mingw-w64-headers/include/stralign.h
+++ b/mingw-w64-headers/include/stralign.h
@@ -118,11 +118,11 @@ extern "C" {
#ifndef __CRT__NO_INLINE
__CRT_INLINE PUWSTR_C ua_wcschr(PCUWSTR String,WCHAR Character) {
- if(WSTR_ALIGNED(String)) return wcschr((PCWSTR)String,Character);
+ if(WSTR_ALIGNED(String)) return (PUWSTR_C)wcschr((PCWSTR)String,Character);
return (PUWSTR_C)uaw_wcschr(String,Character);
}
__CRT_INLINE PUWSTR_C ua_wcsrchr(PCUWSTR String,WCHAR Character) {
- if(WSTR_ALIGNED(String)) return wcsrchr((PCWSTR)String,Character);
+ if(WSTR_ALIGNED(String)) return (PUWSTR_C)wcsrchr((PCWSTR)String,Character);
return (PUWSTR_C)uaw_wcsrchr(String,Character);
}
#if defined(__cplusplus) && defined(_WConst_Return)
--
2.7.4