Subject: Re: [PATCH] Makefile: set USE_PIC on Linux x86_64 for linking with Git.pm

From: Marco Roeland <[email-masked]>
Date: Wed, 28 Jun 2006 21:21:45 +0200

On Wednesday June 28th 2006 Junio C Hamano wrote:

> >>  ifeq ($(uname_S),Linux)
> >>  	NO_STRLCPY = YesPlease
> >> +	ifneq (,$(findstring x86_64,$(uname_M)))
> >> +		USE_PIC = YesPlease
> >> +	endif
> >>  endif
> 
> In other words, I am wondering why you did not do this more
> obvious one:
> 
>         ifeq ($(uname_M),x86_64)
>                 USE_PIC = YesPlease
>         endif
> 
> My suspicion is that you protected that in Linux on purpose
> because you know that my version would break for somebody else,
> or because you are trying to be cautious not to break other
> platforms you do not have access to, and I cannot tell which.

Sorry for the confusion. Yes that construct is much more readable. I
copy and pasted it from another section in the Makefile and adapted it
to this use. I tested it and it worked so I decided no to change it
anymore. So that clears up the syntactical issue.

I certainly do not know cases outside Linux where this might break on
x86-64. I just tried to limit it to the case I could test. But perhaps
someone with an x86-64 BSD or Solaris might try it?

To paraphrase Dave Jones: I type 'make', it fails. Some 'git log' later
I realise I have to manually define 'USE_PIC'. Hey, why doesn't it work
automagically? Some 'git grep' and I spot a construct for specific
(sub)platforms. Monkey see, monkey do. I type 'make', it works and
monkey sends patch! Thats it! No subtleties involved;-)
-- 
Marco Roeland