Hi all: I have written a set of scripts to build many OpenRISC components from scratch, and I came across some issues with or1ksim. I read here that I need to build or1ksim before building the toolchain:
http://lists.openrisc.net/pipermail/openrisc/2011-August/000098.html and indeed argument --with-or1ksim=<path> is passed to GCC's configure script. However I searched for "or1ksim" under directory gcc-4.5.1 to no avail, so I wonder whether this flag is actually needed. The trouble is, if you build or1ksim before building the toolchain, then or1ksim's configure script cannot find the cross-compiler. The problem in this file: <or1ksim repository>/testsuite/test-code-or1k/configure.ac at this line: AC_CHECK_PROGS(CC, [$target_alias-gcc]) If the cross-compiler is not found, variable CC remains empty, but the configuration step will succeed and or1ksim will build without problems. However, later on, if you do a "make check" you'll get weird compilation errors, and it took me a while to figure out why. The work-around I'm using at the moment is to reconfigure or1ksim after building the toolchain, just before running "make check". Something needs to change in or1ksim's documentation or in the configure script. I think configuring or1ksim's test suite (or at least the test-code-or1k subset) should be a separate step that you have to trigger manually. At the moment, it's automatically triggered when configuring the rest of or1ksim. The above Makefile.am should fail with an explicit error message if it cannot find the cross-compiler. In another interesting twist, the above Makefile.am tries to find the right simulator: AC_CHECK_PROGS(SIM, [$target_alias-sim]) However, variable SIM does not seem to be used anywhere. The simulator filename is actually hard-coded in this file: <or1ksim repository>/testsuite/lib/or1ksim.exp proc run_or1ksim { testname match_list config_file progname } { ... set command_line "$objdir/../sim -f $config_full_file $prog_full_name" If the configuration script tries to find a simulator, the tests should use the one found, right? Regards, R. Diez _______________________________________________ OpenRISC mailing list [email protected] http://lists.openrisc.net/listinfo/openrisc
