4
4
# Import tree-wide shared Makefile behavior and libraries
5
5
include shared.mak
6
6
7
+ # == Makefile defines ==
8
+ #
9
+ # These defines change the behavior of the Makefile itself, but have
10
+ # no impact on what it builds:
11
+ #
7
12
# Define V=1 to have a more verbose compile.
8
13
#
14
+ # == Portability and optional library defines ==
15
+ #
16
+ # These defines indicate what Git can expect from the OS, what
17
+ # libraries are available etc. Much of this is auto-detected in
18
+ # config.mak.uname, or in configure.ac when using the optional "make
19
+ # configure && ./configure" (see INSTALL).
20
+ #
9
21
# Define SHELL_PATH to a POSIX shell if your /bin/sh is broken.
10
22
#
11
23
# Define SANE_TOOL_PATH to a colon-separated list of paths to prepend
@@ -30,68 +42,8 @@ include shared.mak
30
42
#
31
43
# Define NO_OPENSSL environment variable if you do not have OpenSSL.
32
44
#
33
- # Define USE_LIBPCRE if you have and want to use libpcre. Various
34
- # commands such as log and grep offer runtime options to use
35
- # Perl-compatible regular expressions instead of standard or extended
36
- # POSIX regular expressions.
37
- #
38
- # Only libpcre version 2 is supported. USE_LIBPCRE2 is a synonym for
39
- # USE_LIBPCRE, support for the old USE_LIBPCRE1 has been removed.
40
- #
41
- # Define LIBPCREDIR=/foo/bar if your PCRE header and library files are
42
- # in /foo/bar/include and /foo/bar/lib directories.
43
- #
44
45
# Define HAVE_ALLOCA_H if you have working alloca(3) defined in that header.
45
46
#
46
- # Define NO_CURL if you do not have libcurl installed. git-http-fetch and
47
- # git-http-push are not built, and you cannot use http:// and https://
48
- # transports (neither smart nor dumb).
49
- #
50
- # Define CURLDIR=/foo/bar if your curl header and library files are in
51
- # /foo/bar/include and /foo/bar/lib directories.
52
- #
53
- # Define CURL_CONFIG to curl's configuration program that prints information
54
- # about the library (e.g., its version number). The default is 'curl-config'.
55
- #
56
- # Define CURL_LDFLAGS to specify flags that you need to link when using libcurl,
57
- # if you do not want to rely on the libraries provided by CURL_CONFIG. The
58
- # default value is a result of `curl-config --libs`. An example value for
59
- # CURL_LDFLAGS is as follows:
60
- #
61
- # CURL_LDFLAGS=-lcurl
62
- #
63
- # Define NO_EXPAT if you do not have expat installed. git-http-push is
64
- # not built, and you cannot push using http:// and https:// transports (dumb).
65
- #
66
- # Define EXPATDIR=/foo/bar if your expat header and library files are in
67
- # /foo/bar/include and /foo/bar/lib directories.
68
- #
69
- # Define EXPAT_NEEDS_XMLPARSE_H if you have an old version of expat (e.g.,
70
- # 1.1 or 1.2) that provides xmlparse.h instead of expat.h.
71
- #
72
- # Define NO_GETTEXT if you don't want Git output to be translated.
73
- # A translated Git requires GNU libintl or another gettext implementation,
74
- # plus libintl-perl at runtime.
75
- #
76
- # Define USE_GETTEXT_SCHEME and set it to 'fallthrough', if you don't trust
77
- # the installed gettext translation of the shell scripts output.
78
- #
79
- # Define HAVE_LIBCHARSET_H if you haven't set NO_GETTEXT and you can't
80
- # trust the langinfo.h's nl_langinfo(CODESET) function to return the
81
- # current character set. GNU and Solaris have a nl_langinfo(CODESET),
82
- # FreeBSD can use either, but MinGW and some others need to use
83
- # libcharset.h's locale_charset() instead.
84
- #
85
- # Define CHARSET_LIB to the library you need to link with in order to
86
- # use locale_charset() function. On some platforms this needs to set to
87
- # -lcharset, on others to -liconv .
88
- #
89
- # Define LIBC_CONTAINS_LIBINTL if your gettext implementation doesn't
90
- # need -lintl when linking.
91
- #
92
- # Define NO_MSGFMT_EXTENDED_OPTIONS if your implementation of msgfmt
93
- # doesn't support GNU extensions like --check and --statistics
94
- #
95
47
# Define HAVE_PATHS_H if you have paths.h and want to use the default PATH
96
48
# it specifies.
97
49
#
@@ -152,39 +104,6 @@ include shared.mak
152
104
# and do not want to use Apple's CommonCrypto library. This allows you
153
105
# to provide your own OpenSSL library, for example from MacPorts.
154
106
#
155
- # Define BLK_SHA1 environment variable to make use of the bundled
156
- # optimized C SHA1 routine.
157
- #
158
- # Define DC_SHA1 to unconditionally enable the collision-detecting sha1
159
- # algorithm. This is slower, but may detect attempted collision attacks.
160
- # Takes priority over other *_SHA1 knobs.
161
- #
162
- # Define DC_SHA1_EXTERNAL in addition to DC_SHA1 if you want to build / link
163
- # git with the external SHA1 collision-detect library.
164
- # Without this option, i.e. the default behavior is to build git with its
165
- # own built-in code (or submodule).
166
- #
167
- # Define DC_SHA1_SUBMODULE in addition to DC_SHA1 to use the
168
- # sha1collisiondetection shipped as a submodule instead of the
169
- # non-submodule copy in sha1dc/. This is an experimental option used
170
- # by the git project to migrate to using sha1collisiondetection as a
171
- # submodule.
172
- #
173
- # Define OPENSSL_SHA1 environment variable when running make to link
174
- # with the SHA1 routine from openssl library.
175
- #
176
- # Define SHA1_MAX_BLOCK_SIZE to limit the amount of data that will be hashed
177
- # in one call to the platform's SHA1_Update(). e.g. APPLE_COMMON_CRYPTO
178
- # wants 'SHA1_MAX_BLOCK_SIZE=1024L*1024L*1024L' defined.
179
- #
180
- # Define BLK_SHA256 to use the built-in SHA-256 routines.
181
- #
182
- # Define NETTLE_SHA256 to use the SHA-256 routines in libnettle.
183
- #
184
- # Define GCRYPT_SHA256 to use the SHA-256 routines in libgcrypt.
185
- #
186
- # Define OPENSSL_SHA256 to use the SHA-256 routines in OpenSSL.
187
- #
188
107
# Define NEEDS_CRYPTO_WITH_SSL if you need -lcrypto when using -lssl (Darwin).
189
108
#
190
109
# Define NEEDS_SSL_WITH_CRYPTO if you need -lssl when using -lcrypto (Darwin).
@@ -490,6 +409,151 @@ include shared.mak
490
409
# to the "<name>" of the corresponding `compat/fsmonitor/fsm-settings-<name>.c`
491
410
# that implements the `fsm_os_settings__*()` routines.
492
411
#
412
+ # === Optional library: libintl ===
413
+ #
414
+ # Define NO_GETTEXT if you don't want Git output to be translated.
415
+ # A translated Git requires GNU libintl or another gettext implementation,
416
+ # plus libintl-perl at runtime.
417
+ #
418
+ # Define USE_GETTEXT_SCHEME and set it to 'fallthrough', if you don't trust
419
+ # the installed gettext translation of the shell scripts output.
420
+ #
421
+ # Define HAVE_LIBCHARSET_H if you haven't set NO_GETTEXT and you can't
422
+ # trust the langinfo.h's nl_langinfo(CODESET) function to return the
423
+ # current character set. GNU and Solaris have a nl_langinfo(CODESET),
424
+ # FreeBSD can use either, but MinGW and some others need to use
425
+ # libcharset.h's locale_charset() instead.
426
+ #
427
+ # Define CHARSET_LIB to the library you need to link with in order to
428
+ # use locale_charset() function. On some platforms this needs to set to
429
+ # -lcharset, on others to -liconv .
430
+ #
431
+ # Define LIBC_CONTAINS_LIBINTL if your gettext implementation doesn't
432
+ # need -lintl when linking.
433
+ #
434
+ # Define NO_MSGFMT_EXTENDED_OPTIONS if your implementation of msgfmt
435
+ # doesn't support GNU extensions like --check and --statistics
436
+ #
437
+ # === Optional library: libexpat ===
438
+ #
439
+ # Define NO_EXPAT if you do not have expat installed. git-http-push is
440
+ # not built, and you cannot push using http:// and https:// transports (dumb).
441
+ #
442
+ # Define EXPATDIR=/foo/bar if your expat header and library files are in
443
+ # /foo/bar/include and /foo/bar/lib directories.
444
+ #
445
+ # Define EXPAT_NEEDS_XMLPARSE_H if you have an old version of expat (e.g.,
446
+ # 1.1 or 1.2) that provides xmlparse.h instead of expat.h.
447
+
448
+ # === Optional library: libcurl ===
449
+ #
450
+ # Define NO_CURL if you do not have libcurl installed. git-http-fetch and
451
+ # git-http-push are not built, and you cannot use http:// and https://
452
+ # transports (neither smart nor dumb).
453
+ #
454
+ # Define CURLDIR=/foo/bar if your curl header and library files are in
455
+ # /foo/bar/include and /foo/bar/lib directories.
456
+ #
457
+ # Define CURL_CONFIG to curl's configuration program that prints information
458
+ # about the library (e.g., its version number). The default is 'curl-config'.
459
+ #
460
+ # Define CURL_LDFLAGS to specify flags that you need to link when using libcurl,
461
+ # if you do not want to rely on the libraries provided by CURL_CONFIG. The
462
+ # default value is a result of `curl-config --libs`. An example value for
463
+ # CURL_LDFLAGS is as follows:
464
+ #
465
+ # CURL_LDFLAGS=-lcurl
466
+ #
467
+ # === Optional library: libpcre2 ===
468
+ #
469
+ # Define USE_LIBPCRE if you have and want to use libpcre. Various
470
+ # commands such as log and grep offer runtime options to use
471
+ # Perl-compatible regular expressions instead of standard or extended
472
+ # POSIX regular expressions.
473
+ #
474
+ # Only libpcre version 2 is supported. USE_LIBPCRE2 is a synonym for
475
+ # USE_LIBPCRE, support for the old USE_LIBPCRE1 has been removed.
476
+ #
477
+ # Define LIBPCREDIR=/foo/bar if your PCRE header and library files are
478
+ # in /foo/bar/include and /foo/bar/lib directories.
479
+ #
480
+ # == SHA-1 and SHA-256 defines ==
481
+ #
482
+ # === SHA-1 backend ===
483
+ #
484
+ # ==== Security ====
485
+ #
486
+ # Due to the SHAttered (https://shattered.io) attack vector on SHA-1
487
+ # it's strongly recommended to use the sha1collisiondetection
488
+ # counter-cryptanalysis library for SHA-1 hashing.
489
+ #
490
+ # If you know that you can trust the repository contents, or where
491
+ # potential SHA-1 attacks are otherwise mitigated the other backends
492
+ # listed in "SHA-1 implementations" are faster than
493
+ # sha1collisiondetection.
494
+ #
495
+ # ==== Default SHA-1 backend ====
496
+ #
497
+ # If no *_SHA1 backend is picked, the first supported one listed in
498
+ # "SHA-1 implementations" will be picked.
499
+ #
500
+ # ==== Options common to all SHA-1 implementations ====
501
+ #
502
+ # Define SHA1_MAX_BLOCK_SIZE to limit the amount of data that will be hashed
503
+ # in one call to the platform's SHA1_Update(). e.g. APPLE_COMMON_CRYPTO
504
+ # wants 'SHA1_MAX_BLOCK_SIZE=1024L*1024L*1024L' defined.
505
+ #
506
+ # ==== SHA-1 implementations ====
507
+ #
508
+ # Define OPENSSL_SHA1 to link to the SHA-1 routines from the OpenSSL
509
+ # library.
510
+ #
511
+ # Define BLK_SHA1 to make use of optimized C SHA-1 routines bundled
512
+ # with git (in the block-sha1/ directory).
513
+ #
514
+ # Define NO_APPLE_COMMON_CRYPTO on OSX to opt-out of using the
515
+ # "APPLE_COMMON_CRYPTO" backend for SHA-1, which is currently the
516
+ # default on that OS. On macOS 01.4 (Tiger) or older,
517
+ # NO_APPLE_COMMON_CRYPTO is defined by default.
518
+ #
519
+ # If don't enable any of the *_SHA1 settings in this section, Git will
520
+ # default to its built-in sha1collisiondetection library, which is a
521
+ # collision-detecting sha1 This is slower, but may detect attempted
522
+ # collision attacks.
523
+ #
524
+ # ==== Options for the sha1collisiondetection library ====
525
+ #
526
+ # Define DC_SHA1_EXTERNAL if you want to build / link
527
+ # git with the external SHA1 collision-detect library.
528
+ # Without this option, i.e. the default behavior is to build git with its
529
+ # own built-in code (or submodule).
530
+ #
531
+ # Define DC_SHA1_SUBMODULE to use the
532
+ # sha1collisiondetection shipped as a submodule instead of the
533
+ # non-submodule copy in sha1dc/. This is an experimental option used
534
+ # by the git project to migrate to using sha1collisiondetection as a
535
+ # submodule.
536
+ #
537
+ # === SHA-256 backend ===
538
+ #
539
+ # ==== Security ====
540
+ #
541
+ # Unlike SHA-1 the SHA-256 algorithm does not suffer from any known
542
+ # vulnerabilities, so any implementation will do.
543
+ #
544
+ # ==== SHA-256 implementations ====
545
+ #
546
+ # Define OPENSSL_SHA256 to use the SHA-256 routines in OpenSSL.
547
+ #
548
+ # Define NETTLE_SHA256 to use the SHA-256 routines in libnettle.
549
+ #
550
+ # Define GCRYPT_SHA256 to use the SHA-256 routines in libgcrypt.
551
+ #
552
+ # If don't enable any of the *_SHA256 settings in this section, Git
553
+ # will default to its built-in sha256 implementation.
554
+ #
555
+ # == DEVELOPER defines ==
556
+ #
493
557
# Define DEVELOPER to enable more compiler warnings. Compiler version
494
558
# and family are auto detected, but could be overridden by defining
495
559
# COMPILER_FEATURES (see config.mak.dev). You can still set
@@ -1826,7 +1890,6 @@ ifdef APPLE_COMMON_CRYPTO
1826
1890
COMPAT_CFLAGS += -DCOMMON_DIGEST_FOR_OPENSSL
1827
1891
BASIC_CFLAGS += -DSHA1_APPLE
1828
1892
else
1829
- DC_SHA1 := YesPlease
1830
1893
BASIC_CFLAGS += -DSHA1_DC
1831
1894
LIB_OBJS += sha1dc_git.o
1832
1895
ifdef DC_SHA1_EXTERNAL
@@ -2989,7 +3052,6 @@ GIT-BUILD-OPTIONS: FORCE
2989
3052
@echo NO_REGEX=\' ' $(subst ' ,' \' ' ,$(subst ' ,' \' ' ,$(NO_REGEX)))' \' >> $@ +
2990
3053
@echo NO_UNIX_SOCKETS=\' ' $(subst ' ,' \' ' ,$(subst ' ,' \' ' ,$(NO_UNIX_SOCKETS)))' \' >> $@ +
2991
3054
@echo PAGER_ENV=\' ' $(subst ' ,' \' ' ,$(subst ' ,' \' ' ,$(PAGER_ENV)))' \' >> $@ +
2992
- @echo DC_SHA1=\' ' $(subst ' ,' \' ' ,$(subst ' ,' \' ' ,$(DC_SHA1)))' \' >> $@ +
2993
3055
@echo SANITIZE_LEAK=\' ' $(subst ' ,' \' ' ,$(subst ' ,' \' ' ,$(SANITIZE_LEAK)))' \' >> $@ +
2994
3056
@echo SANITIZE_ADDRESS=\' ' $(subst ' ,' \' ' ,$(subst ' ,' \' ' ,$(SANITIZE_ADDRESS)))' \' >> $@ +
2995
3057
@echo X=\' $(X ) \' >> $@ +
0 commit comments