{"id":353,"date":"2023-06-18T16:13:32","date_gmt":"2023-06-18T23:13:32","guid":{"rendered":"https:\/\/junsun.net\/wordpress\/?p=353"},"modified":"2023-06-18T16:13:32","modified_gmt":"2023-06-18T23:13:32","slug":"build-spec-tools-for-cpu2006-benchmark","status":"publish","type":"post","link":"https:\/\/junsun.net\/wordpress\/2023\/06\/build-spec-tools-for-cpu2006-benchmark\/","title":{"rendered":"Build Spec Tools for CPU2006 Benchmark"},"content":{"rendered":"\n<p><a href=\"https:\/\/www.spec.org\/cpu2006\/\">CPU2006<\/a> is an old obsolete benchmark.  But in modern days we may still need to build and run it.  The biggest problem is usually in building the tools needed by benchmark itself, called spec tools. <\/p>\n\n\n\n<p>Below are the steps I used to build spec tools for AArch64 (64bit ARM) and RISC-V 64 on Ubuntu OS (22.04 and 23.04).<\/p>\n\n\n\n<ul><li>Install Fortran compiler, <code>sudo apt install gfortran<\/code><\/li><li>Obtain CPU2006 install ISO image (need license)<\/li><li>Untar and install the source tree (install_archives\/cpu2006.tar.xz)<\/li><li>cd cpu2006\/tools\/src<\/li><li>obtain and update all the config.guess and config.sub files with the latest ones<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -O config.guess 'https:\/\/git.savannah.gnu.org\/gitweb\/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'\r\nwget -O config.sub 'https:\/\/git.savannah.gnu.org\/gitweb\/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD'\r\n<\/code><\/pre>\n\n\n\n<ul><li>Apply <a href=\"https:\/\/junsun.net\/wordpress\/wp-content\/uploads\/2023\/06\/cpu2006-build-tools.patch\">attached cpu2006-build-tools.patch<\/a><\/li><li>run .\/build-tools.sh<\/li><\/ul>\n\n\n\n<p>Once build is done, copy the attached config files below to under config\/ directory and run with them.  For example,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>runspec --config ubuntu_riscv64 --action=setup int fp\nrunspec --config ubuntu_aarch64 --noreportable --size=test --iterations=1 mcf gcc\nrunspec --config ubuntu_aarch64 --size=ref --iterations=1 int fp\n\r<\/code><\/pre>\n\n\n\n<p>Attached files:<\/p>\n\n\n\n<div class=\"wp-block-file\"><a href=\"https:\/\/junsun.net\/wordpress\/wp-content\/uploads\/2023\/06\/cpu2006-build-tools.patch\">cpu2006-build-tools.patch<\/a><a href=\"https:\/\/junsun.net\/wordpress\/wp-content\/uploads\/2023\/06\/cpu2006-build-tools.patch\" class=\"wp-block-file__button\" download>Download<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a href=\"https:\/\/junsun.net\/wordpress\/wp-content\/uploads\/2023\/06\/ubuntu_aarch64.cfg\">ubuntu_aarch64.cfg<\/a><a href=\"https:\/\/junsun.net\/wordpress\/wp-content\/uploads\/2023\/06\/ubuntu_aarch64.cfg\" class=\"wp-block-file__button\" download>Download<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a href=\"https:\/\/junsun.net\/wordpress\/wp-content\/uploads\/2023\/06\/ubuntu_riscv64.cfg\">ubuntu_riscv64.cfg<\/a><a href=\"https:\/\/junsun.net\/wordpress\/wp-content\/uploads\/2023\/06\/ubuntu_riscv64.cfg\" class=\"wp-block-file__button\" download>Download<\/a><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>CPU2006 is an old obsolete benchmark. But in modern days we may still need to build and run it. The biggest problem is usually in building the tools needed by benchmark itself, called spec tools. Below are the steps I used to build spec tools for AArch64 (64bit ARM) and RISC-V 64 on Ubuntu OS &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/junsun.net\/wordpress\/2023\/06\/build-spec-tools-for-cpu2006-benchmark\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Build Spec Tools for CPU2006 Benchmark&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[3],"tags":[7,80,81],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/posts\/353"}],"collection":[{"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/comments?post=353"}],"version-history":[{"count":3,"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/posts\/353\/revisions"}],"predecessor-version":[{"id":359,"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/posts\/353\/revisions\/359"}],"wp:attachment":[{"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/media?parent=353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/categories?post=353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/tags?post=353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}