Skip to content

Commit 551e13a

Browse files
committed
guix: Adjust for Qt 6
1. Do not set `C{PLUS}_INCLUDE_PATH` variables The build system for Qt 6 differs entirely from that of Qt 5. Building a set of native Qt 6 tools now forms a separate step when cross-compiling. Under these new circumstances, the `C{PLUS}_INCLUDE_PATH` environment variables may alter the default include directories for both native and cross compilers. Previously, we explicitly unset these variables when invoking clang for cross-compiling; however, that approach proved suboptimal (see #30451). This change sets the native toolchain for dependencies explicitly, rather than relying on the `C{PLUS}_INCLUDE_PATH` environment variables. Additionally, it facilitates the transition towards using clang for building native tools when cross-compiling for macOS. 2. Add `ninja` package. 3. Adjust allowed symbol lists.
1 parent c3e9bd0 commit 551e13a

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

contrib/devtools/symbol-check.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
'libfontconfig.so.1', # font support
113113
'libfreetype.so.6', # font parsing
114114
'libdl.so.2', # programming interface to dynamic linker
115+
'libxcb-cursor.so.0',
115116
'libxcb-icccm.so.4',
116117
'libxcb-image.so.0',
117118
'libxcb-shm.so.0',
@@ -146,8 +147,9 @@
146147
'IOSurface', # cross process image/drawing buffers
147148
'libobjc.A.dylib', # Objective-C runtime library
148149
'Metal', # 3D graphics
149-
'Security', # access control and authentication
150150
'QuartzCore', # animation
151+
'Security', # access control and authentication
152+
'UniformTypeIdentifiers', # collection of types that map to MIME and file types
151153
}
152154

153155
PE_ALLOWED_LIBRARIES = {
@@ -158,7 +160,17 @@
158160
'SHELL32.dll', # shell API
159161
'WS2_32.dll', # sockets
160162
# bitcoin-qt only
163+
'api-ms-win-core-synch-l1-2-0.dll', # Synchronization Primitives API
164+
'api-ms-win-core-winrt-l1-1-0.dll', # Windows Runtime API
165+
'api-ms-win-core-winrt-string-l1-1-0.dll', # WinRT String API
166+
'AUTHZ.dll', # Windows Authorization Framework
167+
'comdlg32.dll', # Common Dialog Box Library
168+
'd3d11.dll', # Direct3D 11 API
169+
'd3d12.dll', # Direct3D 12 API
170+
'd3d9.dll', # Direct3D 9 API
161171
'dwmapi.dll', # desktop window manager
172+
'DWrite.dll', # DirectX Typography Services
173+
'dxgi.dll', # DirectX Graphics Infrastructure
162174
'GDI32.dll', # graphics device interface
163175
'IMM32.dll', # input method editor
164176
'NETAPI32.dll', # network management
@@ -171,6 +183,8 @@
171183
'VERSION.dll', # version checking
172184
'WINMM.dll', # WinMM audio API
173185
'WTSAPI32.dll', # Remote Desktop
186+
'SETUPAPI.dll', # Windows Setup API
187+
'SHCORE.dll', # Stream Handler Core
174188
}
175189

176190
def check_version(max_versions, version, arch) -> bool:

contrib/guix/libexec/build.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ unset CPLUS_INCLUDE_PATH
6969
unset OBJC_INCLUDE_PATH
7070
unset OBJCPLUS_INCLUDE_PATH
7171

72-
export C_INCLUDE_PATH="${NATIVE_GCC}/include"
73-
export CPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
72+
# Set native toolchain
73+
build_CC="${NATIVE_GCC}/bin/gcc -isystem ${NATIVE_GCC}/include"
74+
build_CXX="${NATIVE_GCC}/bin/g++ -isystem ${NATIVE_GCC}/include/c++ -isystem ${NATIVE_GCC}/include"
7475

7576
case "$HOST" in
7677
*darwin*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;; # Required for qt/qmake
@@ -171,6 +172,8 @@ make -C depends --jobs="$JOBS" HOST="$HOST" \
171172
${SOURCES_PATH+SOURCES_PATH="$SOURCES_PATH"} \
172173
${BASE_CACHE+BASE_CACHE="$BASE_CACHE"} \
173174
${SDK_PATH+SDK_PATH="$SDK_PATH"} \
175+
${build_CC+build_CC="$build_CC"} \
176+
${build_CXX+build_CXX="$build_CXX"} \
174177
x86_64_linux_CC=x86_64-linux-gnu-gcc \
175178
x86_64_linux_CXX=x86_64-linux-gnu-g++ \
176179
x86_64_linux_AR=x86_64-linux-gnu-gcc-ar \
@@ -181,8 +184,6 @@ make -C depends --jobs="$JOBS" HOST="$HOST" \
181184
case "$HOST" in
182185
*darwin*)
183186
# Unset now that Qt is built
184-
unset C_INCLUDE_PATH
185-
unset CPLUS_INCLUDE_PATH
186187
unset LIBRARY_PATH
187188
;;
188189
esac

contrib/guix/manifest.scm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
((gnu packages linux) #:select (linux-libre-headers-6.1))
1414
(gnu packages llvm)
1515
(gnu packages mingw)
16+
(gnu packages ninja)
1617
(gnu packages pkg-config)
1718
((gnu packages python) #:select (python-minimal))
1819
((gnu packages python-build) #:select (python-tomli python-poetry-core))
@@ -547,6 +548,7 @@ inspecting signatures in Mach-O binaries.")
547548
gcc-toolchain-13
548549
cmake-minimal
549550
gnu-make
551+
ninja
550552
;; Scripting
551553
python-minimal ;; (3.10)
552554
;; Git

0 commit comments

Comments
 (0)