Christophe Leroy
2020-Jun-17 14:49 UTC
[klibc] [PATCH] Kbuild for klibc and nfsmount: add -fcommon
-fcommon is not default anymore, with GCC 10 you get the following failure without it: KLIBCLD usr/klibc/libc.so ppc-linux-ld: usr/klibc/globals.o:/root/packages/klibc-2.0.7/usr/klibc/../include/unistd.h:15: multiple definition of `environ'; usr/klibc/__shared_init.o:/root/ldb_base/ofl/packages/klibc-2.0.7/usr/klibc/libc_init.c:42: first defined here ppc-linux-ld: usr/klibc/sbrk.o:(.sbss+0x0): multiple definition of `__current_brk'; usr/klibc/brk.o:(.sbss+0x0): first defined here ppc-linux-ld: usr/klibc/getopt_long.o:(.sbss+0x8): multiple definition of `optind'; usr/klibc/getopt.o:(.sbss+0x8): first defined here ppc-linux-ld: usr/klibc/getopt_long.o:(.sbss+0xc): multiple definition of `optarg'; usr/klibc/getopt.o:(.sbss+0xc): first defined here ppc-linux-ld: usr/klibc/getopt_long.o:(.sbss+0x0): multiple definition of `optopt'; usr/klibc/getopt.o:(.sbss+0x0): first defined here ppc-linux-ld: usr/klibc/getopt_long.o:(.sbss+0x4): multiple definition of `opterr'; usr/klibc/getopt.o:(.sbss+0x4): first defined here ppc-linux-ld: usr/klibc/mrand48.o:/root/ldb_base/ofl/packages/klibc-2.0.7/usr/klibc/mrand48.c:8: multiple definition of `__rand48_seed'; usr/klibc/lrand48.o:/root/ldb_base/ofl/packages/klibc-2.0.7/usr/klibc/lrand48.c:8: first defined here ppc-linux-ld: usr/klibc/srand48.o:/root/ldb_base/ofl/packages/klibc-2.0.7/usr/klibc/srand48.c:8: multiple definition of `__rand48_seed'; usr/klibc/lrand48.o:/root/ldb_base/ofl/packages/klibc-2.0.7/usr/klibc/lrand48.c:8: first defined here ppc-linux-ld: usr/klibc/seed48.o:/root/ldb_base/ofl/packages/klibc-2.0.7/usr/klibc/seed48.c:9: multiple definition of `__rand48_seed'; usr/klibc/lrand48.o:/root/ldb_base/ofl/packages/klibc-2.0.7/usr/klibc/lrand48.c:8: first defined here make[2]: *** [usr/klibc/libc.so] Error 1 Signed-off-by: Christophe Leroy <christophe.leroy at csgroup.eu> --- usr/kinit/nfsmount/Kbuild | 1 + usr/klibc/Kbuild | 1 + 2 files changed, 2 insertions(+) diff --git a/usr/kinit/nfsmount/Kbuild b/usr/kinit/nfsmount/Kbuild index 5f349500bf2d..83af8a253510 100644 --- a/usr/kinit/nfsmount/Kbuild +++ b/usr/kinit/nfsmount/Kbuild @@ -1,6 +1,7 @@ # # kbuild file for nfsmount # +EXTRA_KLIBCCFLAGS = -fcommon static-y := static/nfsmount #FIXME - build is broken static-y := dummypmap diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild index 24bad07da14e..71b7582811a5 100644 --- a/usr/klibc/Kbuild +++ b/usr/klibc/Kbuild @@ -1,6 +1,7 @@ # # Kbuild file for klibc # +EXTRA_KLIBCCFLAGS = -fcommon # Tell that we are building klibc export klibc-build := y -- 2.25.0
Thorsten Glaser
2020-Jun-17 17:11 UTC
[klibc] [PATCH] Kbuild for klibc and nfsmount: add -fcommon
Christophe Leroy dixit:>-fcommon is not default anymore, with GCC 10 you get the following >failure without it:Er, no. Better fix the code. bye, //mirabilos -- Solange man keine schmutzigen Tricks macht, und ich meine *wirklich* schmutzige Tricks, wie bei einer doppelt verketteten Liste beide Pointer XORen und in nur einem Word speichern, funktioniert Boehm ganz hervorragend. -- Andreas Bogk ?ber boehm-gc in d.a.s.r
Possibly Parallel Threads
- [PATCH] Kbuild for klibc and nfsmount: fix multiple definitions
- [PATCH] fix build failure when CONFIG_KLIBC_ZLIB is not set
- [PATCH v2] fix build failure when CONFIG_KLIBC_ZLIB is not set
- [klibc:master] fix build failure when CONFIG_KLIBC_ZLIB is not set
- [klibc:master] Kbuild: Add "-fcommon" for clang builds