From f7d8b2db9393004df796b4b7d9a8f66f547c6bef Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Thu, 9 May 2013 17:23:42 +0200 Subject: Only pass AR to extralibs Makefile if the compiler is gcc. We need this only for cross compiling. Trying to figure the compiler prefix fails if the compiler isn't gcc (i.e. clang), and we only support gcc when cross compiling. Change-Id: I822e1b47ec7e9d7e9fdeae8ccf3b8d417a472ef9 --- rbutil/rbutilqt/rbutilqt.pro | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rbutil/rbutilqt/rbutilqt.pro b/rbutil/rbutilqt/rbutilqt.pro index 4c16ac4..9eaf456 100644 --- a/rbutil/rbutilqt/rbutilqt.pro +++ b/rbutil/rbutilqt/rbutilqt.pro @@ -70,7 +70,9 @@ message("Rockbox Base dir: "$$RBBASE_DIR) # the ar that matches the current gcc. Since qmake doesn't provide a variable # holding the correct ar without any additions we need to figure it ourselves # here. This assumes that QMAKE_CC will always be "gcc", maybe with a postfix. -MYAR = $$replace(QMAKE_CC,gcc.*,ar) +contains(QMAKE_CC, gcc) { + EXTRALIBS_MYAR = "EXTRALIBS_AR="$$replace(QMAKE_CC,gcc.*,ar) +} extralibs.commands = $$SILENT \ $(MAKE) -f $$RBBASE_DIR/rbutil/rbutilqt/Makefile.libs \ @@ -81,7 +83,7 @@ extralibs.commands = $$SILENT \ RBBASE_DIR=$$RBBASE_DIR \ EXTRALIBS_CC=\"$$QMAKE_CC\" \ EXTRALIB_CFLAGS=\"$$MACHINEFLAGS\" \ - EXTRALIBS_AR=\"$$MYAR\" \ + $$EXTRALIBS_MYAR \ libs # Note: order is important for RBLIBS! The libs are appended to the linker # flags in this order, put libucl at the end. -- cgit v1.1