[Lldb-commits] [PATCH] D20386: Correct makefile.rules to use arm/aarch64 target specific AR and OBJCOPY

Muhammad Omair Javaid via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 2 01:03:58 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL277429: Correct makefile.rules to use toolchain specific AR and OBJCOPY (authored by omjavaid).

Changed prior to commit:
  https://reviews.llvm.org/D20386?vs=66258&id=66438#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D20386

Files:
  lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules

Index: lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules
===================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules
+++ lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -265,8 +265,6 @@
                                         $(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
 #----------------------------------------------------------------------
@@ -287,24 +285,25 @@
 #----------------------------------------------------------------------
 # Android specific options
 #----------------------------------------------------------------------
-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)
+
+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)
+
 #----------------------------------------------------------------------
 # C++ standard library options
 #----------------------------------------------------------------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20386.66438.patch
Type: text/x-patch
Size: 2275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160802/f117db77/attachment.bin>


More information about the lldb-commits mailing list