* [Buildroot] [PATCH v2 1/1] dieharder: fix link issue with inline function not declared static
@ 2017-07-24 12:59 Julien Viard de Galbert
2017-07-24 13:06 ` Romain NAOUR
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Julien Viard de Galbert @ 2017-07-24 12:59 UTC (permalink / raw)
To: buildroot
Signed-off-by: Julien Viard de Galbert <julien@vdg.name>
---
Changes V1 -> V2
- Clarified the reason for the patch c99 std for inline + gcc7
- Since 2017-06-23 ? received the following reports all with the same failure:
http://autobuild.buildroot.net/results/b629754c6a820446ff38df8202ea1ed0041bc4ac
http://autobuild.buildroot.net/results/e02325e06866618d9d3ee90600dc3326465c56a1
http://autobuild.buildroot.net/results/c1db73dcb25ea1db4be0f9d6ce2bf2d02f5bd5bb
http://autobuild.buildroot.net/results/bd93120ee7cbfeb4fe7cbcd7f845f131743caf05
http://autobuild.buildroot.net/results/273ba504de31bc17fd41e91ee5d6c0b34797a4f9
http://autobuild.buildroot.net/results/37920b26f9c4853a0d620eb4a33b50b53e548888
http://autobuild.buildroot.net/results/ee668405ed234fbbd644a01d49e8d9d41d216cf6
http://autobuild.buildroot.net/results/5b76d62ad03d0cbe483792b32ea14ce7d7432983
http://autobuild.buildroot.net/results/cf08d42be8fcb659d59288e2cedf3f18b660e8a6
http://autobuild.buildroot.net/results/e1309fd2eea5daf854f4314b92ec441092239cd5
---
.../0004-Add-static-to-inline-functions.patch | 65 ++++++++++++++++++++++
1 file changed, 65 insertions(+)
create mode 100644 package/dieharder/0004-Add-static-to-inline-functions.patch
diff --git a/package/dieharder/0004-Add-static-to-inline-functions.patch b/package/dieharder/0004-Add-static-to-inline-functions.patch
new file mode 100644
index 0000000000..64cde1d21d
--- /dev/null
+++ b/package/dieharder/0004-Add-static-to-inline-functions.patch
@@ -0,0 +1,65 @@
+From 9c71a211dcf20f53f747326f5bc3fee9fabe3f52 Mon Sep 17 00:00:00 2001
+From: Julien Viard de Galbert <julien@vdg.name>
+Date: Tue, 27 Jun 2017 00:16:11 +0200
+Subject: [PATCH] Add static to inline functions
+
+This is needed to avoid a link error where the inline functions appear
+missing at link time.
+From c99 standard inline function should either be declared static or
+have an extern instance in a c file for linking.
+This fix is necessary to build with gcc 7; for some reason it was not
+trigerred before.
+
+Signed-off-by: Julien Viard de Galbert <julien@vdg.name>
+---
+ libdieharder/dab_filltree.c | 4 ++--
+ libdieharder/dab_filltree2.c | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libdieharder/dab_filltree.c b/libdieharder/dab_filltree.c
+index 9cc5ce7..a377c3d 100644
+--- a/libdieharder/dab_filltree.c
++++ b/libdieharder/dab_filltree.c
+@@ -34,7 +34,7 @@ static double targetData[] = {
+ 0.0, 0.0, 0.0, 0.0, 0.13333333, 0.20000000, 0.20634921, 0.17857143, 0.13007085, 0.08183633, 0.04338395, 0.01851828, 0.00617270, 0.00151193, 0.00023520, 0.00001680, 0.00000000, 0.00000000, 0.00000000, 0.00000000
+ };
+
+-inline int insert(double x, double *array, unsigned int startVal);
++static inline int insert(double x, double *array, unsigned int startVal);
+
+ int dab_filltree(Test **test,int irun) {
+ int size = (ntuple == 0) ? 32 : ntuple;
+@@ -105,7 +105,7 @@ int dab_filltree(Test **test,int irun) {
+ }
+
+
+-inline int insert(double x, double *array, unsigned int startVal) {
++static inline int insert(double x, double *array, unsigned int startVal) {
+ uint d = (startVal + 1) / 2;
+ uint i = startVal;
+ while (d > 0) {
+diff --git a/libdieharder/dab_filltree2.c b/libdieharder/dab_filltree2.c
+index 1e33af2..59cbd52 100644
+--- a/libdieharder/dab_filltree2.c
++++ b/libdieharder/dab_filltree2.c
+@@ -92,7 +92,7 @@ static double targetData[128] = { // size=128, generated from 6e9 samples
+ 0.00000000000e+00,0.00000000000e+00,0.00000000000e+00,0.00000000000e+00,
+ };
+
+-inline int insertBit(uint x, uchar *array, uint *i, uint *d);
++static inline int insertBit(uint x, uchar *array, uint *i, uint *d);
+
+ int dab_filltree2(Test **test, int irun) {
+ int size = (ntuple == 0) ? 128 : ntuple;
+@@ -181,7 +181,7 @@ int dab_filltree2(Test **test, int irun) {
+ * The function returns >= 0 if the path went too deep; the
+ * returned value is the last position of the path.
+ */
+-inline int insertBit(uint x, uchar *array, uint *i, uint *d) {
++static inline int insertBit(uint x, uchar *array, uint *i, uint *d) {
+ if (x != 0) {
+ *i += *d;
+ } else {
+--
+2.13.2
+
--
2.13.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 1/1] dieharder: fix link issue with inline function not declared static
2017-07-24 12:59 [Buildroot] [PATCH v2 1/1] dieharder: fix link issue with inline function not declared static Julien Viard de Galbert
@ 2017-07-24 13:06 ` Romain NAOUR
2017-07-25 20:19 ` Thomas Petazzoni
2017-07-25 22:20 ` Peter Korsgaard
2 siblings, 0 replies; 5+ messages in thread
From: Romain NAOUR @ 2017-07-24 13:06 UTC (permalink / raw)
To: buildroot
Hi Julien,
Le 2017-07-24 14:59, Julien Viard de Galbert a ?crit :
> Signed-off-by: Julien Viard de Galbert <julien@vdg.name>
>
> ---
> Changes V1 -> V2
> - Clarified the reason for the patch c99 std for inline + gcc7
> - Since 2017-06-23 ? received the following reports all with the same
> failure:
>
http://autobuild.buildroot.net/results/b629754c6a820446ff38df8202ea1ed0041bc4ac
> [1]
>
http://autobuild.buildroot.net/results/e02325e06866618d9d3ee90600dc3326465c56a1
> [2]
>
http://autobuild.buildroot.net/results/c1db73dcb25ea1db4be0f9d6ce2bf2d02f5bd5bb
> [3]
>
http://autobuild.buildroot.net/results/bd93120ee7cbfeb4fe7cbcd7f845f131743caf05
> [4]
>
http://autobuild.buildroot.net/results/273ba504de31bc17fd41e91ee5d6c0b34797a4f9
> [5]
>
http://autobuild.buildroot.net/results/37920b26f9c4853a0d620eb4a33b50b53e548888
> [6]
>
http://autobuild.buildroot.net/results/ee668405ed234fbbd644a01d49e8d9d41d216cf6
> [7]
>
http://autobuild.buildroot.net/results/5b76d62ad03d0cbe483792b32ea14ce7d7432983
> [8]
>
http://autobuild.buildroot.net/results/cf08d42be8fcb659d59288e2cedf3f18b660e8a6
> [9]
>
http://autobuild.buildroot.net/results/e1309fd2eea5daf854f4314b92ec441092239cd5
> [10]
These autobuilder references must be part of the commit log (above ---)
Romain
> ---
> .../0004-Add-static-to-inline-functions.patch | 65
> ++++++++++++++++++++++
> 1 file changed, 65 insertions(+)
> create mode 100644
> package/dieharder/0004-Add-static-to-inline-functions.patch
>
> diff --git
> a/package/dieharder/0004-Add-static-to-inline-functions.patch
> b/package/dieharder/0004-Add-static-to-inline-functions.patch
> new file mode 100644
> index 0000000000..64cde1d21d
> --- /dev/null
> +++ b/package/dieharder/0004-Add-static-to-inline-functions.patch
> @@ -0,0 +1,65 @@
> +From 9c71a211dcf20f53f747326f5bc3fee9fabe3f52 Mon Sep 17 00:00:00
> 2001
> +From: Julien Viard de Galbert <julien@vdg.name>
> +Date: Tue, 27 Jun 2017 00:16:11 +0200
> +Subject: [PATCH] Add static to inline functions
> +
> +This is needed to avoid a link error where the inline functions
> appear
> +missing at link time.
> +From c99 standard inline function should either be declared static or
> +have an extern instance in a c file for linking.
> +This fix is necessary to build with gcc 7; for some reason it was not
> +trigerred before.
> +
> +Signed-off-by: Julien Viard de Galbert <julien@vdg.name>
> +---
> + libdieharder/dab_filltree.c | 4 ++--
> + libdieharder/dab_filltree2.c | 4 ++--
> + 2 files changed, 4 insertions(+), 4 deletions(-)
> +
> +diff --git a/libdieharder/dab_filltree.c
> b/libdieharder/dab_filltree.c
> +index 9cc5ce7..a377c3d 100644
> +--- a/libdieharder/dab_filltree.c
> ++++ b/libdieharder/dab_filltree.c
> +@@ -34,7 +34,7 @@ static double targetData[] = {
> + 0.0, 0.0, 0.0, 0.0, 0.13333333, 0.20000000, 0.20634921, 0.17857143,
> 0.13007085, 0.08183633, 0.04338395, 0.01851828, 0.00617270,
> 0.00151193,
> 0.00023520, 0.00001680, 0.00000000, 0.00000000, 0.00000000, 0.00000000
> + };
> +
> +-inline int insert(double x, double *array, unsigned int startVal);
> ++static inline int insert(double x, double *array, unsigned int
> startVal);
> +
> + int dab_filltree(Test **test,int irun) {
> + int size = (ntuple == 0) ? 32 : ntuple;
> +@@ -105,7 +105,7 @@ int dab_filltree(Test **test,int irun) {
> + }
> +
> +
> +-inline int insert(double x, double *array, unsigned int startVal) {
> ++static inline int insert(double x, double *array, unsigned int
> startVal) {
> + uint d = (startVal + 1) / 2;
> + uint i = startVal;
> + while (d > 0) {
> +diff --git a/libdieharder/dab_filltree2.c
> b/libdieharder/dab_filltree2.c
> +index 1e33af2..59cbd52 100644
> +--- a/libdieharder/dab_filltree2.c
> ++++ b/libdieharder/dab_filltree2.c
> +@@ -92,7 +92,7 @@ static double targetData[128] = { // size=128,
> generated from 6e9 samples
> +
> 0.00000000000e+00,0.00000000000e+00,0.00000000000e+00,0.00000000000e+00,
> + };
> +
> +-inline int insertBit(uint x, uchar *array, uint *i, uint *d);
> ++static inline int insertBit(uint x, uchar *array, uint *i, uint *d);
> +
> + int dab_filltree2(Test **test, int irun) {
> + int size = (ntuple == 0) ? 128 : ntuple;
> +@@ -181,7 +181,7 @@ int dab_filltree2(Test **test, int irun) {
> + * The function returns >= 0 if the path went too deep; the
> + * returned value is the last position of the path.
> + */
> +-inline int insertBit(uint x, uchar *array, uint *i, uint *d) {
> ++static inline int insertBit(uint x, uchar *array, uint *i, uint *d)
> {
> + if (x != 0) {
> + *i += *d;
> + } else {
> +--
> +2.13.2
> +
Links:
------
[1]
http://autobuild.buildroot.net/results/b629754c6a820446ff38df8202ea1ed0041bc4ac
[2]
http://autobuild.buildroot.net/results/e02325e06866618d9d3ee90600dc3326465c56a1
[3]
http://autobuild.buildroot.net/results/c1db73dcb25ea1db4be0f9d6ce2bf2d02f5bd5bb
[4]
http://autobuild.buildroot.net/results/bd93120ee7cbfeb4fe7cbcd7f845f131743caf05
[5]
http://autobuild.buildroot.net/results/273ba504de31bc17fd41e91ee5d6c0b34797a4f9
[6]
http://autobuild.buildroot.net/results/37920b26f9c4853a0d620eb4a33b50b53e548888
[7]
http://autobuild.buildroot.net/results/ee668405ed234fbbd644a01d49e8d9d41d216cf6
[8]
http://autobuild.buildroot.net/results/5b76d62ad03d0cbe483792b32ea14ce7d7432983
[9]
http://autobuild.buildroot.net/results/cf08d42be8fcb659d59288e2cedf3f18b660e8a6
[10]
http://autobuild.buildroot.net/results/e1309fd2eea5daf854f4314b92ec441092239cd5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 1/1] dieharder: fix link issue with inline function not declared static
2017-07-24 12:59 [Buildroot] [PATCH v2 1/1] dieharder: fix link issue with inline function not declared static Julien Viard de Galbert
2017-07-24 13:06 ` Romain NAOUR
@ 2017-07-25 20:19 ` Thomas Petazzoni
2017-07-26 7:38 ` Julien Viard de Galbert
2017-07-25 22:20 ` Peter Korsgaard
2 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2017-07-25 20:19 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 24 Jul 2017 14:59:34 +0200, Julien Viard de Galbert wrote:
> Signed-off-by: Julien Viard de Galbert <julien@vdg.name>
>
> ---
> Changes V1 -> V2
> - Clarified the reason for the patch c99 std for inline + gcc7
> - Since 2017-06-23 ? received the following reports all with the same failure:
> http://autobuild.buildroot.net/results/b629754c6a820446ff38df8202ea1ed0041bc4ac
> http://autobuild.buildroot.net/results/e02325e06866618d9d3ee90600dc3326465c56a1
> http://autobuild.buildroot.net/results/c1db73dcb25ea1db4be0f9d6ce2bf2d02f5bd5bb
> http://autobuild.buildroot.net/results/bd93120ee7cbfeb4fe7cbcd7f845f131743caf05
> http://autobuild.buildroot.net/results/273ba504de31bc17fd41e91ee5d6c0b34797a4f9
> http://autobuild.buildroot.net/results/37920b26f9c4853a0d620eb4a33b50b53e548888
> http://autobuild.buildroot.net/results/ee668405ed234fbbd644a01d49e8d9d41d216cf6
> http://autobuild.buildroot.net/results/5b76d62ad03d0cbe483792b32ea14ce7d7432983
> http://autobuild.buildroot.net/results/cf08d42be8fcb659d59288e2cedf3f18b660e8a6
> http://autobuild.buildroot.net/results/e1309fd2eea5daf854f4314b92ec441092239cd5
> ---
> .../0004-Add-static-to-inline-functions.patch | 65 ++++++++++++++++++++++
> 1 file changed, 65 insertions(+)
> create mode 100644 package/dieharder/0004-Add-static-to-inline-functions.patch
Applied to master after putting the autobuilder references in the
commit log. Could you also submit the patch to the upstream project ?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 1/1] dieharder: fix link issue with inline function not declared static
2017-07-24 12:59 [Buildroot] [PATCH v2 1/1] dieharder: fix link issue with inline function not declared static Julien Viard de Galbert
2017-07-24 13:06 ` Romain NAOUR
2017-07-25 20:19 ` Thomas Petazzoni
@ 2017-07-25 22:20 ` Peter Korsgaard
2 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2017-07-25 22:20 UTC (permalink / raw)
To: buildroot
>>>>> "Julien" == Julien Viard de Galbert <julien@vdg.name> writes:
> Signed-off-by: Julien Viard de Galbert <julien@vdg.name>
> ---
> Changes V1 -> V2
> - Clarified the reason for the patch c99 std for inline + gcc7
> - Since 2017-06-23 ? received the following reports all with the same failure:
> http://autobuild.buildroot.net/results/b629754c6a820446ff38df8202ea1ed0041bc4ac
> http://autobuild.buildroot.net/results/e02325e06866618d9d3ee90600dc3326465c56a1
> http://autobuild.buildroot.net/results/c1db73dcb25ea1db4be0f9d6ce2bf2d02f5bd5bb
> http://autobuild.buildroot.net/results/bd93120ee7cbfeb4fe7cbcd7f845f131743caf05
> http://autobuild.buildroot.net/results/273ba504de31bc17fd41e91ee5d6c0b34797a4f9
> http://autobuild.buildroot.net/results/37920b26f9c4853a0d620eb4a33b50b53e548888
> http://autobuild.buildroot.net/results/ee668405ed234fbbd644a01d49e8d9d41d216cf6
> http://autobuild.buildroot.net/results/5b76d62ad03d0cbe483792b32ea14ce7d7432983
> http://autobuild.buildroot.net/results/cf08d42be8fcb659d59288e2cedf3f18b660e8a6
> http://autobuild.buildroot.net/results/e1309fd2eea5daf854f4314b92ec441092239cd5
Committed to 2017.05.x (not in 2017.02.x), thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 1/1] dieharder: fix link issue with inline function not declared static
2017-07-25 20:19 ` Thomas Petazzoni
@ 2017-07-26 7:38 ` Julien Viard de Galbert
0 siblings, 0 replies; 5+ messages in thread
From: Julien Viard de Galbert @ 2017-07-26 7:38 UTC (permalink / raw)
To: buildroot
On Tue, Jul 25, 2017 at 10:19:48PM +0200, Thomas Petazzoni wrote:
> Hello,
>
> On Mon, 24 Jul 2017 14:59:34 +0200, Julien Viard de Galbert wrote:
> > Signed-off-by: Julien Viard de Galbert <julien@vdg.name>
> >
> > ---
> > Changes V1 -> V2
> > - Clarified the reason for the patch c99 std for inline + gcc7
> > - Since 2017-06-23 ? received the following reports all with the same failure:
> > http://autobuild.buildroot.net/results/b629754c6a820446ff38df8202ea1ed0041bc4ac
> > http://autobuild.buildroot.net/results/e02325e06866618d9d3ee90600dc3326465c56a1
> > http://autobuild.buildroot.net/results/c1db73dcb25ea1db4be0f9d6ce2bf2d02f5bd5bb
> > http://autobuild.buildroot.net/results/bd93120ee7cbfeb4fe7cbcd7f845f131743caf05
> > http://autobuild.buildroot.net/results/273ba504de31bc17fd41e91ee5d6c0b34797a4f9
> > http://autobuild.buildroot.net/results/37920b26f9c4853a0d620eb4a33b50b53e548888
> > http://autobuild.buildroot.net/results/ee668405ed234fbbd644a01d49e8d9d41d216cf6
> > http://autobuild.buildroot.net/results/5b76d62ad03d0cbe483792b32ea14ce7d7432983
> > http://autobuild.buildroot.net/results/cf08d42be8fcb659d59288e2cedf3f18b660e8a6
> > http://autobuild.buildroot.net/results/e1309fd2eea5daf854f4314b92ec441092239cd5
> > ---
> > .../0004-Add-static-to-inline-functions.patch | 65 ++++++++++++++++++++++
> > 1 file changed, 65 insertions(+)
> > create mode 100644 package/dieharder/0004-Add-static-to-inline-functions.patch
>
> Applied to master after putting the autobuilder references in the
Thanks !
I'll know for future contributions that the autobuilder references need
to be in commit message. Thanks.
> commit log. Could you also submit the patch to the upstream project ?
Yes I'll do it, thanks for the reminder.
Best Regards,
Julien
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-07-26 7:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-24 12:59 [Buildroot] [PATCH v2 1/1] dieharder: fix link issue with inline function not declared static Julien Viard de Galbert
2017-07-24 13:06 ` Romain NAOUR
2017-07-25 20:19 ` Thomas Petazzoni
2017-07-26 7:38 ` Julien Viard de Galbert
2017-07-25 22:20 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox