Package: cppcheck Version: 1.49-1 Severity: wishlist Tags: patch User: [email protected] Usertags: origin-ubuntu oneiric ubuntu-patch User: [email protected] Usertags: ld-as-needed
the package cppcheck fails to build when using the linker flag --as-needed This is caused by the library tinyxml being placed before the objects using it. In that case the library is not registered as needed and is dropped. See the buildlogs in ubuntu oneiric which has this flag set by default: https://launchpad.net/ubuntu/+source/cppcheck/1.49-1 Attached patch resolves the issue by reordering the command line.
Description: fix build with -Wl,--as-needed -ltinyxml was placed before the objects using it leading to undefined references Author: Julian Taylor <[email protected]> Index: cppcheck-1.49/Makefile =================================================================== --- cppcheck-1.49.orig/Makefile 2011-06-29 16:46:34.436857567 +0200 +++ cppcheck-1.49/Makefile 2011-06-29 16:47:11.786857579 +0200 @@ -128,12 +128,12 @@ ###### Targets cppcheck: $(LIBOBJ) $(CLIOBJ) $(EXTOBJ) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o cppcheck $(CLIOBJ) $(LIBOBJ) $(EXTOBJ) $(LDFLAGS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o cppcheck $(CLIOBJ) $(LIBOBJ) $(LDFLAGS) $(EXTOBJ) all: cppcheck testrunner testrunner: $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) cli/threadexecutor.o cli/cmdlineparser.o cli/cppcheckexecutor.o cli/filelister.o cli/pathmatch.o - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o testrunner $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) cli/threadexecutor.o cli/cppcheckexecutor.o cli/cmdlineparser.o cli/filelister.o cli/pathmatch.o $(LDFLAGS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o testrunner $(TESTOBJ) $(LIBOBJ) cli/threadexecutor.o cli/cppcheckexecutor.o cli/cmdlineparser.o cli/filelister.o cli/pathmatch.o $(LDFLAGS) $(EXTOBJ) test: all ./testrunner
signature.asc
Description: OpenPGP digital signature

