build/unix/elfhack/Makefile.in

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 #
     2 # This Source Code Form is subject to the terms of the Mozilla Public
     3 # License, v. 2.0. If a copy of the MPL was not distributed with this
     4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
     6 INTERNAL_TOOLS = 1
     8 OS_CXXFLAGS := $(filter-out -fno-exceptions,$(OS_CXXFLAGS)) -fexceptions
    10 WRAP_LDFLAGS=
    12 include $(topsrcdir)/config/rules.mk
    14 test-array$(DLL_SUFFIX) test-ctors$(DLL_SUFFIX): %$(DLL_SUFFIX): %.$(OBJ_SUFFIX) elfhack
    15 	$(MKSHLIB) $(LDFLAGS) $< -nostartfiles
    16 	@echo ===
    17 	@echo === If you get failures below, please file a bug describing the error
    18 	@echo === and your environment \(compiler and linker versions\), and use
    19 	@echo === --disable-elf-hack until this is fixed.
    20 	@echo ===
    21 	# Fail if the library doesn't have $(DT_TYPE) .dynamic info
    22 	$(TOOLCHAIN_PREFIX)readelf -d $@ | grep '($(DT_TYPE))'
    23 	@rm -f $@.bak
    24 	$(CURDIR)/elfhack -b -f $@
    25 	# Fail if the backup file doesn't exist
    26 	[ -f '$@.bak' ]
    27 	# Fail if the new library doesn't contain less relocations
    28 	[ $$($(TOOLCHAIN_PREFIX)objdump -R $@.bak | wc -l) -gt $$(objdump -R $@ | wc -l) ]
    30 test-array$(DLL_SUFFIX): DT_TYPE=INIT_ARRAY
    31 test-ctors$(DLL_SUFFIX): DT_TYPE=INIT
    33 .PRECIOUS: test-array$(DLL_SUFFIX) test-ctors$(DLL_SUFFIX)
    35 GARBAGE += test-array$(DLL_SUFFIX) test-ctors$(DLL_SUFFIX) test-array$(DLL_SUFFIX).bak test-ctors$(DLL_SUFFIX).bak
    37 ifndef CROSS_COMPILE
    38 ifdef COMPILE_ENVIRONMENT
    39 libs:: test-array$(DLL_SUFFIX) test-ctors$(DLL_SUFFIX)
    41 dummy: dummy.$(OBJ_SUFFIX)
    42 	$(CC) -o $@ $^ $(LDFLAGS)
    44 libs:: dummy
    45 	# Will either crash or return exit code 1 if elfhack is broken
    46 	LD_PRELOAD=$(CURDIR)/test-array$(DLL_SUFFIX) $(CURDIR)/dummy
    47 	LD_PRELOAD=$(CURDIR)/test-ctors$(DLL_SUFFIX) $(CURDIR)/dummy
    49 GARBAGE += dummy
    50 endif
    51 endif

mercurial