看板 FreeBSD 關於我們 聯絡資訊
※ 引述《seansnow (Sean)》之銘言: : 嗯嗯....你安裝的方式是怎麼樣呀? 嗯嗯...很謝謝指教 沒養成好習慣把問題說清楚 真是抱歉....>"< 問題出現在第一步驟 如下面的回覆 懇請回答 謝謝..^^ : 我之前有在BSD上面成功安裝過SimpleScalar(上課要用) : 而且我看官網上有支援FreeBSD的安裝(雖然沒寫6.1) : 下面我就把我之前安裝的方式列出來吧... : PS: 你應該po出你是在執行什麼步驟的時候出現這個問題的 : 還有,最好能夠去修改Makefile將出現錯誤那行的 : 2>/dev/null : 取消掉...這樣比較好照著除錯 : 下載需要的檔案 : 1) simplesim-3v0d.tgz : 2) simpleutils-990811.tar.gz : 3) simpletools-2v0.tgz : 4) gcc-2.7.2.3.ss.tar.gz : 位置在 : simplesim & simpletools: http://www.simplescalar.com/tools.html : simpleutils: http://www.eecs.umich.edu/mirv/ : gcc: http://arch.cs.ucdavis.edu/RAD/gcc-2.7.2.3.ss.tar.gz : 1. 設定變數 : # export HOST=i386-unknown-freebsd : # export IDIR=[your install directory] : 2. 安裝simpleutils : # cd $IDIR/simpleutils-990811 : # ./configure --host=$HOST --target=sslittle-na-sstrix --with-gnu-as \ : --with-gnu-ld --prefix=$IDIR : # make 每次要make都會出現錯誤 test x"no" != xyes || gcc -c -DHAVE_CONFIG_H -g -O2 -W -Wall -I. -I./../include strerror.c -o pic/strerror.o gcc -c -DHAVE_CONFIG_H -g -O2 -W -Wall -I. -I./../include strerror.c strerror.c:465: error: conflicting types for 'sys_nerr' /usr/include/stdio.h:343: error: previous declaration of 'sys_nerr' was here strerror.c:465: error: conflicting types for 'sys_nerr' /usr/include/stdio.h:343: error: previous declaration of 'sys_nerr' was here strerror.c: In function `strtoerrno': strerror.c:774: warning: implicit declaration of function `strcmp' *** Error code 1 Stop in /home/simulation/simpleutils-990811/libiberty. *** Error code 1 Stop in /home/simulation/simpleutils-990811. 不知該從何處理...~~" 希望能再給點提示 謝謝 : # make install : 3. 安裝simplesim : # cd $IDIR/simplesim-3.0 : # 修改syscall.c : 157c157,158 : < #include <termio.h> : --- : > //#include <termio.h> : > #include <termios.h> : 以及所有呼叫utimes()函數的修改 : 根據不同平台的utimes()函數的使用方法,將syscall.c內呼叫utimes()函數 : 時的判斷都取消掉剩下需要的... : 1864 : //#if defined(hpux) || defined(__hpux) || defined(linux) : // /* no utimes() in hpux, use utime() instead */ : // /*result*/regs->regs_R[2] = utime(buf, NULL); : //#elif defined(_MSC_VER) : // /* no utimes() in MSC, use utime() instead */ : // /*result*/regs->regs_R[2] = utime(buf, NULL); : //#elif defined(__svr4__) || defined(__USLC__) || defined(unix) || : defined(_AIX) || defined(__alpha) : // /*result*/regs->regs_R[2] = utimes(buf, NULL); : //#elif defined(__CYGWIN32__) : // warn("syscall: called utimes()\n"); : //#else : //#error No utimes() implementation! : //#endif : /*result*/regs->regs_R[2] = utimes(buf, NULL); : 1898 : //#if defined(hpux) || defined(__hpux) || defined(__svr4__) : // /* no utimes() in hpux, use utime() instead */ : // { : // struct utimbuf ubuf; : // : // ubuf.actime = tval[0].tv_sec; : // ubuf.modtime = tval[1].tv_sec; : // /* result */regs->regs_R[2] = utime(buf, &ubuf); : // } : //#elif defined(_MSC_VER) : // /* no utimes() in MSC, use utime() instead */ : // { : // struct _utimbuf ubuf; : // : // ubuf.actime = ss_tval[0].ss_tv_sec; : // ubuf.modtime = ss_tval[1].ss_tv_sec; : // : // /* result */regs->regs_R[2] = utime(buf, &ubuf); : // } : //#elif defined(__USLC__) || defined(unix) || defined(_AIX) || : defined(__alpha) : // /* result */regs->regs_R[2] = utimes(buf, tval); : //#elif defined(__CYGWIN32__) : // warn("syscall: called utimes()\n"); : //#else : //#error No utimes() implementation! : //#endif : /* result */regs->regs_R[2] = utimes(buf, tval); : 因為diff的內容太多所以就不列出來了 : 我附上我的syscall.c好了 : http://sean0920.twbbs.org/syscall.c : 修改好之後,繼續執行指令 : # make config-pisa (我的目標TARGET是pisa) : # make : 4. 安裝gcc : # cd $IDIR/gcc-2.7.2.3 : 修改insn-output.c : 將675、750和823行的return都合為一行 : 原本是分作很多行的。 : 修改 $IDIR/sslittle-na-sstrix/include/stdio.h : 將167行的 : extern __NORETURN void __libc_fatal __P ((__const char *__message)); : 改成 : extern void __libc_fatal __P ((__const char *__message)); : 修改好之後,繼續安裝 : # ./configure --host=$HOST --target=sslittle-na-sstrix \ : --with-gnu-as --with-gnu-ld --prefix=$IDIR : # make LANGUAGES="c c++" CFLAGS="-O3" CC="gcc" : # make install LANGUAGES="c c++" CFLAGS="-O3" CC="gcc" : 即可。 : 我安裝的環境是OpenBSD3.7 : 不過我想OpenBSD只會比FreeBSD難灌吧(哈)....給您參考一下囉 : 以上主要參考 : http://140.113.241.130/course/2006_spring_ca/lab/lab1.htm -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.140.81.203