[syslinux:elflink] mk: Don't link against compiler' s version of libgcc

syslinux-bot for Matt Fleming matt.fleming at intel.com
Mon Mar 26 15:36:07 PDT 2012


Commit-ID:  0105cae269ed2488a2a99f1548740ca99326cc4a
Gitweb:     http://www.syslinux.org/commit/0105cae269ed2488a2a99f1548740ca99326cc4a
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Mon, 12 Mar 2012 19:40:33 +0000
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Fri, 23 Mar 2012 16:56:16 +0000

mk: Don't link against compiler's version of libgcc

Syslinux provides its own copy of libgcc functions in
com32/lib/libgcc, so we don't need to link against the version
provided by the compiler. What's worse, the behaviour is different
between the two versions.

This caused problems, for example, when parsing the TOTALTIMEOUT
config directive in com32/menu because of the following calculation,

	totaltimeout = (atoll(skipspace(p + 13)) * CLK_TCK + 9) / 10;

which invokes __divdi3() as provided by libgcc. The results returned
by the Syslinux and compiler's copy of libgcc differ, leading to
differences in behaviour.

Signed-off-by: Matt Fleming <matt.fleming at intel.com>

---
 mk/elf.mk |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/mk/elf.mk b/mk/elf.mk
index 5a2ce2d..ca06115 100644
--- a/mk/elf.mk
+++ b/mk/elf.mk
@@ -47,14 +47,13 @@ CFLAGS     = $(GCCOPT) -W -Wall -march=i386 \
 	     -I$(com32)/libutil/include -I$(com32)/include $(GPLINCLUDE)
 SFLAGS     = $(GCCOPT) -D__COM32__ -march=i386
 LDFLAGS    = -m elf_i386 -shared --hash-style=gnu -T $(com32)/lib/elf32.ld
-LIBGCC    := $(shell $(CC) $(GCCOPT) --print-libgcc)
 
 LNXCFLAGS  = -I$(com32)/libutil/include -W -Wall -O -g -D_GNU_SOURCE
 LNXSFLAGS  = -g
 LNXLDFLAGS = -g
 
 C_LIBS	   = $(com32)/libutil/libutil_com.c32 $(GPLLIB) \
-	     $(com32)/lib/libcom32.c32 $(LIBGCC)
+	     $(com32)/lib/libcom32.c32
 C_LNXLIBS  = $(com32)/libutil/libutil_lnx.a \
 	     $(com32)/elflink/ldlinux/ldlinux_lnx.a
 


More information about the Syslinux-commits mailing list