{"thread":{"id":"33369","subject":"Build system bugs related to handling of 'LIBS' environment variable","startedAt":"2013-04-03T15:16:22Z","lastAt":"2013-04-03T15:16:22Z","messageCount":1,"participants":["Dmitri Gribenko"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"213044","messageId":"CA+Y5xYeghRA-Whtq6e-sskeow38jz+6UgYWP-ng3xdRn_XUHEA@mail.gmail.com","threadId":"33369","inReplyTo":null,"subject":"Build system bugs related to handling of 'LIBS' environment variable","fromName":"Dmitri Gribenko","fromEmail":"gribozavr@gmail.com","sentAt":"2013-04-03T15:16:22Z","receivedAt":"2013-04-03T15:16:22Z","isPatch":false,"sender":{"key":"gribozavr@gmail.com","avatar":null},"body":"Hello,\n\nGit fails to build if LIBS contains -lpthread.  To reproduce:\n\n  export LIBS=-lpthread\n  ./configure\n  make V=1 git-credential-store\n\nThe bug is that linker command line does not contain -lpthread, so\nlinking fails.\n\nconfigure respects LIBS and finds that it does not have to add\nanything for pthread:\n\nchecking for POSIX Threads with ''... yes\n\nBut (first bug) configure does not pass the LIBS variable in\nconfig.mak.autogen.  Even if it did, Makefile would overwrite (second\nbug) LIBS with:\n\n  LIBS = $(GITLIBS) $(EXTLIBS)\n\nMakefile should rather append to LIBS.\n\nDmitri Gribenko\n\n--\nmain(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if\n(j){printf(\"%d\\n\",i);}}} /*Dmitri Gribenko <gribozavr@gmail.com>*/\n"}]}