* [[http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-October/044026.html|[LLVMdev] ARM Qualification ]] * [[http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-October/043770.html|[LLVMdev] LLC ARM Backend maintainer]] * [[http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-September/034555.html|[LLVMdev] Adding a Buildbot Slave]] * [[http://comments.gmane.org/gmane.comp.compilers.llvm.devel/41267|LLVM on ARM testing]] * [[http://ghcarm.wordpress.com/|GHC on ARM]] * [[http://ghcarm.wordpress.com/2011/06/18/llvm-on-arm/|LLVM on ARM]] * [[http://ghcarm.wordpress.com/2011/07/03/llvm-on-arm-testing/|LLVM on ARM testing]] * [[http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-August/042197.html|[LLVMdev] Make LLVM ARM JIT well-formed]] * [[http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-August/042820.html|[LLVMdev] ARMCodeEmitter.cpp JIT support very broken (2.9 and svn)]] [[http://llvm.org/devmtg/2011-11/#talk15|Android Renderscript]] 有針對舊的 LLVM ARM JIT 做 patch。 - 以 "天" 為單位,二元搜尋哪一天的版本出問題 $ svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm $ cd llvm # 測試 6/30 以前 (且包含) 的 LLVM SVN $ svn up -r{20110701} $ make $ make check 2>&1 > log - 以 "版本號" 為單位,二元搜尋該天哪一個版本出問題。有些並非更動 LLVM 的版本可以略過,查詢 [[http://llvm.org/viewvc/llvm-project/llvm/]]。 - 如何判斷 GCC 或是 LLVM 有問題? \\ - 編譯 LLVM 失敗,代表 GCC 有問題。 - 先用 GCC 編譯 LLVM + Clang,再用該編譯好的 LLVM + Clang 編譯 LLVM + Clang,最後執行 `make check` [(http://www.cs.nctu.edu.tw/~chenwj/log/baldrick-2011-07-29.log)] - 先用 GCC 編譯 LLVM + Clang $ wget http://llvm.org/releases/2.9/llvm-2.9.tgz; tar xvf llvm-2.9.tgz $ cd llvm-2.9/tools $ wget http://llvm.org/releases/2.9/clang-2.9.tgz; tar xvf clang-2.9.tgz $ mv clang-2.9 clang $ mkdir build; cd build $ ../llvm-2.9/configure --prefix=$INSTALL \ --build=arm-unknown-linux-gnueabi \ --enable-target=arm --enable-optimized - 再用該編譯好的 LLVM + Clang 編譯 LLVM + Clang $ CC=clang CXX=clang++ ../llvm-2.9/configure --prefix=$INSTALL --enable-optimized \ --with-built-clang --with-llvmcc=clang $ make * log 格式: llvm-{rev}-gcc-{ver}-[cross|native]-[machine].log * 穩定的 GCC 版本: * GCC 4.3.4 * GCC 4.4.1 * 5/17 (rev. 131463, F) - 6/30 (rev. 134148 S) - 7/15 (rev. 135269 S) - 7/20 (rev. 135581 S) - 7/21 (rev. 135676 S) - 7/22 (rev. 135762 F) - 7/23 (rev. 135847 F) - 7/31 (rev. 136591 F) * 135676 (S) - 135719 (S) - 135721 (S) - 135722 (F) - 135738 (F) - 135755 (F) - 135762 (F) * 主要看有無 JIT 相關錯誤 * 先檢視 cross compile 的結果 * [[Marvell]] * [[PandaBoard]] ====== ARM target auto-detection ====== * [[http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-May/049690.html|[LLVMdev] Request for Help: Teach ARM target to auto-detect cpu / subtarget features]] ====== LLVM 3.1 Testing ====== * [[http://lists.cs.uiuc.edu/pipermail/llvm-announce/2012-May/000041.html|[llvm-announce] LLVM 3.1 Release!]] LLVM 3.1 Release: * April 16th: Branching for 3.1 release * April 16-22: Phase 1 testing * April 23-29: Bug fixing for Phase 1 issues, all features completed * April 30-May 6: Phase 2 testing * May 7-13: Addressing Phase 2 issues, final binary generation * May 14th: Release of 3.1! * [[http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-March/048424.html|[LLVMdev] Announcing 3.1 Release Branch Date!]] * [[http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-April/049014.html|[LLVMdev] 3.1 Has Branched]] * [[http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-April/049061.html|[LLVMdev] [3.1 Release] Release Candidate 1 Sources Available]] * [[http://people.mozilla.org/~eakhgari/releasecandidate1readyfortesting.zip]]
I announced on the lists that we're going to branch on the 16th. That will be the start date for testing. Testing takes roughly a month. During that time, please don't upgrade your OS or dev tools. It will limit some variables if problems occur. During testing, any issues you find should be entered into Bugzilla (http://llvm.org/bugs/). Please CC me on any bugs you file. As the release moves on, we may punt some of those bugs and focus on those bugs which are more serious. The truth of the matter is that we may have to fix any issues ourselves. Everyone is very busy and they may not have time to focus on these problems. The good news is that any bad issues may have been fixed on trunk and could just be back-ported to the release branch. :-) Anyway, here's what's involved in testing: * There is a script that you can use that will compile the 3.1 pre-release candidate in various modes and run the regression tests (llvm/test). * You will need to download LLVM 3.0, build it, and run the LLVM test suite (llvm/projects/test-suite) on your system to get a baseline. * You will then need to run the LLVM test suite from the 3.1 pre-release candidate by hand. * You should then compare the 3.1 pre-release candidate results with those from your baseline. There are tools in llvm/utils/release to help with some of these steps. I'll send more detailed instructions once we get to the testing time. But it's fairly straight-forward. If you haven't run the LLVM test suite yet, I encourage you to do this now to get a feeling for how it works. There's some information here (http://llvm.org/docs/TestingGuide.html).
我們要執行兩種測試,第一: 針對 LLVM 3.1 pre-release candidate 做回歸測試 (regression test); 第二: 先用 LLVM 3.0 跑測試包 (test suite) 作為基準,再用 LLVM 3.1 pre-release candidate 跑測試包與前者相比較。本次測試預計對 LLVM 3.1 pre-release candidate 做交叉編譯,再將其結果放至 ARM 機器上運行。
Hi Testers! Okay, I rebranched for 3.1 and I believe that we can start testing release candidate 1! I've attached some scripts to help out with this. To download, +compile, and run the regression tests, use this command: $ ./test-release.sh -release 3.1 -rc 1 Use the '-help' flag for more options: usage: test-release.sh -release X.Y -rc NUM [OPTIONS] -release X.Y The release number to test. -rc NUM The pre-release candidate number. -final The final release candidate. -j NUM Number of compile jobs to run. [default: 3] -build-dir DIR Directory to perform testing in. [default: pwd] -no-checkout Don't checkout the sources from SVN. -no-64bit Don't test the 64-bit version. [default: yes] -enable-ada Build Ada. [default: disable] -disable-clang Do not test clang. [default: enable] -enable-dragonegg Test dragonegg. [default: disable] -enable-fortran Enable Fortran build. [default: disable] -disable-objc Disable ObjC build. [default: enable] -test-debug Test the debug build. [default: no] -test-asserts Test with asserts on. [default: no] -no-compare-files Don't test that phase 2 and 3 files are identical. The comparison of files between phase 2 and phase 3 is showing that some .o files are different. I haven't started looking into those just yet. We don't have +a buildbot set up to test for regressions in that area, so you may use the '-no-compare-files' flag to make it not run these tests. Or simply ignore the +output. :-) If the regression tests fail, please file bug reports about them ASAP. We need those to be fixed before we can go on to phase 2 testing. After things work here, you should run the llvm test suite. You can do this like so (on Darwin): $ cd rc1/Phase3/Release/llvmCore-3.1-rc1.obj/projects/llvm-test/ $ make report TEST=simple ENABLE_HASHED_PROGRAM_OUTPUT=1 \ TARGET_CXX=None TARGET_CC=None \ CC_UNDER_TEST_IS_CLANG=1 USE_REFERENCE_OUTPUT=1 You may also run the test suite with 'TEST=nightly' instead of 'TEST=simple'. For those testing on ARM, you will need to add some more flags to get the programs to run on your ARM device. I hope you've already set things up to do that. +:-) Here's an example of what some flags may look like: $ make -k -j 1 report "TARGET_LLCFLAGS=" "USE_REFERENCE_OUTPUT=1" "DISABLE_CBE=1" \ "ENABLE_OPTIMIZED=1" "ARCH=ARM" "DISABLE_JIT=1" "TARGET_CXX=None" "REMOTE_PORT=2022" \ "TARGET_CC=None" "TARGET_FLAGS=-miphoneos-version-min=4.0 -Wl,--no-demangle -ccc-install-dir /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk" \ "SMALL_PROBLEM_SIZE=1" "ENABLE_HASHED_PROGRAM_OUTPUT=1" "REMOTE_USER=root" \ "CC_UNDER_TEST_TARGET_IS_ARMV6=1" "CC_UNDER_TEST_IS_CLANG=1" "TEST=simple" \ "REMOTE_CLIENT=ssh" "LLC_OPTFLAGS=-O3" "REMOTE_HOST=localhost" Your milage may vary, of course. After you get these results, please compare them to the results from your 3.0 run.You can use the +'findRegressions-simple.py' program to do this. (The 'findRegressions-nightly.py' program is for those who run the 'TEST=nightly' version of the test +suite.) Hopefully, this will get you going with the first round of testing. Thank you again for volunteering! Share and enjoy! -bw
* [[LLVM]] - 下載腳本,並修改成適用於交叉編譯的版本。 $ wget http://people.mozilla.org/~eakhgari/releasecandidate1readyfortesting.zip $ unzip releasecandidate1readyfortesting.zip +++ test-release.sh 2012-04-21 13:21:10.000000000 +0800 @@ -18,6 +18,8 @@ MAKE=make fi +TRIPLE="arm-unknown-linux-gnueabi" + projects="llvm cfe dragonegg compiler-rt test-suite" # Base SVN URL for the sources. @@ -253,12 +255,18 @@ echo "# Configuring llvm $Release-$RC $Flavor" echo "# $BuildDir/llvm.src/configure --prefix=$InstallDir \ --enable-optimized=$Optimized \ - --enable-assertions=$Assertions" + --enable-assertions=$Assertions" \ + --target=${TRIPLE} \ + --host=${TRIPLE} \ + c_compiler=arm-unknown-linux-gnueabi-gcc + cxx_compiler=arm-unknown-linux-gnueabi-g++ env CC="$c_compiler" CXX="$cxx_compiler" \ $BuildDir/llvm.src/configure --prefix=$InstallDir \ --enable-optimized=$Optimized \ --enable-assertions=$Assertions \ --disable-timestamps \ + --target=${TRIPLE} \ + --host=${TRIPLE} \ 2>&1 | tee $LogDir/llvm.configure-Phase$Phase-$Flavor.log cd $BuildDir } - 運行 ''test-release.sh'' 下載代碼並編譯。如果是在 ARM 上編譯,先確定路徑上沒有 x86 版本的 ''llvm-gcc''。 # 工作目錄在 rc1。 # # -no-64bit # ARM 編譯器不接受 -m32 和 -m64 # -no-compare-files # 不比較 Phase2 和 Phase3 的結果 # -disable-clang # 只做 Phase1 $ export PATH=/nfs_home/chenwj/x-tools/arm-unknown-linux-gnueabi/bin:$PATH $ ./test-release.sh -release 3.1 -rc 1 -no-64bit -no-compare-files -no-checkout $ svn co http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_31/rc1 - 在 ARM 上運行 regression test。 $ cd rc1/Phase3/Release/llvmCore-3.1-rc1.obj/ $ make check-all &> regression-test.txt - 在 ARM 上以 LLVM 3.0 運行 test suite 作為基準。目前 lnt 只支援 nightly test。 # LLVM 3.0 可用 lnt。 $ virtualenv mysandbox $ svn co http://llvm.org/svn/llvm-project/lnt/trunk lnt $ mysandbox/bin/python lnt/setup.py develop $ cd mysandbox $ source bin/activate $ lnt runtest nt \ --sandbox llvm-3.0 \ --cc ~/llvm-3.1/llvm-3.0.obj/Release/bin/clang \ --cxx ~/llvm-3.1/llvm-3.0.obj/Release/bin/clang++ \ --llvm-src ~/llvm-3.1/llvm-3.0.src \ --llvm-obj ~/llvm-3.1/llvm-3.0.obj \ --test-suite ~/llvm-3.1/test-suite-3.0.src \ # 不建議使用 lnt,改用手動。LLVM 3.0 似乎只能跑完 Single,其它 benchmark 會失敗。 # 運行失敗的話,不會生成 report.nightly.raw.out。 # # 1. 先 cross compile LLVM 3.0。 # # 2. export x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin, # 如此才能 strip。 # # 3. make install,並設好 clang 的路徑。把 test suite 解開至 ${LLVM_SRC}/projects。 # # 4. 在 ${LLVM_OBJ} 重跑 configure。 # # 5. 到 ${LLVM_SRC}/projects/test-suite 下 make。 - 在 ARM 上以 LLVM 3.1 運行 test suite,並與 LLVM 3.0 的結果作比較。可能需要修改 ''Makefile.config''。 # LLVM 3.1 改用手動。 $ cd rc1/Phase3/Release/llvmCore-3.1-rc1.obj/projects/llvm-test/ $ make -k -j report \ "TARGET_LLCFLAGS=" "USE_REFERENCE_OUTPUT=1ABLE_CBE=1" "ENABLE_OPTIMIZED=1" "ARCH=ARM" "DISABLE_JIT=1" \ "SMALL_PROBLEM_SIZE=1" "ENABLE_HASHED_PROGRAM_OUTPUT=1" "CC_UNDER_TEST_TARGET_IS_ARMV7=1" \ "CC_UNDER_TEST_IS_CLANG=1" "TEST=nightly" "LLC_OPTFLAGS=-O3" &> test.log # 在不同目錄運行 test suite,其輸出會混淆 findRegressions-nightly.py。 $ sed 's:/nfs_home/chenwj/llvm-3.1/rc1/Phase1/Release/llvmCore-3.obj/projects/llvm-test/::' \ report.nightly.raw.out > report.nightly.raw.out.bak $ ./findRegressions-nightly.py ${LLVM_30}/report.nightly.raw.out ${LLVM_31}/report.nightly.raw.out SingleSource/UnitTests/stmtexpr*** REGRESSION (cbe) SingleSource/UnitTests/vla*** REGRESSION (cbe) - 把安裝目錄打包起來。 $ cd rc1/Phase3/Release $ tar zcvf llvmCore-3.1-rc1.install-arm-ubuntu_11.04.tar.gz llvmCore-3.1-rc1.install/ * [[http://llvm.org/bugs/show_bug.cgi?id=12623|[MC assembler] Using .symver directives can make symbols disappear]] * [[http://llvm.org/bugs/show_bug.cgi?id=12694|Test case Sema/arm-neon-types.c fail on ARM]] * [[http://llvm.org/bugs/show_bug.cgi?id=12725|Test case "CXX/conv/conv.prom/p2.cpp" fail due to the wrong assumption about wchar_t on ARM]] * [[http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-May/021143.html|[cfe-dev] [PATCH] Fix clang test failures on MIPS]] * [[http://llvm.org/bugs/show_bug.cgi?id=12751|LLVM 3.1 rc2 phase 1 clang fail to build phase 2 clang]] $ apt-get install subversion-tools # 把 Phase 1 的 build_llvmCore 註解掉。 $ ./test-release.sh -release 3.1 -rc 2 -disable-clang $ svn log http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_31/rc1 --stop-on-copy ------------------------------------------------------------------------ r155062 | void | 2012-04-19 06:10:56 +0800 (四, 19 4 2012) | 1 line Creating release candidate rc1 from release_31 branch ------------------------------------------------------------------------ $ svn log http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_31/rc2 --stop-on-copy ------------------------------------------------------------------------ r156037 | void | 2012-05-03 08:11:00 +0800 (四, 03 5 2012) | 1 line Creating release candidate rc2 from release_31 branch ------------------------------------------------------------------------ $ cd rc2/llvm.src # 好 壞 $ svn-bisect start 155062 156037 Switching to r155672 ... # 這裡用 svn-bisect 會切到不同的 revision,改用手動。 $ cd rc2/cfe.src $ svn up -r 155672 $ cd rc2 $ ./test-release.sh -release 3.1 -rc 2 -no-checkout -no-64bit -no-compare-files $ svn-bisect bad 155672 Switching to r155374 ... $ svn-bisect good 155374 Switching to r155378 ... --- test-release.sh.old 2012-05-07 05:10:22.000000000 -0700 +++ test-release.sh 2012-05-07 04:42:03.000000000 -0700 @@ -18,7 +18,8 @@ MAKE=make fi -projects="llvm cfe dragonegg compiler-rt test-suite" +#projects="llvm cfe dragonegg compiler-rt test-suite" +projects="llvm cfe" # Base SVN URL for the sources. Base_url="http://llvm.org/svn/llvm-project" @@ -199,7 +200,7 @@ for proj in $projects ; do echo "# Exporting $proj $Release-RC$RC sources" - if ! svn export -q $Base_url/$proj/tags/RELEASE_$Release_no_dot/$RC $proj.src ; then + if ! svn checkout -q $Base_url/$proj/tags/RELEASE_$Release_no_dot/$RC $proj.src ; then echo "error: failed to export $proj project" exit 1 fi @@ -404,10 +405,10 @@ ############################################################################ # Phase 1: Build llvmCore and clang echo "# Phase 1: Building llvmCore" - configure_llvmCore 1 $Flavor \ - $llvmCore_phase1_objdir $llvmCore_phase1_installdir - build_llvmCore 1 $Flavor \ - $llvmCore_phase1_objdir + #configure_llvmCore 1 $Flavor \ + # $llvmCore_phase1_objdir $llvmCore_phase1_installdir + #build_llvmCore 1 $Flavor \ + # $llvmCore_phase1_objdir # Test clang if [ "$do_clang" = "yes" ]; then * 若有問題,發送 PR,並將 Release Manager 加入 CC list。 * LLVM 和 Clang 更新到同一版本進行 bisect 糾錯。 * 修正 rc2 錯誤後,下載 rc2 不會下載到已修正的版本,需要下載 rc3。 * 針對 svn head 製作 patch,Release Manager 會將其 merge 回 LLVM 3.1 branch。 $ cd rc1/cfe.src/test $ patch -p0 < r155819.patch * [[http://llvm.org/devmtg/2012-04-12/Slides/Mark_Charlebois.pdf|Building Linux with LLVM]] * [[http://sourcery.mentor.com/public/cxx-abi/abi.html|Itanium C++ ABI (x86)]] * [[http://infocenter.arm.com/help/topic/com.arm.doc.ihi0041c/IHI0041C_cppabi.pdf|C++ ABI for the ARM® Architecture]] * 3.1 節有列出跟 Itanium C\+\+ ABI 不同的地方。 * [[http://infocenter.arm.com/help/topic/com.arm.doc.ihi0059a/IHI0059A_cppabi64.pdf|C++ Application Binary Interface Standard for the ARM 64-bit Architecture]] * [[http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120430/056888.html|[cfe-commits] [PATCH] Fix test case failure due to C++ ABI difference on ARM]] * [[http://stackoverflow.com/questions/1081456/wchar-t-vs-wint-t|wchar_t vs wint_t]] * [[http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120430/057160.html|[cfe-commits] [PATCH] Fix wint_t handling and regression test on ARM]] * ''wint_t'' 定義在 ''/usr/include/wchar.h''; ''wchar_t'' 則是定義在編譯器自帶的標頭檔 ''lib/Header/stdarg.h''。 * 預設是以舊版 JIT 而非 MCJIT 運行 ''ExecutionEngine'' test case。 # 將原本標記成 XFAIL,即預期會失敗的 test 的標記去掉。 $ cd rc1/llvm.src/test/ExecutionEngine $ find . -type f -name "*ll" | xargs sed -i '/; XFAIL: arm/ d' $ vi include/llvm/ExecutionEngine/ExecutionEngine.h UseMCJIT = true; # 或 $ vi rc1/Phase3/Release/llvmCore-3.1-rc1.obj/test/Makefile LIT_ARGS += --param=jit_impl=mcjit # 或 $ make check-all LIT_ARGS=--param=jit_impl=mcjit * lib/ExecutionEngine/RuntimeDyld * [[http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-June/050866.html|[LLVMdev] mc jit]] $ export COMPILER_PATH=/opt/arm-2011.03 # clang arm-none-linux-gnueabi tript 預設生成 armv4t。 $ CC=clang -ccc-host-triple arm-none-linux-gnueabi \ -ccc-gcc-name arm-none-linux-gnueabi-gcc \ --sysroot=${COMPILER_PATH}/arm-none-linux-gnueabi/libc \ -march=armv7-a -mfpu=neon $ cat build.sh TRIPLE="arm-none-linux-gnueabi" PREFIX="arm-2011.09" XTOOL="${HOME}/x-tools/${PREFIX}/bin" LLVM_SRC="$HOME/llvm-3.1/llvm" export PATH=${XTOOL}:$PATH ${LLVM_SRC}/configure --target=${TRIPLE} \ --host=${TRIPLE} \ --enable-target=arm \ --disable-optimized --enable-bindings=none --disable-multilib --disable-bootstrap \ $ . build.sh $ make $ uname -a Linux arm2 2.6.38-1208-omap4 #11-Ubuntu SMP PREEMPT Fri Apr 15 16:34:35 UTC 2011 armv7l armv7l armv7l GNU/Linux $ gcc -v gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4) $ ld -v GNU ld (GNU Binutils for Ubuntu) 2.21.0.20110327 ===== Summary ===== - [[http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-May/021143.html|[cfe-dev] [PATCH] Fix clang test failures on MIPS]] * [[http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-May/021291.html|[cfe-dev] Preprocessor/mmx.c and Preprocessor/predefined-arch-macros.c failed on MIPS]] Clang :: Driver/debug-options-as.c Clang :: Preprocessor/mmx.c Clang :: Preprocessor/predefined-arch-macros.c Clang :: Tooling/clang-check-args.cpp Clang :: Tooling/clang-check-pwd.cpp Clang :: Tooling/clang-check.cpp - * [[http://llvm.org/viewvc/llvm-project?view=rev&revision=156165]] * [[http://llvm.org/viewvc/llvm-project?view=rev&revision=156169]] Clang :: Sema/format-strings.c - Clang :: CXX/special/class.copy/p15-inclass.cpp Clang :: CodeGenCXX/compound-literals.cpp Clang :: CodeGenCXX/copy-constructor-elim-2.cpp Clang :: CodeGenCXX/cxx0x-initializer-references.cpp Clang :: CodeGenCXX/cxx0x-initializer-stdinitializerlist-startend.cpp Clang :: CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp - [[http://llvm.org/viewvc/llvm-project?view=rev&revision=155920]] Clang :: CodeGenCXX/virt-call-offsets.cpp - [[http://llvm.org/viewvc/llvm-project?view=rev&revision=156047]] Clang :: CodeGenCXX/x86-64-abi-sret-vs-2word-struct-param.cpp - [[http://llvm.org/bugs/show_bug.cgi?id=12725]] Clang :: CXX/conv/conv.prom/p2.cpp - [[http://llvm.org/bugs/show_bug.cgi?id=12694]] Clang :: Sema/arm-neon-types.c - [[http://llvm.org/bugs/show_bug.cgi?id=12773]] Clang :: Sema/wchar.c ===== 其它 ===== env CC="ccache /usr/bin/gcc" CXX="ccache /usr/bin/g++" ../llvm/configure \ -C --disable-bindings \ --build=armv7l-unknown-linux-gnueabi --host=armv7l-unknown-linux-gnueabi --target=armv7l-unknown-linux-gnueabi \ --with-cpu=cortex-a9 --with-fpu=neon --with-abi=aapcs --with-float=hard --enable-assertions * [[http://llvm.org/docs/HowToBuildOnARM.html#how-to-build-on-arm|How To Build On ARM]] * [[http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120903/063790.html|[cfe-commits] Fixing some clang tests where ARM C++ ABI differs]] * [[http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-October/025218.html|[cfe-dev] devirtualisation appears to crash clang on covariant functions on ARM]] * [[http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20121022/066604.html|[cfe-commits] [PATCH v2] fix failling regression tests due to calling convention markers on recent ARM ubuntu platforms]] * [[http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-May/049690.html|[LLVMdev] Request for Help: Teach ARM target to auto-detect cpu / subtarget features]][(http://people.cs.nctu.edu.tw/~chenwj/log/QEMU/rth-2012-05-12.txt)] * [[http://jserv.sayya.org/helloworld/HackingHelloWorld-PartII-2007-03-25.pdf|深入淺出 Hello World – Part II]] * [[http://developers.sun.com/solaris/articles/hwcap_modification.html|Modifying Hardware Capabilities (HWCAP)]] * [[http://learn.akae.cn/media/ch20s04.html|第 20 章 链接详解]] ====== Regression Test ====== _2.9 native: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-2.9-gcc-4.4.1-native-arm2.log)] cross: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-2.9-gcc-4.4.1-cross-arm2.log)] _131462 native: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-131462-gcc-4.4.1-native-arm2.log)] cross: [()] _131463 native: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-131463-gcc-4.4.1-native-arm2.log)] cross: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-131463-gcc-4.4.1-cross-arm2.log)] cross-default: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-131463-gcc-4.4.1-default-cross-arm2.log)] _131466 native: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-131466-gcc-4.4.1-native-arm2.log)] _134148 cross-default: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-134148-gcc-4.4.1-default-cross-arm2.log)] _135269 cross-default: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-135269-gcc-4.4.1-default-cross-arm2.log)] _135581 cross-default: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-135581-gcc-4.4.1-default-cross-arm2.log)] _135676 cross-default: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-135676-gcc-4.4.1-default-cross-arm2.log)] _135719 cross-default: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-135719-gcc-4.4.1-default-cross-arm2.log)] _135721 cross-default: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-135721-gcc-4.4.1-default-cross-arm2.log)] _135722 native: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-135722-gcc-4.4.1-native-arm2.log)] cross-default: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-135722-gcc-4.4.1-default-cross-arm2.log)] _135738 cross-default: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-135738-gcc-4.4.1-default-cross-arm2.log)] _135755 cross-default: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-135755-gcc-4.4.1-default-cross-arm2.log)] _135762 cross-default: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-135762-gcc-4.4.1-default-cross-arm2.log)] _135847 cross-default: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-135847-gcc-4.4.1-default-cross-arm2.log)] _136591 cross-default: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-136591-gcc-4.4.1-default-cross-arm2.log)] * 編譯 cross toolchain 時的參數盡量模仿 native。 * 編譯 cross-default toolchain 時採預設參數。 * cross 比 cross-dafault 出現較多錯誤。 * cross-default 和 native 行為較相近。 _2.9 native: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-2.9-gcc-4.4.3-native-arm1.log)] native-new: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-2.9-gcc-4.3.4-native-arm1.log)] cross: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-2.9-gcc-4.4.3-default-cross-arm1.log)] _131463 native: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-131463-gcc-4.4.3-native-arm1.log)] cross: [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-131463-gcc-4.4.3-default-cross-arm1.log)] * gcc 4.4.3 比 gcc 4.4.1 出現較多錯誤。 * native-new 為 gcc 4.3.3,native 為 gcc 4.4.3。 ====== Test Suite ====== $ llvm-g++ initp1.cpp -o initp1 initp1.cpp:22: error: ‘init_priority’ attribute is not supported on this platform ====== Patch ====== - [[http://llvm.org/viewvc/llvm-project?view=rev&revision=131463|131463]] * 本機編譯會導致 Arch 抓錯。--build=arm-unknown-linux-gnueabi 應可解決此問題 [(http://www.cs.nctu.edu.tw/~chenwj/log/llvm-arm-jit/llvm-131466-fix-gcc-4.4.1-native-arm2.log)]。 - [[http://llvm.org/viewvc/llvm-project?view=rev&revision=135722|135722]] * 135722 中 CodeGen 失敗在 135847 被修正。 * 135738 - 135755 多引入一個 ExecutionEngine 失敗,135762 之後修正。 ====== 設備參數 ====== * AV-D1 * gcc 4.4.3 --with-arch=armv7-a --with-float=softfp --with-fpu=vfpv3-d16 --with-mode=thumb * gcc 4.3.4 --with-arch=armv6 --with-tune=cortex-a8 --with-float=softfp --with-fpu=vfp * ld 2.20.1 * linux 2.6.32 $ gcc -v Using built-in specs. Target: arm-linux-gnueabi Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch \ --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix \ --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv7-a --with-float=softfp \ --with-fpu=vfpv3-d16 --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi Thread model: posix gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) $ ld -v GNU ld (GNU Binutils for Ubuntu) 2.20.1-system.20100303 $ uname -a Linux arm1 2.6.32.9-dove-5.4.2 #2 Mon May 16 19:53:39 PDT 2011 armv7l GNU/Linux $ gcc -v Using built-in specs. Target: arm-linux-gnueabi Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.4-10ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr \ --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 \ --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr \ --disable-sjlj-exceptions --with-arch=armv6 --with-tune=cortex-a8 --with-float=softfp --with-fpu=vfp --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi Thread model: posix gcc version 4.3.4 (Ubuntu 4.3.4-10ubuntu1) * ARMADA XP * gcc 4.4.1 --with-arch=armv6 --with-tune=cortex-a8 --with-float=softfp --with-fpu=vfp * ld 2.20 * linux 2.6.35 $ gcc -v Using built-in specs. Target: arm-linux-gnueabi Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.1-4ubuntu9' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv6 --with-tune=cortex-a8 --with-float=softfp --with-fpu=vfp --disable-werror --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi Thread model: posix gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9) $ ld -v GNU ld (GNU Binutils for Ubuntu) 2.20 $ uname -a Linux arm2 2.6.35.11-00003-g1168dc4-dirty #29 SMP Thu May 5 18:20:22 CST 2011 armv6l GNU/Linux ====== 交叉編譯 ====== TRIPLE="arm-unknown-linux-gnueabi" PREFIX="arm-unknown-linux-gnueabi-armv6l-gcc441" XTOOL="${HOME}/x-tools/${PREFIX}/bin" LLVM_SRC="$HOME/test/llvm-2.9" export PATH=${XTOOL}:$PATH ${LLVM_SRC}/configure --target=${TRIPLE} \ --host=${TRIPLE} \ --enable-target=arm \ --disable-optimized --enable-bindings=none --disable-multilib --disable-bootstrap \ # export 才能生效 $ . ./build.sh $ make; make check 2>&1 > log ====== 本地編譯 ====== 確定 PATH 不包含交叉工具鏈、LLVM 和 LLVM-GCC 所在路徑! TRIPLE="arm-unkown-linux-gnueabi" LLVM_SRC="$HOME/test/llvm-2.8" INSTALL="${HOME}/install/arm2" # 加上 --build 選項是避免 LLVM 對 triple 判斷錯誤 # CC=${INSTALL}/bin/clang CXX=${INSTALL}/bin/clang++ 須加在 configure 那一行以實現自舉 # gcc -v -x c++ /dev/null -fsyntax-only ${LLVM_SRC}/configure --build=${TRIPLE} \ --prefix=${INSTALL} \ --enable-target=arm \ --disable-optimized --enable-bindings=none --disable-multilib --disable-bootstrap \ ====== 其它 ====== Android Renderscript 有針對舊的 LLVM ARM JIT 做 patch。