summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-10-21 22:17:11 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-10-22 19:20:48 +0200
commit1e12990ba9a08589f9c0e770fdc22d539878a650 (patch)
tree0daeb1f3af81eacf6a44eaf00de4b76f4056d6c2 /rbutil/rbutilqt
parent02c5dd364181ea40d2f9db01ab46a3733266513a (diff)
downloadrockbox-1e12990ba9a08589f9c0e770fdc22d539878a650.tar.gz
rockbox-1e12990ba9a08589f9c0e770fdc22d539878a650.tar.bz2
rockbox-1e12990ba9a08589f9c0e770fdc22d539878a650.zip
rbutil: Rename libbzip2.a to libbz2.a.
When cross compiling for Windows (at least mxe) links bz2, causing both our copy and the system one getting linked, resulting in symbol clashes. Make sure we use the same name as the system one, so the linker can pick one of both. Change-Id: I16213a20f48d4e192cd0b756931f9ccb449fd1c0
Diffstat (limited to 'rbutil/rbutilqt')
-rw-r--r--rbutil/rbutilqt/Makefile.libs6
-rw-r--r--rbutil/rbutilqt/rbutilqt.pro11
2 files changed, 8 insertions, 9 deletions
diff --git a/rbutil/rbutilqt/Makefile.libs b/rbutil/rbutilqt/Makefile.libs
index ac4e31a9e4..f95fd52ab9 100644
--- a/rbutil/rbutilqt/Makefile.libs
+++ b/rbutil/rbutilqt/Makefile.libs
@@ -34,7 +34,7 @@ export CXX=$(EXTRALIBS_CXX)
export AR=$(EXTRALIBS_AR)
export ISYSROOT=$(EXTRALIB_ISYSROOT)
-libs: librbspeex libucl libipodpatcher libsansapatcher libmkamsboot libmktccboot libmkmpioboot libchinachippatcher libmkimxboot libmks5lboot libbzip2 libbspatch librbtomcrypt
+libs: librbspeex libucl libipodpatcher libsansapatcher libmkamsboot libmktccboot libmkmpioboot libchinachippatcher libmkimxboot libmks5lboot libbspatch libbz2 librbtomcrypt
# To support cross compiles, we explicitly pass the CC flag below for
# all tools which override CC or CXX in their makefiles. CXX is only
@@ -72,8 +72,8 @@ libmkimxboot:
libmks5lboot:
$(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/mks5lboot BUILD_DIR=$(BUILD_DIR)/mks5lboot libmks5lboot.a CC=$(CC)
-libbzip2:
- $(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/bzip2 BUILD_DIR=$(BUILD_DIR)/bzip2 libbzip2.a CC=$(CC)
+libbz2:
+ $(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/bzip2 BUILD_DIR=$(BUILD_DIR)/bzip2 libbz2.a CC=$(CC)
libbspatch:
$(SILENT)$(MAKE) -C $(RBBASE_DIR)/rbutil/bspatch BUILD_DIR=$(BUILD_DIR)/bspatch libbspatch.a CC=$(CC)
diff --git a/rbutil/rbutilqt/rbutilqt.pro b/rbutil/rbutilqt/rbutilqt.pro
index b3516f796b..ced22b0628 100644
--- a/rbutil/rbutilqt/rbutilqt.pro
+++ b/rbutil/rbutilqt/rbutilqt.pro
@@ -93,12 +93,11 @@ extralibs.commands = $$SILENT \
RBLIBS = rbspeex ipodpatcher sansapatcher mkamsboot mktccboot \
mkmpioboot chinachippatcher mkimxboot mks5lboot bspatch ucl \
rbtomcrypt
-# NOTE: Linking bzip2 causes problems on Windows (Qt seems to export those
-# symbols as well, similar to what we have with zlib.) Only link that on
-# non-Windows for now.
-!win32 {
- RBLIBS += bzip2
-}
+# NOTE: Our copy of libbzip2 has to use the name "bz2" to match up with the
+# distro name. Otherwise cross compiling would end up linking two copies of
+# bzip2 using different names, causing symbol clashes. Using the same name
+# makes the compiler pick the one he likes.
+RBLIBS += bz2
!win32-msvc* {
QMAKE_EXTRA_TARGETS += extralibs
PRE_TARGETDEPS += extralibs