[Lldb-commits] [lldb] r277453 - Revert rL277429: Correct makefile.rules to use toolchain specific AR and OBJCOPY
Omair Javaid via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 2 06:17:49 PDT 2016
Author: omjavaid
Date: Tue Aug 2 08:17:49 2016
New Revision: 277453
URL: http://llvm.org/viewvc/llvm-project?rev=277453&view=rev
Log:
Revert rL277429: Correct makefile.rules to use toolchain specific AR and OBJCOPY
This commit is causing problems on gcc-* compiler with version number sufix.
Requires a new solution will post a follow up patch.
Differential revision: https://reviews.llvm.org/D20386
Modified:
lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules
Modified: lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules?rev=277453&r1=277452&r2=277453&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules Tue Aug 2 08:17:49 2016
@@ -265,6 +265,8 @@ cxx_linker_notdir = $(if $(findstring cl
$(subst cc,c++,$(1))))))
cxx_linker = $(if $(findstring /,$(1)),$(join $(dir $(1)), $(call cxx_linker_notdir,$(notdir $(1)))),$(call cxx_linker_notdir,$(1)))
+OBJCOPY := $(CROSS_COMPILE)objcopy
+
#----------------------------------------------------------------------
# Windows specific options
#----------------------------------------------------------------------
@@ -285,25 +287,24 @@ endif
#----------------------------------------------------------------------
# Android specific options
#----------------------------------------------------------------------
-
-ifdef PIE
- LDFLAGS += -pie
+ifeq "$(OS)" "Android"
+ ifdef PIE
+ LDFLAGS += -pie
+ endif
+ replace_with = $(if $(findstring clang,$(1)), \
+ $(subst clang,$(2),$(1)), \
+ $(if $(findstring gcc,$(1)), \
+ $(subst gcc,$(2),$(1)), \
+ $(subst cc,$(2),$(1))))
+ ifeq "$(notdir $(CC))" "$(CC)"
+ replace_cc_with = $(call replace_with,$(CC),$(1))
+ else
+ replace_cc_with = $(join $(dir $(CC)),$(call replace_with,$(notdir $(CC)),$(1)))
+ endif
+ OBJCOPY = $(call replace_cc_with,objcopy)
+ AR = $(call replace_cc_with,ar)
endif
-replace_with = $(if $(findstring clang,$(1)), \
- $(subst clang,$(2),$(1)), \
- $(if $(findstring gcc,$(1)), \
- $(subst gcc,$(2),$(1)), \
- $(subst cc,$(2),$(1))))
-ifeq "$(notdir $(CC))" "$(CC)"
- replace_cc_with = $(call replace_with,$(CC),$(1))
-else
- replace_cc_with = $(join $(dir $(CC)),$(call replace_with,$(notdir $(CC)),$(1)))
-endif
-
-OBJCOPY = $(call replace_cc_with,objcopy)
-AR = $(call replace_cc_with,ar)
-
#----------------------------------------------------------------------
# C++ standard library options
#----------------------------------------------------------------------
More information about the lldb-commits
mailing list