Ya. Ya. - 2 months ago 10x
Git Question

How do I build Git on Solaris

I downloaded Git sources from:


and now trying to build on Solaris 10g.

I'm not sure what I need to change in the Makefile, if anything, since there is no "configure" file. When I run make I get:

cc: illegal option -Wall
make: *** [credential-store.o] Error 1

I do have gcc installed but I'm not sure how to tell the Makefile to use it.


Updated the Makefile per answer below but I still can't get it to compile:

CC credential-store.o
cc1: error: unrecognized command line option "-fprofile-correction"
make: *** [credential-store.o] Error 1


Modify the line 396 of Makefile into

CC = gcc

Regarding the -fprofile-correction issue, you could workaround it by removing the problematic option from line 1558 of Makefile. That is, change

CFLAGS += -fprofile-use=$(PROFILE_DIR) -fprofile-correction -DNO_NORETURN=1


CFLAGS += -fprofile-use=$(PROFILE_DIR) -DNO_NORETURN=1