From 2c784e3639c07f2d01f951cc793e9ad2736fa4c8 Mon Sep 17 00:00:00 2001 From: Steven Stewart-Gallus Date: Sat, 19 Apr 2014 16:33:42 -0700 Subject: [PATCH] Set the tag type in libtool invocations Setting the tag type will let libtool work even when it cannot infer the type of the code being built. One way libtool may fail to infer the tag type is if one uses a mock compiler (such as for static analysis). --- Makefile.in | 2 +- configure.in | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index da42661c5..e9962ac98 100644 --- a/Makefile.in +++ b/Makefile.in @@ -123,7 +123,7 @@ update-revision: .PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d) $(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS) - $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) + $(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS) $(AR) cru $@ $(SDLMAIN_OBJECTS) diff --git a/configure.in b/configure.in index ae3200c25..97b57f316 100644 --- a/configure.in +++ b/configure.in @@ -3165,7 +3165,7 @@ for EXT in asm cc m c S; do OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'` DEPENDS=`echo "$DEPENDS" | sed "s,^\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.$EXT\\$,\\\\ \\$(objects)/\\2.lo: \\1/\\2.$EXT\\\\ - \\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` + \\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` done VERSION_OBJECTS=`echo $VERSION_SOURCES` @@ -3180,14 +3180,14 @@ SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES` SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'` SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\ \\$(objects)/\\2.o: \\1/\\2.c\\\\ - \\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` + \\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES` SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES` SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'` SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\ \\$(objects)/\\2.o: \\1/\\2.c\\\\ - \\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` + \\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` # Set runtime shared library paths as needed