Your message dated Fri, 20 Oct 2023 10:41:23 +0200
with message-id <ecbe77d8-054a-4a5a-9d1c-8f55eb267...@debian.org>
and subject line fixed issues
has caused the Debian Bug report #1050401,
regarding wasm builds fail with -march= and -mfpu flags set for the host
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1050401: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050401
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: src:llvm-toolchain-17
Version: 17.0.0~+rc3-1~exp1
Severity: serious
Tags: sid trixie

the wasm builds fail on architectures with -march= and -mfpu flags set for the host, like armhf, and probably armel. This used to work in LLVM 16.

I assume this is an upstream issue (confusing the host and the target), but here is one way to work-around it, to remove these flags from the flag settings. Another possibility could be to disable the wasm builds on these architectures.

patch for the work around is attached.


[...]
    FAILED: CMakeFiles/cmTC_31967.dir/testCCompiler.c.obj
"/<<PKGBUILDDIR>>/build-llvm/tools/clang/stage2-bins/bin/clang" --target=wasm32-unknown-unknown -O2 -DNDEBUG -g1 -fstack-protector-strong -Wformat -Werror=format-security -Wno-unused-command-line-argument -march=armv7-a -mfpu=vfpv3-d16 -Wdate-time -D_FORTIFY_SOURCE=2 -MD -MT CMak eFiles/cmTC_31967.dir/testCCompiler.c.obj -MF CMakeFiles/cmTC_31967.dir/testCCompiler.c.obj.d -o CMakeFiles/cmTC_31967.dir/testCCompiler.c.obj -c '/<<PKGBUILDDIR>>/build-wasm/compiler-rt-wasm32/CMakeFiles/CMakeScratch/TryCompile-X7CN7p/testCCompiler.c'
    clang: error: unsupported option '-march=' for target 
'wasm32-unknown-unknown'
    clang: error: unsupported option '-mfpu=' for target 
'wasm32-unknown-unknown'
    ninja: build stopped: subcommand failed.





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:9 (project)


-- Configuring incomplete, errors occurred!
make[1]: *** [debian/rules:815: build-wasm/compiler-rt-wasm32] Error 1
  * Don't pass -march= and -mcpu= flags to the wasm builds.
 
diff -Nru llvm-toolchain-17-17.0.0~+rc2/debian/rules llvm-toolchain-17-17.0.0~+rc2/debian/rules
--- llvm-toolchain-17-17.0.0~+rc2/debian/rules	2023-08-15 21:25:12.000000000 +0200
+++ llvm-toolchain-17-17.0.0~+rc2/debian/rules	2023-08-23 17:26:07.000000000 +0200
@@ -821,8 +821,8 @@
 		-DCMAKE_ASM_COMPILER_TARGET=$(cpu)-unknown-unknown \
 		-DCMAKE_C_COMPILER=$(STAGE_2_BIN_DIR)/clang \
 		-DCMAKE_CXX_COMPILER=$(STAGE_2_BIN_DIR)/clang++ \
-		-DCMAKE_C_FLAGS="$(opt_flags) $(STAGE_2_CFLAGS)" \
-		-DCMAKE_CXX_FLAGS="$(opt_flags) $(STAGE_2_CXXFLAGS)" \
+		-DCMAKE_C_FLAGS="$(opt_flags) $(filter-out -march=%, $(filter-out -mfpu=%, $(STAGE_2_CFLAGS)))" \
+		-DCMAKE_CXX_FLAGS="$(opt_flags) $(filter-out -march=%, $(filter-out -mfpu=%, $(STAGE_2_CXXFLAGS)))" \
 		-DCMAKE_SHARED_LINKER_FLAGS="$(STAGE_2_LDFLAGS) -L$(STAGE_2_LIB_DIR)" \
 		-DCMAKE_MODULE_LINKER_FLAGS="$(STAGE_2_LDFLAGS) -L$(STAGE_2_LIB_DIR)" \
 		-DCMAKE_EXE_LINKER_FLAGS="$(STAGE_2_LDFLAGS) -L$(STAGE_2_LIB_DIR)" \
@@ -885,8 +885,8 @@
 		-DCMAKE_CXX_COMPILER=$(STAGE_2_BIN_DIR)/clang++ \
 		-DCMAKE_AR=$(STAGE_2_BIN_DIR)/llvm-ar \
 		-DCMAKE_RANLIB=$(STAGE_2_BIN_DIR)/llvm-ranlib \
-		-DCMAKE_C_FLAGS="$(opt_flags) $(STAGE_2_CFLAGS) -fno-stack-protector" \
-		-DCMAKE_CXX_FLAGS="$(opt_flags) $(STAGE_2_CXXFLAGS) -fno-stack-protector" \
+		-DCMAKE_C_FLAGS="$(opt_flags) $(filter-out -march=%, $(filter-out -mfpu=%, $(STAGE_2_CFLAGS))) -fno-stack-protector" \
+		-DCMAKE_CXX_FLAGS="$(opt_flags) $(filter-out -march=%, $(filter-out -mfpu=%, $(STAGE_2_CXXFLAGS))) -fno-stack-protector" \
 		-DCMAKE_SHARED_LINKER_FLAGS="$(LDFLAGS) -L$(STAGE_2_LIB_DIR)" \
 		-DCMAKE_MODULE_LINKER_FLAGS="$(LDFLAGS) -L$(STAGE_2_LIB_DIR)" \
 		-DCMAKE_EXE_LINKER_FLAGS="$(LDFLAGS) -L$(STAGE_2_LIB_DIR)" \

--- End Message ---
--- Begin Message ---
Version: 1:17.0.3-1~exp1

--- End Message ---

Reply via email to