summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authormark.yang <mark.yang@lge.com>2025-04-02 01:20:32 +0900
committerKhem Raj <raj.khem@gmail.com>2025-04-01 20:43:27 -0700
commitf3880aa2bb06abb3ec2696ab3c82efccd1e9a274 (patch)
tree037607c5bcddd3dd6571a69e5453af23595ba119 /meta-oe
parent0d2b2b54fc7dcc25544566d98ad5e421cbd28c61 (diff)
downloadmeta-openembedded-f3880aa2bb06abb3ec2696ab3c82efccd1e9a274.tar.gz
linpack: fix build with gcc-15.0.1
* fix following error: linpacknew.c: In function 'dgefa': linpacknew.c:257:9: error: conflicting types for 'idamax'; have 'int(void)' 257 | int idamax(),j,k,kp1,l,nm1; | ^~~~~~ linpacknew.c:63:13: note: previous declaration of 'idamax' with type 'int(int, REAL *, int)' {aka 'int(int, double *, int)'} 63 | static int idamax (int n,REAL *dx,int incx); | ^~~~~~ linpacknew.c:272:21: error: too many arguments to function 'idamax'; expected 0, have 3 272 | l = idamax(n-k,&a[lda*k+k],1) + k; | ^~~~~~ ~~~ linpacknew.c:257:9: note: declared here 257 | int idamax(),j,k,kp1,l,nm1; | ^~~~~~ linpacknew.c:326:21: error: too many arguments to function 'idamax'; expected 0, have 3 326 | l = idamax(n-k,&a[lda*k+k],1) + k; | ^~~~~~ ~~~ linpacknew.c:257:9: note: declared here 257 | int idamax(),j,k,kp1,l,nm1; | ^~~~~~ The function was already declared as static int idamax(int n, REAL *dx, int incx); on line 63, but it was redeclared as int idamax() inside the dgefa function on line 257, causing a conflict. where functions are redeclared without parameters, causing conflicts with the original function definitions. Signed-off-by: mark.yang <mark.yang@lge.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-benchmark/linpack/linpack/0001-Fix-build-error-in-gcc-15.0.1-due-to-function-redecl.patch52
-rw-r--r--meta-oe/recipes-benchmark/linpack/linpack_1.0.bb1
2 files changed, 53 insertions, 0 deletions
diff --git a/meta-oe/recipes-benchmark/linpack/linpack/0001-Fix-build-error-in-gcc-15.0.1-due-to-function-redecl.patch b/meta-oe/recipes-benchmark/linpack/linpack/0001-Fix-build-error-in-gcc-15.0.1-due-to-function-redecl.patch
new file mode 100644
index 0000000000..fbde7396c2
--- /dev/null
+++ b/meta-oe/recipes-benchmark/linpack/linpack/0001-Fix-build-error-in-gcc-15.0.1-due-to-function-redecl.patch
@@ -0,0 +1,52 @@
1From a1c1211fd6fc8d82053074c6dc531340f046c8d4 Mon Sep 17 00:00:00 2001
2From: "mark.yang" <mark.yang@lge.com>
3Date: Tue, 1 Apr 2025 16:06:56 +0900
4Subject: [PATCH] Fix build error in gcc 15.0.1 due to function redeclaration.
5
6Fix build error:
7linpacknew.c: In function 'dgefa':
8linpacknew.c:257:9: error: conflicting types for 'idamax'; have 'int(void)'
9 257 | int idamax(),j,k,kp1,l,nm1;
10 | ^~~~~~
11linpacknew.c:63:13: note: previous declaration of 'idamax' with type 'int(int, REAL *, int)' {aka 'int(int, double *, int)'}
12 63 | static int idamax (int n,REAL *dx,int incx);
13 | ^~~~~~
14linpacknew.c:272:21: error: too many arguments to function 'idamax'; expected 0, have 3
15 272 | l = idamax(n-k,&a[lda*k+k],1) + k;
16 | ^~~~~~ ~~~
17linpacknew.c:257:9: note: declared here
18 257 | int idamax(),j,k,kp1,l,nm1;
19 | ^~~~~~
20linpacknew.c:326:21: error: too many arguments to function 'idamax'; expected 0, have 3
21 326 | l = idamax(n-k,&a[lda*k+k],1) + k;
22 | ^~~~~~ ~~~
23linpacknew.c:257:9: note: declared here
24 257 | int idamax(),j,k,kp1,l,nm1;
25 | ^~~~~~
26
27The function was already declared as static int idamax(int n, REAL *dx, int incx);
28on line 63, but it was redeclared as int idamax() inside the dgefa function on line 257,
29causing a conflict.
30where functions are redeclared without parameters,
31causing conflicts with the original function definitions.
32
33Upstream-Status: Inactive-Upstream [lastrelease: 2/25/94]
34
35Signed-off-by: mark.yang <mark.yang@lge.com>
36---
37 linpacknew.c | 2 +-
38 1 file changed, 1 insertion(+), 1 deletion(-)
39
40diff --git a/linpacknew.c b/linpacknew.c
41index c656082..5c8687b 100644
42--- a/linpacknew.c
43+++ b/linpacknew.c
44@@ -254,7 +254,7 @@ static void dgefa(REAL *a,int lda,int n,int *ipvt,int *info,int roll)
45
46 {
47 REAL t;
48- int idamax(),j,k,kp1,l,nm1;
49+ int j,k,kp1,l,nm1;
50
51 /* gaussian elimination with partial pivoting */
52
diff --git a/meta-oe/recipes-benchmark/linpack/linpack_1.0.bb b/meta-oe/recipes-benchmark/linpack/linpack_1.0.bb
index fe540749b5..735b5560e0 100644
--- a/meta-oe/recipes-benchmark/linpack/linpack_1.0.bb
+++ b/meta-oe/recipes-benchmark/linpack/linpack_1.0.bb
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://${UNPACKDIR}/linpacknew.c;beginline=1;endline=23;md5=
6 6
7SRC_URI = "http://www.netlib.org/benchmark/linpackc.new;downloadfilename=linpacknew.c \ 7SRC_URI = "http://www.netlib.org/benchmark/linpackc.new;downloadfilename=linpacknew.c \
8 file://0001-linpack-Define-DP-only-when-SP-is-not-defined.patch \ 8 file://0001-linpack-Define-DP-only-when-SP-is-not-defined.patch \
9 file://0001-Fix-build-error-in-gcc-15.0.1-due-to-function-redecl.patch \
9 " 10 "
10SRC_URI[sha256sum] = "a63f2ec86512959f1fd926bfafb85905b2d7b7402942ffae3af374d48745e97e" 11SRC_URI[sha256sum] = "a63f2ec86512959f1fd926bfafb85905b2d7b7402942ffae3af374d48745e97e"
11 12