{"thread":{"id":"2473","subject":"[PATCH] Building git on NetBSD","startedAt":"2005-11-12T15:12:59Z","lastAt":"2005-11-13T22:51:31Z","messageCount":5,"participants":["walt","Andreas Ericsson","Junio C Hamano","wa1ter@myrealbox.com"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"11680","messageId":"Pine.LNX.4.64.0511120649430.2695@x2.ybpnyarg","threadId":"2473","inReplyTo":null,"subject":"[PATCH] Building git on NetBSD","fromName":"walt","fromEmail":"wa1ter@myrealbox.com","sentAt":"2005-11-12T15:12:59Z","receivedAt":"2005-11-12T15:12:59Z","isPatch":true,"sender":{"key":"wa1ter@myrealbox.com","avatar":null},"body":"This gets git going on NetBSD:\n\n--- Makefile.orig\t2005-11-12 05:06:55.000000000 -0800\n+++ Makefile\n@@ -212,6 +212,10 @@ ifeq ($(uname_S),OpenBSD)\n \tNEEDS_LIBICONV = YesPlease\n \tALL_CFLAGS += -I/usr/local/include -L/usr/local/lib\n endif\n+ifeq ($(uname_S),NetBSD)\n+\tNEEDS_LIBICONV = YesPlease\n+\tALL_CFLAGS += -I/usr/pkg/include -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib\n+endif\n ifneq (,$(findstring arm,$(uname_M)))\n \tARM_SHA1 = YesPlease\n endif\n\nI'm no software developer so I'm not sure about the syntax of the -rpath\nflag.  It does what I wanted, but it results in lots of warnings about\nnot being used because no linking is taking place.  Should this maybe\ngo in LDFLAGS instead of CFLAGS?  Dunno.\n\nAnyway, I actually used cg-clone on NetBSD to clone the git repository,\nand I'll try to get the pkgsrc guys interested in creating packages for\ncogito and git.\n\nOh, one person was concerned about the cogito scripts running on the\nNetBSD version of sh, which isn't bash.  So far I've tried cg-clone,\ncg-update, and gitk, and all worked just like on linux.  Any chance\nthat some of the other scripts may not work as well on a non-bash sh?\n"},{"id":"11682","messageId":"43760AF5.1010704@op5.se","threadId":"2473","inReplyTo":"Pine.LNX.4.64.0511120649430.2695@x2.ybpnyarg","subject":"Re: [PATCH] Building git on NetBSD","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2005-11-12T15:32:05Z","receivedAt":"2005-11-12T15:32:05Z","isPatch":true,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"walt wrote:\n> \n> I'm no software developer so I'm not sure about the syntax of the -rpath\n> flag.  It does what I wanted, but it results in lots of warnings about\n> not being used because no linking is taking place.  Should this maybe\n> go in LDFLAGS instead of CFLAGS?  Dunno.\n> \n\nYes it should. Currently the git makefile doesn't distinguish between \nCFLAGS and LDFLAGS which results in a fair few warnings.\n\n> Oh, one person was concerned about the cogito scripts running on the\n> NetBSD version of sh, which isn't bash.  So far I've tried cg-clone,\n> cg-update, and gitk, and all worked just like on linux.  Any chance\n> that some of the other scripts may not work as well on a non-bash sh?\n> \n\ngitk is in tcl so I'd be surprised if that didn't work.\n\nI don't think there's been a whole lot of testing for other shells but \nthe friendly folks on this list usually takes care of fixing such things \nfairly quickly so long as someone tells them where to look or, \npreferrably, sends a patch that does the trick.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"11716","messageId":"7vhdahclr5.fsf@assigned-by-dhcp.cox.net","threadId":"2473","inReplyTo":"43760AF5.1010704@op5.se","subject":"Re: [PATCH] Building git on NetBSD","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-13T02:41:34Z","receivedAt":"2005-11-13T02:41:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Ericsson <ae@op5.se> writes:\n\n> Yes it should. Currently the git makefile doesn't distinguish between \n> CFLAGS and LDFLAGS which results in a fair few warnings.\n\nVery well.  Maybe LDFLAGS and ALL_LDFLAGS pair to parallel\nCFLAGS and ALL_CFLAGS (the former is for the end user to\noverride from make command line, the latter is for Makefile to\naugment and use)?\n"},{"id":"11720","messageId":"7vlkzsc262.fsf@assigned-by-dhcp.cox.net","threadId":"2473","inReplyTo":"7vhdahclr5.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Building git on NetBSD","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-13T09:44:37Z","receivedAt":"2005-11-13T09:44:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <junkio@cox.net> writes:\n\n> Andreas Ericsson <ae@op5.se> writes:\n>\n>> Yes it should. Currently the git makefile doesn't distinguish between \n>> CFLAGS and LDFLAGS which results in a fair few warnings.\n>\n> Very well.  Maybe LDFLAGS and ALL_LDFLAGS pair to parallel\n> CFLAGS and ALL_CFLAGS (the former is for the end user to\n> override from make command line, the latter is for Makefile to\n> augment and use)?\n\nDoes this look OK?\n\n-- >8 -- cut here -- >8 --\ndiff --git a/Makefile b/Makefile\nindex b75cb13..7713c05 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -52,10 +52,12 @@\n \n GIT_VERSION = 0.99.9.GIT\n \n-# CFLAGS is for the users to override from the command line.\n+# CFLAGS and LDFLAGS are for the users to override from the command line.\n \n CFLAGS = -g -O2 -Wall\n+LDFLAGS =\n ALL_CFLAGS = $(CFLAGS)\n+ALL_LDFLAGS = $(LDFLAGS)\n \n prefix = $(HOME)\n bindir = $(prefix)/bin\n@@ -187,9 +189,11 @@ ifeq ($(uname_S),Darwin)\n \tNEEDS_SSL_WITH_CRYPTO = YesPlease\n \tNEEDS_LIBICONV = YesPlease\n \t## fink\n-\tALL_CFLAGS += -I/sw/include -L/sw/lib\n+\tALL_CFLAGS += -I/sw/include\n+\tALL_LDFLAGS += -L/sw/lib\n \t## darwinports\n-\tALL_CFLAGS += -I/opt/local/include -L/opt/local/lib\n+\tALL_CFLAGS += -I/opt/local/include\n+\tALL_LDFLAGS += -L/opt/local/lib\n endif\n ifeq ($(uname_S),SunOS)\n \tNEEDS_SOCKET = YesPlease\n@@ -211,7 +215,13 @@ endif\n ifeq ($(uname_S),OpenBSD)\n \tNO_STRCASESTR = YesPlease\n \tNEEDS_LIBICONV = YesPlease\n-\tALL_CFLAGS += -I/usr/local/include -L/usr/local/lib\n+\tALL_CFLAGS += -I/usr/local/include\n+\tALL_LDFLAGS += -L/usr/local/lib\n+endif\n+ifeq ($(uname_S),NetBSD)\n+\tNEEDS_LIBICONV = YesPlease\n+\tALL_CFLAGS += -I/usr/pkg/include\n+\tALL_LDFLAGS += -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib\n endif\n ifneq (,$(findstring arm,$(uname_M)))\n \tARM_SHA1 = YesPlease\n@@ -221,7 +231,7 @@ endif\n \n ifndef NO_CURL\n \tifdef CURLDIR\n-\t\t# This is still problematic -- gcc does not want -R.\n+\t\t# This is still problematic -- gcc does not always want -R.\n \t\tALL_CFLAGS += -I$(CURLDIR)/include\n \t\tCURL_LIBCURL = -L$(CURLDIR)/lib -R$(CURLDIR)/lib -lcurl\n \telse\n@@ -369,12 +379,13 @@ git-cherry-pick: git-revert\n \t$(CC) -o $*.o -c $(ALL_CFLAGS) $<\n \n git-%$X: %.o $(LIB_FILE)\n-\t$(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)\n+\t$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)\n \n git-mailinfo$X : SIMPLE_LIB += $(LIB_4_ICONV)\n $(SIMPLE_PROGRAMS) : $(LIB_FILE)\n $(SIMPLE_PROGRAMS) : git-%$X : %.o\n-\t$(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIB_FILE) $(SIMPLE_LIB)\n+\t$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n+\t\t$(LIB_FILE) $(SIMPLE_LIB)\n \n git-http-fetch$X: fetch.o\n git-local-fetch$X: fetch.o\n@@ -408,10 +419,10 @@ test: all\n \t$(MAKE) -C t/ all\n \n test-date$X: test-date.c date.o ctype.o\n-\t$(CC) $(ALL_CFLAGS) -o $@ test-date.c date.o ctype.o\n+\t$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) test-date.c date.o ctype.o\n \n test-delta$X: test-delta.c diff-delta.o patch-delta.o\n-\t$(CC) $(ALL_CFLAGS) -o $@ $^\n+\t$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $^\n \n check:\n \tfor i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i; done\n"},{"id":"11744","messageId":"Pine.NEB.4.63.0511131446500.4257@x9.ybpnyarg","threadId":"2473","inReplyTo":"7vlkzsc262.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Building git on NetBSD","fromName":"","fromEmail":"wa1ter@myrealbox.com","sentAt":"2005-11-13T22:51:31Z","receivedAt":"2005-11-13T22:51:31Z","isPatch":true,"sender":{"key":"wa1ter@myrealbox.com","avatar":null},"body":"On Sun, 13 Nov 2005, Junio C Hamano wrote:\n\n> Date: Sun, 13 Nov 2005 01:44:37 -0800\n> From: Junio C Hamano <junkio@cox.net>\n> Cc: git@vger.kernel.org\n> Newsgroups: gmane.comp.version-control.git\n> Subject: Re: [PATCH] Building git on NetBSD\n>\n> Junio C Hamano <junkio@cox.net> writes:\n>\n\n> > Very well.  Maybe LDFLAGS and ALL_LDFLAGS pair to parallel\n> > CFLAGS and ALL_CFLAGS (the former is for the end user to\n> > override from make command line, the latter is for Makefile to\n> > augment and use)?\n>\n> Does this look OK?\n\n<patch snipped>\n\nYes, git now compiles on NetBSD without modification and with no\nwarnings about unused linker flags.  Thanks!\n"}]}