summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAlistair Delva <adelva@google.com>2022-09-26 20:47:10 +0000
committerTom Rini <trini@konsulko.com>2022-10-10 18:01:23 -0400
commit43b7dcdf343aefa4578532ab97931c4e3b334ad8 (patch)
treee11228bdbc3dc450082a15910dd1a5ecb263c4a6 /examples
parentc4c32e359662aa95d9dbda2bd1272181bd9cb830 (diff)
downloadu-boot-43b7dcdf343aefa4578532ab97931c4e3b334ad8.tar.gz
u-boot-43b7dcdf343aefa4578532ab97931c4e3b334ad8.tar.bz2
u-boot-43b7dcdf343aefa4578532ab97931c4e3b334ad8.zip
examples: standalone: Fix build with LLVM toolchain
When building the standalone example with llvm, the link step fails: examples/standalone/libstubs.o: In function `dummy': include/_exports.h:10: undefined reference to `jt' include/_exports.h:11: undefined reference to `jt' include/_exports.h:12: undefined reference to `jt' include/_exports.h:13: undefined reference to `jt' include/_exports.h:14: undefined reference to `jt' examples/standalone/libstubs.o:include/_exports.h:15: more undefined references to `jt' follow Indeed, the standalone libstubs.o does use the jt symbol, but it was marked 'static' in stubs.c. It's strange how gcc builds are working. Signed-off-by: Alistair Delva <adelva@google.com> Cc: Rick Chen <rick@andestech.com> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Nick Desaulniers <ndesaulniers@google.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/standalone/stubs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c
index ce05f41b0c..65115570e8 100644
--- a/examples/standalone/stubs.c
+++ b/examples/standalone/stubs.c
@@ -14,7 +14,7 @@ struct cmd_tbl;
* from flash memory. The global_data address is passed as argv[-1]
* to the application program.
*/
-static struct jt_funcs *jt;
+struct jt_funcs *jt;
gd_t *global_data;
#define EXPORT_FUNC(f, a, x, ...) \