summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLibravatar Dennis Stosberg <dennis@stosberg.net>2006-08-15 11:01:31 +0200
committerLibravatar Junio C Hamano <junkio@cox.net>2006-08-15 03:13:47 -0700
commit60a144f28047b4fa0e4a795972c483fa85a7d3c8 (patch)
treee06f3ff36980e068c9a3a036f2606122f8134f96 /Makefile
parentMerge branch 'master' into pb/gitpm (diff)
downloadtgif-60a144f28047b4fa0e4a795972c483fa85a7d3c8.tar.xz
Fix compilation with Sun CC
- Add the CFLAGS variable to config.mak.in to override the Makefile's default, which is gcc-specific and won't work with Sun CC. - Prefer "cc" over "gcc", because Pasky's Git.pm will not compile with gcc on Solaris at all. On Linux and the free BSDs "cc" is linked to "gcc" anyway. - Set correct flag to generate position-independent code. - Add "-xO3" (= use default optimization level) to CFLAGS. Signed-off-by: Dennis Stosberg <dennis@stosberg.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ac42ae32ba..4e7a37aa3c 100644
--- a/Makefile
+++ b/Makefile
@@ -112,6 +112,7 @@ uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
# CFLAGS and LDFLAGS are for the users to override from the command line.
CFLAGS = -g -O2 -Wall
+PIC_FLAG = -fPIC
LDFLAGS =
ALL_CFLAGS = $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
@@ -402,6 +403,9 @@ endif
ifneq (,$(findstring arm,$(uname_M)))
ARM_SHA1 = YesPlease
endif
+ifeq ($(uname_M),sun4u)
+ USE_PIC = YesPlease
+endif
ifeq ($(uname_M),x86_64)
USE_PIC = YesPlease
endif
@@ -544,7 +548,7 @@ endif
endif
endif
ifdef USE_PIC
- ALL_CFLAGS += -fPIC
+ ALL_CFLAGS += $(PIC_FLAG)
endif
ifdef NO_ACCURATE_DIFF
BASIC_CFLAGS += -DNO_ACCURATE_DIFF