Hello community, here is the log from the commit of package llvm for openSUSE:Factory checked in at 2012-07-18 17:32:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/llvm (Old) and /work/SRC/openSUSE:Factory/.llvm.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "llvm", Maintainer is "mh...@novell.com" Changes: -------- --- /work/SRC/openSUSE:Factory/llvm/llvm.changes 2012-07-15 12:05:54.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.llvm.new/llvm.changes 2012-07-18 17:32:09.000000000 +0200 @@ -1,0 +2,5 @@ +Thu Jul 14 17:30:58 UTC 2012 - adr...@suse.de + +- fix arm build + +------------------------------------------------------------------- New: ---- arm-suse-support.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ llvm.spec ++++++ --- /var/tmp/diff_new_pack.f49wAr/_old 2012-07-18 17:32:10.000000000 +0200 +++ /var/tmp/diff_new_pack.f49wAr/_new 2012-07-18 17:32:10.000000000 +0200 @@ -42,6 +42,7 @@ Patch7: pr12463.patch Patch8: pr13141.patch Patch9: pr13303.patch +Patch10: arm-suse-support.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -144,6 +145,9 @@ %patch7 -p0 %patch8 -p0 %patch9 -p1 +%ifarch %arm +%patch10 +%endif # We hardcode i586 rm tools/clang/test/Driver/x86_features.c @@ -168,6 +172,12 @@ --enable-optimized \ --disable-assertions \ --with-optimize-option="-O0" \ +%ifarch %arm + --disable-sjlj-exceptions \ + --with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16 --with-mode=thumb \ + --disable-werror --enable-checking=release \ + --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf \ +%endif --enable-targets=host make %{?_smp_mflags} @@ -192,15 +202,25 @@ %if 0%{?suse_version} >= 1220 --with-binutils-include=/usr/include \ %endif +%ifarch %arm + --with-optimize-option="-U_GLIBCXX_ATOMIC_BUILTINS" \ + --disable-sjlj-exceptions \ + --with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16 --with-mode=thumb \ + --disable-werror --enable-checking=release \ + --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf \ +%endif --with-clang-resource-dir="../%{_lib}/clang/%{_release_version}" make %{?_smp_mflags} REQUIRES_RTTI=1 %check cd stage2 +%if 0%{!?qemu_user_space_build:1} +# we just do not have enough memory with qemu emulation make check cd tools/clang make test +%endif %install cd stage2 ++++++ arm-suse-support.patch ++++++ Index: tools/clang/lib/Driver/Tools.cpp =================================================================== --- tools/clang/lib/Driver/Tools.cpp.orig +++ tools/clang/lib/Driver/Tools.cpp @@ -611,6 +611,11 @@ static StringRef getARMFloatABI(const Dr } case llvm::Triple::Linux: { + StringRef ArchName = getLLVMArchSuffixForARM(getARMTargetCPU(Args, Triple)); + if (Triple.getEnvironment() == llvm::Triple::GNUEABIHF || ArchName.startswith("v7")) { + FloatABI = "hard"; + break; + } else if (Triple.getEnvironment() == llvm::Triple::GNUEABI) { FloatABI = "softfp"; break; @@ -623,6 +627,9 @@ static StringRef getARMFloatABI(const Dr case llvm::Triple::GNUEABI: FloatABI = "softfp"; break; + case llvm::Triple::GNUEABIHF: + FloatABI = "hard"; + break; case llvm::Triple::EABI: // EABI is always AAPCS, and if it was not marked 'hard', it's softfp FloatABI = "softfp"; @@ -665,6 +672,7 @@ void Clang::AddARMTargetArgs(const ArgLi // Select the default based on the platform. switch(Triple.getEnvironment()) { case llvm::Triple::ANDROIDEABI: + case llvm::Triple::GNUEABIHF: case llvm::Triple::GNUEABI: ABIName = "aapcs-linux"; break; @@ -730,10 +738,11 @@ void Clang::AddARMTargetArgs(const ArgLi // Setting -msoft-float effectively disables NEON because of the GCC // implementation, although the same isn't true of VFP or VFP3. - if (FloatABI == "soft") { +// if (FloatABI == "soft") { +// we do not use neon on suse so far, disabling it always to avoid incompatible ABI CmdArgs.push_back("-target-feature"); CmdArgs.push_back("-neon"); - } +// } // Kernel code has more strict alignment requirements. if (KernelOrKext) { @@ -5062,8 +5071,9 @@ void linuxtools::Assemble::ConstructJob( CmdArgs.push_back("-many"); } else if (getToolChain().getArch() == llvm::Triple::arm) { StringRef MArch = getToolChain().getArchName(); - if (MArch == "armv7" || MArch == "armv7a" || MArch == "armv7-a") - CmdArgs.push_back("-mfpu=neon"); +// we do not use neon on suse so far, disabling it always to avoid incompatible ABI +// if (MArch == "armv7" || MArch == "armv7a" || MArch == "armv7-a") +// CmdArgs.push_back("-mfpu=neon"); } else if (getToolChain().getArch() == llvm::Triple::mips || getToolChain().getArch() == llvm::Triple::mipsel || getToolChain().getArch() == llvm::Triple::mips64 || Index: tools/clang/lib/Driver/ToolChains.cpp =================================================================== --- tools/clang/lib/Driver/ToolChains.cpp.orig +++ tools/clang/lib/Driver/ToolChains.cpp @@ -1185,6 +1185,9 @@ Generic_GCC::GCCInstallationDetector::GC static const char *const ARMLibDirs[] = { "/lib" }; static const char *const ARMTriples[] = { "arm-linux-gnueabi", + "armv5el-suse-linux-gnueabi", + "armv7hl-suse-linux-gnueabi", + "armv7hl-suse-linux-gnueabihf", "arm-linux-androideabi" }; -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org