Bug 311694

Summary: [WPE][cross-toolchain-helper] determineArchitecture() in webkitdirs.pm doesn't handle correctly the cross-toolchain-helper case.
Product: WebKit Reporter: Carlos Alberto Lopez Perez <clopez>
Component: WPE WebKitAssignee: Carlos Alberto Lopez Perez <clopez>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Carlos Alberto Lopez Perez
Reported 2026-04-07 17:47:23 PDT
I observed this when cross-building WPE with CXXFLAGS="-g0 -O2 -DNDEBUG -Wno-cast-align -mrestrict-it -mthumb" $ Tools/Scripts/build-webkit --wpe --cross-target=rpi3-32bits-userland CMake Error at /usr/share/cmake-3.25/Modules/CMakeTestCCompiler.cmake:70 (message): The C compiler "/usr/bin/cc" is not able to compile a simple test program. It fails with the following output: Change Dir: /home/clopez/webkit/WPEWebKit/__cmake_systeminformation/CMakeFiles/CMakeScratch/TryCompile-lIHCwp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_4fcdc/fast && /usr/bin/gmake -f CMakeFiles/cmTC_4fcdc.dir/build.make CMakeFiles/cmTC_4fcdc.dir/build gmake[1]: Entering directory '/home/clopez/webkit/WPEWebKit/__cmake_systeminformation/CMakeFiles/CMakeScratch/TryCompile-lIHCwp' Building C object CMakeFiles/cmTC_4fcdc.dir/testCCompiler.c.o /usr/bin/cc -g0 -O2 -DNDEBUG -Wno-cast-align -mrestrict-it -mthumb -o CMakeFiles/cmTC_4fcdc.dir/testCCompiler.c.o -c /home/clopez/webkit/WPEWebKit/__cmake_systeminformation/CMakeFiles /CMakeScratch/TryCompile-lIHCwp/testCCompiler.c cc: error: unrecognized command-line option ‘-mrestrict-it’; did you mean ‘-Wrestrict’? cc: error: unrecognized command-line option ‘-mthumb’ gmake[1]: *** [CMakeFiles/cmTC_4fcdc.dir/build.make:78: CMakeFiles/cmTC_4fcdc.dir/testCCompiler.c.o] Error 1 gmake[1]: Leaving directory '/home/clopez/webkit/WPEWebKit/__cmake_systeminformation/CMakeFiles/CMakeScratch/TryCompile-lIHCwp' gmake: *** [Makefile:127: cmTC_4fcdc/fast] Error 2 CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:6 (project) Error: --system-information failed on internal CMake! cross-toolchain-helper INFO: Adding defined environment for rpi3-32bits-userland: cross-toolchain-helper INFO: export BUILD_WEBKIT_ARGS="--no-fatal-warnings" cross-toolchain-helper INFO: Toolchain already built at: /home/clopez/webkit/WPEWebKit/WebKitBuild/CrossToolChains/rpi3-32bits-userland/build/toolchain cross-toolchain-helper INFO: Running inside cross-toolchain env: /home/clopez/webkit/WPEWebKit/Tools/Scripts/build-webkit --release --wpe + cmake -DPORT="WPE" -DCMAKE_BUILD_TYPE=Release -G Ninja -DDEVELOPER_MODE=ON -DENABLE_EXPERIMENTAL_FEATURES=ON -DBWRAP_EXECUTABLE=/usr/bin/bwrap -DDBUS_PROXY_EXECUTABLE=/usr/bin/xdg-dbus-proxy "/home/clopez/webkit/WPEWebKit" -- The C compiler identification is GNU 13.3.0 -- The CXX compiler identification is GNU 13.3.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /home/clopez/webkit/WPEWebKit/WebKitBuild/CrossToolChains/rpi3-32bits-userland/build/toolchain/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/a rm-poky-linux-gnueabi-gcc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /home/clopez/webkit/WPEWebKit/WebKitBuild/CrossToolChains/rpi3-32bits-userland/build/toolchain/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi /arm-poky-linux-gnueabi-g++ - skipped -- Detecting CXX compile features [...] So what happens is that build-webkit is calling cmake --system-information outside of the cross-toolchain environment at determineArchitecture()
Attachments
Carlos Alberto Lopez Perez
Comment 1 2026-04-07 18:09:59 PDT
EWS
Comment 2 2026-04-20 09:25:47 PDT
Committed 311591@main (68c43f3fd9ec): <https://commits.webkit.org/311591@main> Reviewed commits have been landed. Closing PR #62240 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.