[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [PATCH v2] mini-os: link to libgcc.a to fix build with gcc7
gcc7 generates a call to __udivmoddi4 ... stubdom/mini-os-x86_32-grub/mini-os.o: In function `_strtoll_r': stubdom/newlib-x86_32/i686-xen-elf/newlib/libc/stdlib/../../../../../newlib-1.16.0/newlib/libc/stdlib/strtoll_r.c:110: undefined reference to `__udivmoddi4' make[2]: *** [Makefile:167: stubdom/mini-os-x86_32-grub/mini-os] Error 1 ... which the linker only finds if libgcc.a is provided on the commandline. Both gcc and clang understand "-print-libgcc-file-name". Signed-off-by: Olaf Hering <olaf@xxxxxxxxx> --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 5bdcdac..8e36c65 100644 --- a/Makefile +++ b/Makefile @@ -145,6 +145,7 @@ APP_LDLIBS += -lz APP_LDLIBS += -lm LDLIBS += -lc endif +LDLIBS += $(shell $(CC) -print-libgcc-file-name $(CFLAGS)) ifneq ($(APP_OBJS)-$(lwip),-y) OBJS := $(filter-out $(OBJ_DIR)/daytime.o, $(OBJS)) _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |