From 2a27e79c613a6a90fa9c1861a7248bf031c9cc72 Mon Sep 17 00:00:00 2001 From: tesnos6921 <7860497+tesnos6921@users.noreply.github.com> Date: Tue, 30 Jul 2024 14:57:16 -0400 Subject: [PATCH 1/3] aaaaaaaaaaaa --- .../development/compilers/llvm/common/compiler-rt/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix index 67f9661cf7438..b9b3798b26822 100644 --- a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix @@ -46,7 +46,9 @@ let cp -r ${monorepoSrc}/${baseName} "$out" '' else src; - preConfigure = lib.optionalString (useLLVM && !haveLibc) '' + preConfigure = '' + cmakeFlagsArray+=(-DCMAKE_ASM_FLAGS="--target=arm-linux-gnueabihf -march=armv6") + '' ++ lib.optionalString (useLLVM && !haveLibc) '' cmakeFlagsArray+=(-DCMAKE_C_FLAGS="-nodefaultlibs -ffreestanding") ''; in From f4c0af3432140baacd8e973f747db5e41e964755 Mon Sep 17 00:00:00 2001 From: tesnos6921 <7860497+tesnos6921@users.noreply.github.com> Date: Tue, 30 Jul 2024 15:39:46 -0400 Subject: [PATCH 2/3] bbbbbbbbbb --- pkgs/development/compilers/llvm/common/compiler-rt/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix index b9b3798b26822..54271b15430ff 100644 --- a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix @@ -82,6 +82,7 @@ stdenv.mkDerivation ({ "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}" "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}" + -DCOMPILER_RT_BUILD_BUILTINS=OFF ] ++ lib.optionals (haveLibc && stdenv.hostPlatform.libc == "glibc") [ "-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include" ] ++ lib.optionals ((useLLVM || bareMetal || isMusl || isAarch64) && (lib.versions.major release_version == "13")) [ @@ -103,7 +104,7 @@ stdenv.mkDerivation ({ ] ++ lib.optionals (useLLVM && !haveLibc) [ "-DCMAKE_C_FLAGS=-nodefaultlibs" ] ++ lib.optionals (useLLVM) [ - "-DCOMPILER_RT_BUILD_BUILTINS=ON" + #"-DCOMPILER_RT_BUILD_BUILTINS=ON" #https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY" ] ++ lib.optionals (bareMetal) [ From 61b3c25234a8b08a960174b8e43ae207087fb9f4 Mon Sep 17 00:00:00 2001 From: tesnos6921 <7860497+tesnos6921@users.noreply.github.com> Date: Wed, 31 Jul 2024 09:51:18 -0400 Subject: [PATCH 3/3] no arm sync --- .../llvm/18/compiler-rt/X86-support-extension.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/compilers/llvm/18/compiler-rt/X86-support-extension.patch b/pkgs/development/compilers/llvm/18/compiler-rt/X86-support-extension.patch index 07013e5a68259..dbcff80e2f21a 100644 --- a/pkgs/development/compilers/llvm/18/compiler-rt/X86-support-extension.patch +++ b/pkgs/development/compilers/llvm/18/compiler-rt/X86-support-extension.patch @@ -11,6 +11,16 @@ index 3a66dd9c3fb..7efc85d9f9f 100644 if (WIN32) set(i386_SOURCES ${i386_SOURCES} +@@ -542,3 +542,2 @@ arm/chkstk.S + ${arm_or_thumb2_base_SOURCES} +- ${arm_sync_SOURCES} + ) +@@ -552,4 +552,3 @@ set(arm_SOURCES + ${arm_or_thumb2_base_SOURCES} +- ${arm_sync_SOURCES} + ${arm_EABI_SOURCES} + ${arm_Thumb1_SOURCES} + ) @@ -723,6 +723,7 @@ else () endif()