From: Markos Chandras <markos.chand...@imgtec.com> A regression introduced in 1b3025b7352f5e432ffa1c7adc57085ac9092b77 "buildsys: switch libc to kbuild-style"
leading to the following linking problems: libc/libc_so.a(getsubopt-susv3.os): In function getsubopt': getsubopt-susv3.c:(.text+0x0): multiple definition of getsubopt' libc/libc_so.a(getsubopt.os):getsubopt.c:(.text+0x0): first defined here. The solution is to filter out the correct files when UCLIBC_HAS_GETOPT and UCLIBC_HAS_GETSUBOPT are not defined. Signed-off-by: Markos Chandras <markos.chand...@imgtec.com> --- libc/unistd/Makefile.in | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libc/unistd/Makefile.in b/libc/unistd/Makefile.in index 5eedf17..5cea05f 100644 --- a/libc/unistd/Makefile.in +++ b/libc/unistd/Makefile.in @@ -16,12 +16,10 @@ OMIT-$(ARCH_USE_MMU) += __exec_alloc.c OMIT-$(if $(UCLIBC_SUSV3_LEGACY),,y) += ualarm.c usleep.c #OMIT-$(UCLIBC_HAS_THREADS_NATIVE) += sleep.c -# the VARIANT we OMIT # GNU_GETOPT comes with getopt_long unconditionally (?), OMIT the other -VARIANT := $(if $(UCLIBC_HAS_GNU_GETOPT),-susv3) GO_LONG := $(if $(UCLIBC_HAS_GNU_GETOPT),getopt_long-simple.c) -OMIT-$(UCLIBC_HAS_GNU_GETOPT) += getopt$(VARIANT).c $(GO_LONG) -OMIT-$(UCLIBC_HAS_GNU_GETSUBOPT) += getsubopt$(VARIANT).c +OMIT-y += $(if $(UCLIBC_HAS_GNU_GETOPT),getopt-susv3.c $(GO_LONG),getopt.c) +OMIT-y += $(if $(UCLIBC_HAS_GNU_GETSUBOPT),getsubopt-susv3.c,getsubopt.c) CSRC-y := $(filter-out $(OMIT-y),$(CSRC-y)) -- 1.8.1.2 _______________________________________________ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc