From 333fe4ca8bca3b45ff3398ccf96f419f8eaed36e Mon Sep 17 00:00:00 2001 From: Dipal M Zambare Date: Thu, 22 Apr 2021 12:13:12 +0530 Subject: [PATCH] Makefile cleanup Removed unused function rm-dupls() from common.mk Removed code from patch-ld-so.py which is not needed for AMD codebase. AMD-Internal: [CPUPL-1539] Change-Id: If1812d5aa87c1e3a9d0c4706d571223d56f2fc20 --- common.mk | 6 ------ travis/patch-ld-so.py | 15 +-------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/common.mk b/common.mk index 76f7ce018..07548f6e8 100644 --- a/common.mk +++ b/common.mk @@ -212,12 +212,6 @@ get-sandbox-cxxtext-for = "('$(1)' CXXFLAGS for sandboxes)" files-that-contain = $(strip $(foreach f, $(1), $(if $(findstring $(2),$(f)),$(f),))) files-that-dont-contain = $(strip $(foreach f, $(1), $(if $(findstring $(2),$(f)),,$(f)))) -# Define a function that removes duplicate words from a list. -# NOTE: This function was obtained via [1]; thanks bobbogo for this -# concise definition. -# [1] https://stackoverflow.com/questions/16144115/makefile-remove-duplicate-words-without-sorting -rm-dupls = $(if $1,$(firstword $1) $(call rm-dupls,$(filter-out $(firstword $1),$1))) - # # --- Include makefile configuration file -------------------------------------- diff --git a/travis/patch-ld-so.py b/travis/patch-ld-so.py index 72e580d74..4eb85bafa 100755 --- a/travis/patch-ld-so.py +++ b/travis/patch-ld-so.py @@ -1,16 +1,3 @@ #!/usr/bin/env python -# -# Patch ld.so to disable runtime CPUID detection -# Taken from https://stackoverflow.com/a/44483482 -# - -import re -import sys - -infile, outfile = sys.argv[1:] -d = open(infile, 'rb').read() -# Match CPUID(eax=0), "xor eax,eax" followed closely by "cpuid" -o = re.sub(b'(\x31\xc0.{0,32})\x0f\xa2', b'\\1\x66\x90', d) -#assert d != o -open(outfile, 'wb').write(o) +# Stub file in AMD repository as it is not needed