Ya. Ya. - 3 months ago 28
Git Question

How do I build Git on Solaris

I downloaded Git sources from:

https://github.com/git/git


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.

Update:

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

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

Answer

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

into

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