From: Junio C Hamano Date: Thu, 13 Jun 2019 20:19:43 +0000 (-0700) Subject: Merge branch 'ab/deprecate-R-for-dynpath' X-Git-Tag: v2.23.0-rc0~129 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/51d6c0f0159a7f8ec02bc5a095172cee857b4e3a?hp=-c Merge branch 'ab/deprecate-R-for-dynpath' The way of specifying the path to find dynamic libraries at runtime has been simplified. The old default to pass -R/path/to/dir has been replaced with the new default to pass -Wl,-rpath,/path/to/dir, which is the more recent GCC uses. Those who need to build with an old GCC can still use "CC_LD_DYNPATH=-R" * ab/deprecate-R-for-dynpath: Makefile: remove the NO_R_TO_GCC_LINKER flag --- 51d6c0f0159a7f8ec02bc5a095172cee857b4e3a diff --combined Makefile index 6c3bfb1733,ce7a489d64..f58bf14c7b --- a/Makefile +++ b/Makefile @@@ -265,10 -265,6 +265,6 @@@ all: # # Define NO_DEFLATE_BOUND if your zlib does not have deflateBound. # - # Define NO_R_TO_GCC_LINKER if your gcc does not like "-R/path/lib" - # that tells runtime paths to dynamic libraries; - # "-Wl,-rpath=/path/lib" is used instead. - # # Define NO_NORETURN if using buggy versions of gcc 4.6+ and profile feedback, # as the compiler can crash (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49299) # @@@ -624,6 -620,8 +620,6 @@@ SCRIPT_SH += git-web--browse.s SCRIPT_LIB += git-mergetool--lib SCRIPT_LIB += git-parse-remote -SCRIPT_LIB += git-rebase--am -SCRIPT_LIB += git-rebase--common SCRIPT_LIB += git-rebase--preserve-merges SCRIPT_LIB += git-sh-setup SCRIPT_LIB += git-sh-i18n @@@ -1158,6 -1156,7 +1154,7 @@@ endi # which'll override these defaults. CFLAGS = -g -O2 -Wall LDFLAGS = + CC_LD_DYNPATH = -Wl,-rpath, BASIC_CFLAGS = -I. BASIC_LDFLAGS = @@@ -1169,11 -1168,8 +1166,11 @@@ PTHREAD_CFLAGS SPARSE_FLAGS ?= SP_EXTRA_FLAGS = -# For the 'coccicheck' target +# For the 'coccicheck' target; setting SPATCH_BATCH_SIZE higher will +# usually result in less CPU usage at the cost of higher peak memory. +# Setting it to 0 will feed all files in a single spatch invocation. SPATCH_FLAGS = --all-includes --patch . +SPATCH_BATCH_SIZE = 1 include config.mak.uname -include config.mak.autogen @@@ -1288,16 -1284,6 +1285,6 @@@ ifeq ($(uname_S),Darwin PTHREAD_LIBS = endif - ifndef CC_LD_DYNPATH - ifdef NO_R_TO_GCC_LINKER - # Some gcc does not accept and pass -R to the linker to specify - # the runtime dynamic library path. - CC_LD_DYNPATH = -Wl,-rpath, - else - CC_LD_DYNPATH = -R - endif - endif - ifdef NO_LIBGEN_H COMPAT_CFLAGS += -DNO_LIBGEN_H COMPAT_OBJS += compat/basename.o @@@ -2808,14 -2794,12 +2795,14 @@@ endi %.cocci.patch: %.cocci $(COCCI_SOURCES) @echo ' ' SPATCH $<; \ - ret=0; \ - for f in $(COCCI_SOURCES); do \ - $(SPATCH) --sp-file $< $$f $(SPATCH_FLAGS) || \ - { ret=$$?; break; }; \ - done >$@+ 2>$@.log; \ - if test $$ret != 0; \ + if test $(SPATCH_BATCH_SIZE) = 0; then \ + limit=; \ + else \ + limit='-n $(SPATCH_BATCH_SIZE)'; \ + fi; \ + if ! echo $(COCCI_SOURCES) | xargs $$limit \ + $(SPATCH) --sp-file $< $(SPATCH_FLAGS) \ + >$@+ 2>$@.log; \ then \ cat $@.log; \ exit 1; \