diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-10-18 18:53:48 +0200 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-10-18 19:16:27 +0200 |
commit | a05d061aa384863e601c7989b363f8ef70dad34f (patch) | |
tree | 49eafb663c49b8ce203ab17b6bb5f9140eabf7b6 /rbutil | |
parent | d097742155873c8597f1b5adcce95fa17f135002 (diff) | |
download | rockbox-a05d061aa384863e601c7989b363f8ef70dad34f.tar.gz rockbox-a05d061aa384863e601c7989b363f8ef70dad34f.zip |
rbutil: Pass isysroot to rbutil libs on macOS.
On macOS we pass the full path to the compiler. On recent versions this
causes the compiler to not find its SDK path, this needs to get passed
via the isysroot option.
Change-Id: Iea2820e1755cc80e12691119dfa31d70938ea511
Diffstat (limited to 'rbutil')
-rw-r--r-- | rbutil/libtools.make | 3 | ||||
-rw-r--r-- | rbutil/rbutilqt/Makefile.libs | 1 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.pro | 6 |
3 files changed, 10 insertions, 0 deletions
diff --git a/rbutil/libtools.make b/rbutil/libtools.make index f9affdd9d4..dadc1a0545 100644 --- a/rbutil/libtools.make +++ b/rbutil/libtools.make | |||
@@ -75,6 +75,9 @@ ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE) | |||
75 | # that to determine if we need to set arch and isysroot. | 75 | # that to determine if we need to set arch and isysroot. |
76 | ifeq ($(findstring __clang__,$(CPPDEFINES)),__clang__) | 76 | ifeq ($(findstring __clang__,$(CPPDEFINES)),__clang__) |
77 | GCCFLAGS += -mmacosx-version-min=10.5 | 77 | GCCFLAGS += -mmacosx-version-min=10.5 |
78 | ifneq ($(ISYSROOT),) | ||
79 | GCCFLAGS += -isysroot $(ISYSROOT) | ||
80 | endif | ||
78 | else | 81 | else |
79 | # when building libs for OS X 10.4+ build for both i386 and ppc at the same time. | 82 | # when building libs for OS X 10.4+ build for both i386 and ppc at the same time. |
80 | # This creates fat objects, and ar can only create the archive but not operate | 83 | # This creates fat objects, and ar can only create the archive but not operate |
diff --git a/rbutil/rbutilqt/Makefile.libs b/rbutil/rbutilqt/Makefile.libs index 938426f124..ac4e31a9e4 100644 --- a/rbutil/rbutilqt/Makefile.libs +++ b/rbutil/rbutilqt/Makefile.libs | |||
@@ -32,6 +32,7 @@ export CXXFLAGS=$(EXTRALIB_CXXFLAGS) | |||
32 | export CC=$(EXTRALIBS_CC) | 32 | export CC=$(EXTRALIBS_CC) |
33 | export CXX=$(EXTRALIBS_CXX) | 33 | export CXX=$(EXTRALIBS_CXX) |
34 | export AR=$(EXTRALIBS_AR) | 34 | export AR=$(EXTRALIBS_AR) |
35 | export ISYSROOT=$(EXTRALIB_ISYSROOT) | ||
35 | 36 | ||
36 | libs: librbspeex libucl libipodpatcher libsansapatcher libmkamsboot libmktccboot libmkmpioboot libchinachippatcher libmkimxboot libmks5lboot libbzip2 libbspatch librbtomcrypt | 37 | libs: librbspeex libucl libipodpatcher libsansapatcher libmkamsboot libmktccboot libmkmpioboot libchinachippatcher libmkimxboot libmks5lboot libbzip2 libbspatch librbtomcrypt |
37 | 38 | ||
diff --git a/rbutil/rbutilqt/rbutilqt.pro b/rbutil/rbutilqt/rbutilqt.pro index 9d7da92dbf..a7d0a179e6 100644 --- a/rbutil/rbutilqt/rbutilqt.pro +++ b/rbutil/rbutilqt/rbutilqt.pro | |||
@@ -35,6 +35,12 @@ EXTRALIBS_OPTS += EXTRALIBS_CC=\"$$QMAKE_CC\" | |||
35 | EXTRALIBS_OPTS += EXTRALIBS_CXX=\"$$QMAKE_CXX\" | 35 | EXTRALIBS_OPTS += EXTRALIBS_CXX=\"$$QMAKE_CXX\" |
36 | EXTRALIBS_OPTS += EXTRALIB_CFLAGS=\"$$MACHINEFLAGS\" | 36 | EXTRALIBS_OPTS += EXTRALIB_CFLAGS=\"$$MACHINEFLAGS\" |
37 | EXTRALIBS_OPTS += EXTRALIB_CXXFLAGS=\"$$MACHINEFLAGS\" | 37 | EXTRALIBS_OPTS += EXTRALIB_CXXFLAGS=\"$$MACHINEFLAGS\" |
38 | macx { | ||
39 | # on recent macOS we need to pass isysroot to the libs, otherwise it won't find | ||
40 | # the standard libaries. This is caused by the passed compiler (doesn't rely on | ||
41 | # default compiler but passed full path) | ||
42 | EXTRALIBS_OPTS += EXTRALIB_ISYSROOT=\"$$QMAKE_MAC_SDK.macosx.Path\" | ||
43 | } | ||
38 | 44 | ||
39 | MYBUILDDIR = $$OUT_PWD/build/ | 45 | MYBUILDDIR = $$OUT_PWD/build/ |
40 | MYLIBBUILDDIR = $$MYBUILDDIR/libs/ | 46 | MYLIBBUILDDIR = $$MYBUILDDIR/libs/ |