klcc-cross: Recognise clang options
PATCH 1/2 klcc-cross: Recognise clang options
Let klcc understand '-no-integrated-as' which is a clang option used by meta-clang for compiler defaults
Signed-off-by Khem Raj <[email protected]>
Cc Andrea Adami <[email protected]>
--- .../klcc-cross-accept-clang-options.patch | 19 +++++++++++++++++++ .../recipes-devtools/klibc/klibc.inc | 1 + 2 files changed, 20 insertions(+) create mode 100644 meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-cross-accept-clang-options.patch
meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-cross-accept-clang-options.patch new file +19 -0
@@ -0,0 +1,19 @@ +meta-clang passes this option to compiler defaults + +Upstream-Status: Pending +Signed-off-by: Khem Raj <[email protected]> + +Index: git/klcc/klcc.in +=================================================================== +--- git.orig/klcc/klcc.in ++++ git/klcc/klcc.in +@@ -207,6 +207,9 @@ while ( defined($a = shift(@ARGV)) ) { + } elsif ( $a =~ /^--([sysroot=])(.*)$/ ) { + # Override gcc encoded sysroot + push(@ccopt, $a); ++ } elsif ( $a eq '-no-integrated-as' ) { ++ # Allow clang options ++ push(@ccopt, $a); + } else { + die "$0: unknown option: $a\n"; + }
meta-initramfs/recipes-devtools/klibc/klibc.inc +1 -0
@@ -12,6 +12,7 @@ SRC_URI = "git://git.kernel.org/pub/scm/libs/klibc/klibc.git \ file://klibc-linux-libc-dev.patch \ file://staging.patch \ file://klcc-consider-sysroot.patch \ + file://klcc-cross-accept-clang-options.patch \ file://0001-dash-Specify-format-string-in-fmtstr.patch \ file://0001-Define-in_-structs-for-non-glibc-system-libs.patch \ file://0001-include-linux-sysinfo.h-directly.patch \
Signature · 1 line
2.18.0
PATCH 2/2 opencv: Fix build on big-endian systems
Signed-off-by Khem Raj <[email protected]>
--- ...001-Add-missing-multi-line-separator.patch | 36 +++++++++++++++++++ .../recipes-support/opencv/opencv_3.4.3.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta-oe/recipes-support/opencv/opencv/0001-Add-missing-multi-line-separator.patch
meta-oe/recipes-support/opencv/opencv/0001-Add-missing-multi-line-separator.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 60857229aab13ccc426572a43ab891409bb76ea4 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sun, 9 Sep 2018 22:52:55 -0700 +Subject: [PATCH] Add missing multi-line separator + +Otherwise this fails to build ( found on mips ) + +Fixes +contrib/modules/surface_matching/src/hash_murmur86.hpp:97:15: error: +expected constructor, destructor, or type conversion before '(' token + && defined(__GNUC__) && (__GNUC__>4 || (__GNUC__==4 && +__GNUC_MINOR__>=3)) + ^ + +Upstream-Status: Submitted [https://github.com/opencv/opencv_contrib/pull/1764] +Signed-off-by: Khem Raj <[email protected]> +--- + modules/surface_matching/src/hash_murmur86.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/surface_matching/src/hash_murmur86.hpp b/modules/surface_matching/src/hash_murmur86.hpp +index 1edf6bf4..0477d37e 100644 +--- a/modules/surface_matching/src/hash_murmur86.hpp ++++ b/modules/surface_matching/src/hash_murmur86.hpp +@@ -93,7 +93,7 @@ void hashMurmurx86 ( const void * key, const int len, const uint seed, void * ou + /* Now find best way we can to READ_UINT32 */ + #ifndef WORDS_BIGENDIAN + # define READ_UINT32(ptr) (*((uint32_t*)(ptr))) +-#elif defined(WORDS_BIGENDIAN) ++#elif defined(WORDS_BIGENDIAN) \ + && defined(__GNUC__) && (__GNUC__>4 || (__GNUC__==4 && __GNUC_MINOR__>=3)) + # define READ_UINT32(ptr) (__builtin_bswap32(*((uint32_t*)(ptr)))) + #endif +-- +2.18.0 +
meta-oe/recipes-support/opencv/opencv_3.4.3.bb +1 -0
@@ -46,6 +46,7 @@ SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \ https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz;destsuffix=git/3rdparty/tinydnn/tiny-dnn-1.0.0a3;name=tinydnn;unpack=false \ file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \ file://uselocalxfeatures.patch;patchdir=../contrib/ \ + file://0001-Add-missing-multi-line-separator.patch;patchdir=../contrib/ \ file://0002-Make-opencv-ts-create-share-library-intead-of-static.patch \ file://0003-To-fix-errors-as-following.patch \ file://fixpkgconfig.patch \
Signature · 1 line
2.18.0