Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2,1/1] package/bayer2rgb-neon: replace patch
@ 2022-08-08 13:33 Fabrice Fontaine
  2022-08-08 20:49 ` [Buildroot] [PATCH v2, 1/1] " Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2022-08-08 13:33 UTC (permalink / raw)
  To: buildroot; +Cc: Eloi Bail, Fabrice Fontaine

Replace patch by upstream patch

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Changes v1 -> v2:
 - Fix title

 ...add-some-_always_inline_-annotations.patch | 75 +++++++++++++++++++
 ...-src-convert.c-remove-have_cplusplus.patch | 56 --------------
 2 files changed, 75 insertions(+), 56 deletions(-)
 create mode 100644 package/bayer2rgb-neon/0001-add-some-_always_inline_-annotations.patch
 delete mode 100644 package/bayer2rgb-neon/0001-src-convert.c-remove-have_cplusplus.patch

diff --git a/package/bayer2rgb-neon/0001-add-some-_always_inline_-annotations.patch b/package/bayer2rgb-neon/0001-add-some-_always_inline_-annotations.patch
new file mode 100644
index 0000000000..281f90c875
--- /dev/null
+++ b/package/bayer2rgb-neon/0001-add-some-_always_inline_-annotations.patch
@@ -0,0 +1,75 @@
+From 4e5d8be1b0d18453b76fca2c5139222a071dd207 Mon Sep 17 00:00:00 2001
+From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
+Date: Mon, 4 Jul 2022 12:05:30 +0200
+Subject: [PATCH] add some _always_inline_ annotations
+
+enforce inlining to fix build errors with '-Og'
+
+fixes #1
+
+Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
+[Retrieved from:
+https://gitlab-ext.sigma-chemnitz.de/ensc/bayer2rgb/-/commit/4e5d8be1b0d18453b76fca2c5139222a071dd207]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ src/convert.c | 5 +++--
+ src/main.c    | 5 +++--
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/src/convert.c b/src/convert.c
+index c852a14..ec77040 100644
+--- a/src/convert.c
++++ b/src/convert.c
+@@ -17,8 +17,9 @@
+ #include <stdbool.h>
+ #include <assert.h>
+ #include "bayer2rgb.h"
++#include "compiler.h"
+ 
+-static bool have_neon()
++inline static  _always_inline_ bool have_neon()
+ {
+ #ifdef HAVE_NEON
+ 	return true;
+@@ -27,7 +28,7 @@ static bool have_neon()
+ #endif
+ }
+ 
+-static bool have_cplusplus()
++inline static  _always_inline_ bool have_cplusplus()
+ {
+ #ifdef HAVE_CPLUSPLUS
+ 	return true;
+diff --git a/src/main.c b/src/main.c
+index 841a142..087e8e5 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -33,6 +33,7 @@
+ 
+ #include "src/bayer2rgb.h"
+ #include "src/bayer2rgb-cmdline.h"
++#include "src/compiler.h"
+ 
+ #define BPP_TO_BYTE(_bpp)	(((_bpp) + 7) / 8)
+ 
+@@ -68,7 +69,7 @@ struct x_image_out {
+ 	size_t			total_size;
+ };
+ 
+-inline static bool have_neon(void)
++inline static  _always_inline_ bool have_neon(void)
+ {
+ #ifdef HAVE_NEON
+ 	return true;
+@@ -77,7 +78,7 @@ inline static bool have_neon(void)
+ #endif
+ }
+ 
+-static bool have_cplusplus()
++inline static  _always_inline_ bool have_cplusplus()
+ {
+ #ifdef HAVE_CPLUSPLUS
+ 	return true;
+-- 
+GitLab
+
diff --git a/package/bayer2rgb-neon/0001-src-convert.c-remove-have_cplusplus.patch b/package/bayer2rgb-neon/0001-src-convert.c-remove-have_cplusplus.patch
deleted file mode 100644
index 71a6291a3c..0000000000
--- a/package/bayer2rgb-neon/0001-src-convert.c-remove-have_cplusplus.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From ca68dadf585aadb8adf582cd94f8fcdd4592e09f Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Sun, 26 Jun 2022 10:31:49 +0200
-Subject: [PATCH] src/convert.c: remove have_cplusplus
-
-Remove have_cplusplus function for simplicity and to avoid the following
-build failure:
-
-/home/autobuild/autobuild/instance-12/output-1/host/lib/gcc/aarch64-buildroot-linux-uclibc/10.3.0/../../../../aarch64-buildroot-linux-uclibc/bin/ld: ./.libs/libbayer2rgb3.so: undefined reference to `__bayer2rgb_missing_convert_dumb_implementation'
-
-Fixes:
- - http://autobuild.buildroot.org/results/69a637b7f1422ce2bf04dda573abb09388b9a02d
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
----
- src/convert.c | 19 +++++--------------
- 1 file changed, 5 insertions(+), 14 deletions(-)
-
-diff --git a/src/convert.c b/src/convert.c
-index c852a14..83d631d 100644
---- a/src/convert.c
-+++ b/src/convert.c
-@@ -27,25 +27,16 @@ static bool have_neon()
- #endif
- }
- 
--static bool have_cplusplus()
--{
--#ifdef HAVE_CPLUSPLUS
--	return true;
--#else
--	return false;
--#endif
--}
--
- void bayer2rgb_convert_dumb(struct image_in const *input,
- 			    struct image_out const *output,
- 			    struct image_conversion_info *info)
- {
-+#ifdef HAVE_CPLUSPLUS
-+	return bayer2rgb_convert_cc(input, output, info);
-+#else
- 	extern void __bayer2rgb_missing_convert_dumb_implementation();
--
--	if (have_cplusplus())
--		return bayer2rgb_convert_cc(input, output, info);
--	else
--		__bayer2rgb_missing_convert_dumb_implementation();
-+	__bayer2rgb_missing_convert_dumb_implementation();
-+#endif
- }
- 
- void bayer2rgb_convert(struct image_in const *input,
--- 
-2.35.1
-
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH v2, 1/1] package/bayer2rgb-neon: replace patch
  2022-08-08 13:33 [Buildroot] [PATCH v2,1/1] package/bayer2rgb-neon: replace patch Fabrice Fontaine
@ 2022-08-08 20:49 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-08-08 20:49 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Eloi Bail, buildroot

On Mon,  8 Aug 2022 15:33:04 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Replace patch by upstream patch
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> Changes v1 -> v2:
>  - Fix title

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-08 20:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-08 13:33 [Buildroot] [PATCH v2,1/1] package/bayer2rgb-neon: replace patch Fabrice Fontaine
2022-08-08 20:49 ` [Buildroot] [PATCH v2, 1/1] " Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox