package/nanocom: fix build with gcc 10
PATCH 1/1 package/nanocom: fix build with gcc 10
Fixes:
- http://autobuild.buildroot.org/results/4af4710cb9bbb1bc770b9824339dd7dbf8a80b05
Signed-off-by Fabrice Fontaine <[email protected]>
--- .../nanocom/0001-fix-build-with-gcc-10.patch | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 package/nanocom/0001-fix-build-with-gcc-10.patch
package/nanocom/0001-fix-build-with-gcc-10.patch new file +36 -0
@@ -0,0 +1,36 @@ +fix build with gcc 10 + +Define curr_state as extern in nanocom.h to avoid the following build +failure with gcc 10 (which defaults to -fno-common): + +/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: /tmp/ccLQeiek.o:(.bss+0x7c): multiple definition of `curr_state'; /tmp/ccse155z.o:(.bss+0x0): first defined here + +Fixes: + - http://autobuild.buildroot.org/results/4af4710cb9bbb1bc770b9824339dd7dbf8a80b05 + +Signed-off-by: Fabrice Fontaine <[email protected]> + +diff -Naurp nanocom-1.0.orig/nanocom.c nanocom-1.0/nanocom.c +--- nanocom-1.0.orig/nanocom.c 2020-09-04 14:50:15.973320870 +0200 ++++ nanocom-1.0/nanocom.c 2020-09-04 14:53:49.429325087 +0200 +@@ -20,6 +20,8 @@ Based upon microcom by Anca and Lucian J + + #include "nanocom.h" + ++state curr_state; ++ + int crnl_mapping; //0 - no mapping, 1 mapping + + char device[MAX_DEVICE_NAME]; /* serial device name */ +diff -Naurp nanocom-1.0.orig/nanocom.h nanocom-1.0/nanocom.h +--- nanocom-1.0.orig/nanocom.h 2020-09-04 14:50:15.973320870 +0200 ++++ nanocom-1.0/nanocom.h 2020-09-04 14:51:12.269321982 +0200 +@@ -73,7 +73,7 @@ typedef struct { + char echo_type; /*r for remote, l for local and n for none*/ + } state; + +-state curr_state; ++extern state curr_state; + + #endif /* NANOCOM_H */ +
Signature · 1 line
2.28.0
Thomas Petazzoni
AppliedPATCH 1/1 package/nanocom: fix build with gcc 10
Quoted 8 lines · On Sat, 5 Sep 2020 12:16:14 +0200 Fabrice Fontaine…
Fixes:
- http://autobuild.buildroot.org/results/4af4710cb9bbb1bc770b9824339dd7dbf8a80b05Signed-off-by Fabrice Fontaine <[email protected]>--- .../nanocom/0001-fix-build-with-gcc-10.patch | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 package/nanocom/0001-fix-build-with-gcc-10.patch
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com