aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-06-23 17:57:48 -0700
committerJunio C Hamano <junkio@cox.net>2006-07-02 17:14:41 -0700
commitf6af75d29c7e01e1d538dc3458c743e1a34defb6 (patch)
tree768d1806aa2755fe96f2a9fa63ef98fde7a2c140
parent8f00660fc13df9ed22f059f032a65c60168a2057 (diff)
downloadgit-f6af75d29c7e01e1d538dc3458c743e1a34defb6.tar.gz
git-f6af75d29c7e01e1d538dc3458c743e1a34defb6.tar.xz
Perl interface: add build-time configuration to allow building with -fPIC
On x86-64 it seems that Git.xs does not link without compiling the main git objects with -fPIC. Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--Makefile20
1 files changed, 13 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index dda9b9dd7..aa0618ed8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,6 @@
# The default target of this Makefile is...
all:
-# Define MOZILLA_SHA1 environment variable when running make to make use of
-# a bundled SHA1 routine coming from Mozilla. It is GPL'd and should be fast
-# on non-x86 architectures (e.g. PowerPC), while the OpenSSL version (default
-# choice) has very fast version optimized for i586.
-#
# Define NO_OPENSSL environment variable if you do not have OpenSSL.
# This also implies MOZILLA_SHA1.
#
@@ -39,6 +34,14 @@ all:
# Define ARM_SHA1 environment variable when running make to make use of
# a bundled SHA1 routine optimized for ARM.
#
+# Define MOZILLA_SHA1 environment variable when running make to make use of
+# a bundled SHA1 routine coming from Mozilla. It is GPL'd and should be fast
+# on non-x86 architectures (e.g. PowerPC), while the OpenSSL version (default
+# choice) has very fast version optimized for i586.
+#
+# Define USE_PIC if you need the main git objects to be built with -fPIC
+# in order to build and link perl/Git.so. x86-64 seems to need this.
+#
# Define NEEDS_SSL_WITH_CRYPTO if you need -lcrypto with -lssl (Darwin).
#
# Define NEEDS_LIBICONV if linking with libc is not enough (Darwin).
@@ -65,13 +68,13 @@ all:
# Define COLLISION_CHECK below if you believe that SHA1's
# 1461501637330902918203684832716283019655932542976 hashes do not give you
# sufficient guarantee that no collisions between objects will ever happen.
-
+#
# Define USE_NSEC below if you want git to care about sub-second file mtimes
# and ctimes. Note that you need recent glibc (at least 2.2.4) for this, and
# it will BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely
# randomly break unless your underlying filesystem supports those sub-second
# times (my ext3 doesn't).
-
+#
# Define USE_STDEV below if you want git to care about the underlying device
# change being considered an inode change from the update-cache perspective.
@@ -464,6 +467,9 @@ else
endif
endif
endif
+ifdef USE_PIC
+ ALL_CFLAGS += -fPIC
+endif
ifdef NO_ACCURATE_DIFF
ALL_CFLAGS += -DNO_ACCURATE_DIFF
endif