2010-02-08 49 views
0

所以,我試圖安裝gcc的SimpleScalar的3.0和我一直運行陷入困境,當我在這個維基(Link對GCC的SimpleScalar的9.04

執行命令 make install LANGUAGES="c c++" CFLAGS="-O3" CC="gcc"按照說明書

我已經包含了命令的全部輸出,因爲它在第一個滾動框中運行,並且在第二個滾動框中顯示錯誤消息。一位消息來源表示,我重新安裝了binutils,但似乎並沒有幫助解決這個問題。我還確保我已經彎曲,並安裝了野牛。我甚至嘗試移除flex並安裝flex-old,但這似乎沒有幫助。任何人都可以提出解決我的問題?

gcc -DCROSS_COMPILE -DIN_GCC -g -O3  -I. -I. -I./config \ 
     -DGCC_INCLUDE_DIR=\"/home/rohanbk/ece668/lib/gcc-lib/sslittle-na-sstrix/2.7.2.3/include\" \ 
     -DGPLUSPLUS_INCLUDE_DIR=\"/home/rohanbk/ece668/include/g++\" \ 
     -DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \ 
     -DCROSS_INCLUDE_DIR=\"/home/rohanbk/ece668/lib/gcc-lib/sslittle-na-sstrix/2.7.2.3/sys-include\" \ 
     -DTOOL_INCLUDE_DIR=\"/home/rohanbk/ece668/sslittle-na-sstrix/include\" \ 
     -c `echo ./cccp.c | sed 's,^\./,,'` 
cccp.c: In function ‘macroexpand’: 
cccp.c:8107: warning: format not a string literal and no format arguments 
gcc -DCROSS_COMPILE -DIN_GCC -g -O3 -o cccp cccp.o cexp.o \ 
     version.o obstack.o ` case "gcc" in "cc") echo "" ;; esac ` 
rm -f cpp 
ln cccp cpp > /dev/null 2>&1 \ 
    || cp cccp cpp 
/bin/sh ./genmultilib "" \ 
     "" "" > multilib.h 
gcc -DCROSS_COMPILE -DIN_GCC -g -O3  -I. -I. -I./config \ 
    -DSTANDARD_STARTFILE_PREFIX=\"/home/rohanbk/ece668/lib/\" \ 
    -DSTANDARD_EXEC_PREFIX=\"/home/rohanbk/ece668/lib/gcc-lib/\" \ 
    -DDEFAULT_TARGET_VERSION=\"2.7.2.3\" \ 
    -DDEFAULT_TARGET_MACHINE=\"sslittle-na-sstrix\" \ 
    -DTOOLDIR_BASE_PREFIX=\"/home/rohanbk/ece668/\" \ 
    \ 
    -c `echo ./gcc.c | sed 's,^\./,,'` 
gcc.c: In function ‘translate_options’: 
gcc.c:880: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:916: warning: incompatible implicit declaration of built-in function ‘index’ 
gcc.c:925: warning: incompatible implicit declaration of built-in function ‘index’ 
gcc.c: In function ‘read_specs’: 
gcc.c:1140: warning: incompatible implicit declaration of built-in function ‘bzero’ 
gcc.c: In function ‘set_spec’: 
gcc.c:1215: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:1225: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c: In function ‘record_temp_file’: 
gcc.c:1464: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:1465: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c: In function ‘choose_temp_base’: 
gcc.c:1586: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:1589: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c:1598: warning: incompatible implicit declaration of built-in function ‘abort’ 
gcc.c: In function ‘putenv’: 
gcc.c:1623: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:1631: warning: incompatible implicit declaration of built-in function ‘abort’ 
gcc.c:1648: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c: In function ‘build_search_list’: 
gcc.c:1669: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:1675: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c:1689: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c:1690: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c:1702: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c:1703: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c:1713: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c: In function ‘find_a_file’: 
gcc.c:1743: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:1756: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c:1769: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c:1770: warning: incompatible implicit declaration of built-in function ‘strcat’ 
gcc.c:1782: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c:1783: warning: incompatible implicit declaration of built-in function ‘strcat’ 
gcc.c:1801: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c:1802: warning: incompatible implicit declaration of built-in function ‘strcat’ 
gcc.c:1813: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c:1814: warning: incompatible implicit declaration of built-in function ‘strcat’ 
gcc.c:1832: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c:1833: warning: incompatible implicit declaration of built-in function ‘strcat’ 
gcc.c:1843: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c:1844: warning: incompatible implicit declaration of built-in function ‘strcat’ 
gcc.c: In function ‘add_prefix’: 
gcc.c:1891: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c: In function ‘pexecute’: 
gcc.c:2098: warning: incompatible implicit declaration of built-in function ‘exit’ 
gcc.c: In function ‘execute’: 
gcc.c:2172: warning: incompatible implicit declaration of built-in function ‘alloca’ 
gcc.c:2272: warning: incompatible implicit declaration of built-in function ‘abort’ 
gcc.c: In function ‘process_command’: 
gcc.c:2357: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:2382: warning: incompatible implicit declaration of built-in function ‘alloca’ 
gcc.c:2389: warning: incompatible implicit declaration of built-in function ‘strncpy’ 
gcc.c:2391: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c:2413: warning: incompatible implicit declaration of built-in function ‘alloca’ 
gcc.c:2420: warning: incompatible implicit declaration of built-in function ‘strncpy’ 
gcc.c:2422: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c:2445: warning: incompatible implicit declaration of built-in function ‘alloca’ 
gcc.c:2452: warning: incompatible implicit declaration of built-in function ‘strncpy’ 
gcc.c:2454: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c:2499: warning: incompatible implicit declaration of built-in function ‘exit’ 
gcc.c:2504: warning: incompatible implicit declaration of built-in function ‘exit’ 
gcc.c:2509: warning: incompatible implicit declaration of built-in function ‘exit’ 
gcc.c:2652: warning: incompatible implicit declaration of built-in function ‘strncpy’ 
gcc.c:2653: warning: incompatible implicit declaration of built-in function ‘strcat’ 
gcc.c:2888: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c: In function ‘do_spec_1’: 
gcc.c:3133: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c:3167: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:3172: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c:3173: warning: incompatible implicit declaration of built-in function ‘strcat’ 
gcc.c:3211: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:3214: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c:3233: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:3236: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c:3258: warning: incompatible implicit declaration of built-in function ‘alloca’ 
gcc.c:3259: warning: incompatible implicit declaration of built-in function ‘strncpy’ 
gcc.c:3271: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c:3315: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c:3323: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:3323: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c:3332: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c:3366: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:3366: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c:3383: warning: incompatible implicit declaration of built-in function ‘abort’ 
gcc.c:3402: warning: incompatible implicit declaration of built-in function ‘abort’ 
gcc.c:3524: warning: incompatible implicit declaration of built-in function ‘alloca’ 
gcc.c:3524: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:3554: warning: incompatible implicit declaration of built-in function ‘alloca’ 
gcc.c:3554: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:3727: warning: incompatible implicit declaration of built-in function ‘alloca’ 
gcc.c:3727: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:3794: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c:3805: warning: incompatible implicit declaration of built-in function ‘abort’ 
gcc.c: In function ‘handle_braces’: 
gcc.c:3850: warning: incompatible implicit declaration of built-in function ‘abort’ 
gcc.c:3869: warning: incompatible implicit declaration of built-in function ‘abort’ 
gcc.c:3879: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:3883: warning: incompatible implicit declaration of built-in function ‘abort’ 
gcc.c: In function ‘find_file’: 
gcc.c:4123: warning: incompatible implicit declaration of built-in function ‘alloca’ 
gcc.c:4123: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:4124: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c:4125: warning: incompatible implicit declaration of built-in function ‘strcat’ 
gcc.c: In function ‘is_directory’: 
gcc.c:4151: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:4153: warning: incompatible implicit declaration of built-in function ‘alloca’ 
gcc.c:4165: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c: In function ‘main’: 
gcc.c:4214: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:4240: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c:4241: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c:4263: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c:4280: warning: incompatible implicit declaration of built-in function ‘alloca’ 
gcc.c:4282: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c:4283: warning: incompatible implicit declaration of built-in function ‘strcat’ 
gcc.c:4382: warning: incompatible implicit declaration of built-in function ‘exit’ 
gcc.c:4388: warning: incompatible implicit declaration of built-in function ‘exit’ 
gcc.c:4395: warning: incompatible implicit declaration of built-in function ‘exit’ 
gcc.c:4401: warning: incompatible implicit declaration of built-in function ‘exit’ 
gcc.c:4410: warning: incompatible implicit declaration of built-in function ‘exit’ 
gcc.c:4422: warning: incompatible implicit declaration of built-in function ‘exit’ 
gcc.c:4432: warning: incompatible implicit declaration of built-in function ‘bzero’ 
gcc.c:4587: warning: incompatible implicit declaration of built-in function ‘exit’ 
gcc.c: In function ‘lookup_compiler’: 
gcc.c:4625: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:4648: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c: In function ‘xmalloc’: 
gcc.c:4664: warning: incompatible implicit declaration of built-in function ‘malloc’ 
gcc.c: In function ‘xrealloc’: 
gcc.c:4675: warning: incompatible implicit declaration of built-in function ‘realloc’ 
gcc.c: In function ‘concat’: 
gcc.c:4687: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c:4691: warning: incompatible implicit declaration of built-in function ‘strcpy’ 
gcc.c: In function ‘save_string’: 
gcc.c:4726: warning: incompatible implicit declaration of built-in function ‘bcopy’ 
gcc.c: In function ‘fatal’: 
gcc.c:4803: warning: incompatible implicit declaration of built-in function ‘exit’ 
gcc.c: In function ‘used_arg’: 
gcc.c:5007: warning: incompatible implicit declaration of built-in function ‘strlen’ 
gcc.c: In function ‘set_multilib_dir’: 
gcc.c:5068: warning: incompatible implicit declaration of built-in function ‘abort’ 
gcc.c:5079: warning: incompatible implicit declaration of built-in function ‘abort’ 
gcc.c:5127: warning: incompatible implicit declaration of built-in function ‘strncpy’ 
gcc.c: In function ‘print_multilib_info’: 
gcc.c:5168: warning: incompatible implicit declaration of built-in function ‘abort’ 
gcc.c:5192: warning: incompatible implicit declaration of built-in function ‘abort’ 
gcc.c:5233: warning: incompatible implicit declaration of built-in function ‘abort’ 
gcc -DCROSS_COMPILE -DIN_GCC -g -O3 -o xgcc gcc.o version.o obstack.o ` case "gcc" in "cc") echo "" ;; esac ` 
gcc.o: In function `perror_with_name': 
/home/rohanbk/ece668/gcc-2.7.2.3/gcc.c:4750: warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead 
gcc.o: In function `choose_temp_base': 
/home/rohanbk/ece668/gcc-2.7.2.3/gcc.c:1595: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp' 
cp xgcc gcc-cross 
./xgcc -B./ -dumpspecs > tmp-specs 
mv tmp-specs specs 
echo "__foo() {}" > dummy.c 
./xgcc -B./ -DCROSS_COMPILE -DIN_GCC -g -O3 -I./include -c dummy.c 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar rc libgcc1.null dummy.o 
*** buffer overflow detected ***: /home/rohanbk/ece668/sslittle-na-sstrix/bin/ar terminated 
======= Backtrace: ========= 
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0x40131da8] 
/lib/tls/i686/cmov/libc.so.6[0x4012feb0] 
/lib/tls/i686/cmov/libc.so.6[0x4012f5a8] 
/lib/tls/i686/cmov/libc.so.6(_IO_default_xsputn+0xc8)[0x400a1bb8] 
/lib/tls/i686/cmov/libc.so.6(_IO_padn+0xed)[0x40094ded] 
/lib/tls/i686/cmov/libc.so.6(_IO_vfprintf+0x27bf)[0x40075fef] 
/lib/tls/i686/cmov/libc.so.6(__vsprintf_chk+0xa4)[0x4012f654] 
/lib/tls/i686/cmov/libc.so.6(__sprintf_chk+0x2d)[0x4012f59d] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x8061b42] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x804e836] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x8050f8a] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x805339f] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x804bc2b] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x804c36a] 
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0x4004a775] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x8049481] 
======= Memory map: ======== 
08048000-08076000 r-xp 00000000 08:06 359681  /home/rohanbk/ece668/sslittle-na-sstrix/bin/ar 
08076000-08077000 r-xp 0002d000 08:06 359681  /home/rohanbk/ece668/sslittle-na-sstrix/bin/ar 
08077000-08078000 rwxp 0002e000 08:06 359681  /home/rohanbk/ece668/sslittle-na-sstrix/bin/ar 
08da0000-08dc1000 rwxp 08da0000 00:00 0   [heap] 
40000000-4001c000 r-xp 00000000 08:06 275826  /lib/ld-2.9.so 
4001c000-4001d000 r-xp 0001b000 08:06 275826  /lib/ld-2.9.so 
4001d000-4001e000 rwxp 0001c000 08:06 275826  /lib/ld-2.9.so 
4001e000-4001f000 r-xp 4001e000 00:00 0   [vdso] 
4001f000-40021000 rwxp 4001f000 00:00 0 
40021000-40022000 r-xp 00000000 08:06 237234  /usr/lib/locale/en_IN/LC_MESSAGES/SYS_LC_MESSAGES 
40022000-40029000 r-xs 00000000 08:06 220846  /usr/lib/gconv/gconv-modules.cache 
40029000-4002c000 rwxp 40029000 00:00 0 
40034000-40190000 r-xp 00000000 08:06 74006  /lib/tls/i686/cmov/libc-2.9.so 
40190000-40191000 ---p 0015c000 08:06 74006  /lib/tls/i686/cmov/libc-2.9.so 
40191000-40193000 r-xp 0015c000 08:06 74006  /lib/tls/i686/cmov/libc-2.9.so 
40193000-40194000 rwxp 0015e000 08:06 74006  /lib/tls/i686/cmov/libc-2.9.so 
40194000-40198000 rwxp 40194000 00:00 0 
401ab000-401b8000 r-xp 00000000 08:06 269345  /lib/libgcc_s.so.1 
401b8000-401b9000 r-xp 0000c000 08:06 269345  /lib/libgcc_s.so.1 
401b9000-401ba000 rwxp 0000d000 08:06 269345  /lib/libgcc_s.so.1 
bf9be000-bf9d3000 rw-p bffeb000 00:00 0   [stack] 
make: *** [libgcc1.null] Aborted 
make: *** Deleting file `libgcc1.null' 

======= Backtrace: ========= 
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0x40131da8] 
/lib/tls/i686/cmov/libc.so.6[0x4012feb0] 
/lib/tls/i686/cmov/libc.so.6[0x4012f5a8] 
/lib/tls/i686/cmov/libc.so.6(_IO_default_xsputn+0xc8)[0x400a1bb8] 
/lib/tls/i686/cmov/libc.so.6(_IO_padn+0xed)[0x40094ded] 
/lib/tls/i686/cmov/libc.so.6(_IO_vfprintf+0x27bf)[0x40075fef] 
/lib/tls/i686/cmov/libc.so.6(__vsprintf_chk+0xa4)[0x4012f654] 
/lib/tls/i686/cmov/libc.so.6(__sprintf_chk+0x2d)[0x4012f59d] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x8061b42] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x804e836] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x8050f8a] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x805339f] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x804bc2b] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x804c36a] 
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0x4004a775] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x8049481] 
======= Memory map: ======== 
08048000-08076000 r-xp 00000000 08:06 359681  /home/rohanbk/ece668/sslittle-na-sstrix/bin/ar 
08076000-08077000 r-xp 0002d000 08:06 359681  /home/rohanbk/ece668/sslittle-na-sstrix/bin/ar 
08077000-08078000 rwxp 0002e000 08:06 359681  /home/rohanbk/ece668/sslittle-na-sstrix/bin/ar 
08da0000-08dc1000 rwxp 08da0000 00:00 0   [heap] 
40000000-4001c000 r-xp 00000000 08:06 275826  /lib/ld-2.9.so 
4001c000-4001d000 r-xp 0001b000 08:06 275826  /lib/ld-2.9.so 
4001d000-4001e000 rwxp 0001c000 08:06 275826  /lib/ld-2.9.so 
4001e000-4001f000 r-xp 4001e000 00:00 0   [vdso] 
4001f000-40021000 rwxp 4001f000 00:00 0 
40021000-40022000 r-xp 00000000 08:06 237234  /usr/lib/locale/en_IN/LC_MESSAGES/SYS_LC_MESSAGES 
40022000-40029000 r-xs 00000000 08:06 220846  /usr/lib/gconv/gconv-modules.cache 
40029000-4002c000 rwxp 40029000 00:00 0 
40034000-40190000 r-xp 00000000 08:06 74006  /lib/tls/i686/cmov/libc-2.9.so 
40190000-40191000 ---p 0015c000 08:06 74006  /lib/tls/i686/cmov/libc-2.9.so 
40191000-40193000 r-xp 0015c000 08:06 74006  /lib/tls/i686/cmov/libc-2.9.so 
40193000-40194000 rwxp 0015e000 08:06 74006  /lib/tls/i686/cmov/libc-2.9.so 
40194000-40198000 rwxp 40194000 00:00 0 
401ab000-401b8000 r-xp 00000000 08:06 269345  /lib/libgcc_s.so.1 
401b8000-401b9000 r-xp 0000c000 08:06 269345  /lib/libgcc_s.so.1 
401b9000-401ba000 rwxp 0000d000 08:06 269345  /lib/libgcc_s.so.1 
bf9be000-bf9d3000 rw-p bffeb000 00:00 0   [stack] 
make: *** [libgcc1.null] Aborted 
make: *** Deleting file `libgcc1.null' 

這包括回溯和由此產生的錯誤消息。

======= Backtrace: ========= 
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0x40131da8] 
/lib/tls/i686/cmov/libc.so.6[0x4012feb0] 
/lib/tls/i686/cmov/libc.so.6[0x4012f5a8] 
/lib/tls/i686/cmov/libc.so.6(_IO_default_xsputn+0xc8)[0x400a1bb8] 
/lib/tls/i686/cmov/libc.so.6(_IO_padn+0xed)[0x40094ded] 
/lib/tls/i686/cmov/libc.so.6(_IO_vfprintf+0x27bf)[0x40075fef] 
/lib/tls/i686/cmov/libc.so.6(__vsprintf_chk+0xa4)[0x4012f654] 
/lib/tls/i686/cmov/libc.so.6(__sprintf_chk+0x2d)[0x4012f59d] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x8061b42] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x804e836] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x8050f8a] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x805339f] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x804bc2b] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x804c36a] 
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0x4004a775] 
/home/rohanbk/ece668/sslittle-na-sstrix/bin/ar[0x8049481] 
======= Memory map: ======== 
08048000-08076000 r-xp 00000000 08:06 359681  /home/rohanbk/ece668/sslittle-na-sstrix/bin/ar 
08076000-08077000 r-xp 0002d000 08:06 359681  /home/rohanbk/ece668/sslittle-na-sstrix/bin/ar 
08077000-08078000 rwxp 0002e000 08:06 359681  /home/rohanbk/ece668/sslittle-na-sstrix/bin/ar 
08da0000-08dc1000 rwxp 08da0000 00:00 0   [heap] 
40000000-4001c000 r-xp 00000000 08:06 275826  /lib/ld-2.9.so 
4001c000-4001d000 r-xp 0001b000 08:06 275826  /lib/ld-2.9.so 
4001d000-4001e000 rwxp 0001c000 08:06 275826  /lib/ld-2.9.so 
4001e000-4001f000 r-xp 4001e000 00:00 0   [vdso] 
4001f000-40021000 rwxp 4001f000 00:00 0 
40021000-40022000 r-xp 00000000 08:06 237234  /usr/lib/locale/en_IN/LC_MESSAGES/SYS_LC_MESSAGES 
40022000-40029000 r-xs 00000000 08:06 220846  /usr/lib/gconv/gconv-modules.cache 
40029000-4002c000 rwxp 40029000 00:00 0 
40034000-40190000 r-xp 00000000 08:06 74006  /lib/tls/i686/cmov/libc-2.9.so 
40190000-40191000 ---p 0015c000 08:06 74006  /lib/tls/i686/cmov/libc-2.9.so 
40191000-40193000 r-xp 0015c000 08:06 74006  /lib/tls/i686/cmov/libc-2.9.so 
40193000-40194000 rwxp 0015e000 08:06 74006  /lib/tls/i686/cmov/libc-2.9.so 
40194000-40198000 rwxp 40194000 00:00 0 
401ab000-401b8000 r-xp 00000000 08:06 269345  /lib/libgcc_s.so.1 
401b8000-401b9000 r-xp 0000c000 08:06 269345  /lib/libgcc_s.so.1 
401b9000-401ba000 rwxp 0000d000 08:06 269345  /lib/libgcc_s.so.1 
bf9be000-bf9d3000 rw-p bffeb000 00:00 0   [stack] 
make: *** [libgcc1.null] Aborted 
make: *** Deleting file `libgcc1.null' 

回答

1

最佳的方式來安裝SimpleScalar的

1) on Ubuntu (or whichever Linux you use) first do-- 

sudo apt-get update 

2) Getting required applications 

sudo apt-get install flex-old bison gedit 

3) Start extraction 

mkdir /tmp/simplescalar 
cd /tmp/simplescalar/ 
wget http://csrl.unt.edu/downloads/simplescalar.tgz 
tar xvfz simplescalar.tgz 

4) 
sudo apt-get install g++-3.4 gcc-3.4 
//Alternatively, you can install gcc 3.4 using synaptic package manager 
export CC="gcc-3.4"; 

5) setting up installation 
export HOST=i686-unknown-linux 
export TARGET=sslittle-na-sstrix 
export IDIR=/opt/simplescalar 

6) Simplescalar tools 
cd /tmp/simplescalar 
tar xvfz simpletools-2v0.tgz 
rm -rf gcc-2.6.3 
sudo mkdir -p /opt/simplescalar 
sudo mv f2c-1994.09.27/ glibc-1.09/ ssbig-na-sstrix/ sslittle-na-sstrix/ /opt/simplescalar/ 

7)Simplescalar utils 
cd /tmp/simplescalar 
tar xvfz simpleutils-990811.tar.gz 
cd /tmp/simplescalar/simpleutils-990811 
./configure --host=$HOST --target=$TARGET --with-gnu-as --with-gnu-ld --prefix=$IDIR 
make CC=gcc-3.4 
sudo make install CC=gcc-3.4 



8)Simplescalar!! 

cd /tmp/simplescalar 
tar xvfz simplesim-3v0d.tgz 
cd simplesim-3.0 
make config-pisa 
make CC=gcc-3.4 


>>You will get "My work is done here" :) 
cd /tmp/simplescalar 
sudo mv simplesim-3.0 
/opt/simplescalar 
9) Now the hard part 

cd /tmp/simplescalar/ 
tar xvfz gcc-2.7.2.3.ss.tar.gz 
cd /tmp/simplescalar/gcc-2.7.2.3 
export PATH=$PATH:$IDIR/sslittle-na-sstrix/bin 
./configure --host=$HOST --target=$TARGET --with-gnu-as --with-gnu-ld --prefix=$IDIR 
make LANGUAGES="c c++" CFLAGS=-O3 CC=gcc-3.3 
>>>>Error! Many errors about \ missing in insn-output.o 
gedit insn-output.c 

>>>> Edit file insn-output.c and add a \ (backslash) at the end of lines 675, 750, and 823. 
make LANGUAGES="c c++" CFLAGS=-O3 CC=gcc-3.4 
>> Error! about libgcc2.a 
gedit Makefile 


>>Edit file Makefile and add -I/usr/include to the end of line 130. 


make LANGUAGES="c c++" CFLAGS=-O3 CC=gcc-3.4 
sudo cp patched/sys/cdefs.h 
/opt/simplescalar/sslittle-na-sstrix/include/sys/ 

make enquire CC=gcc-3.4 
/opt/simplescalar/simplesim-3.0/sim-safe 
./enquire -f > float.h-cross 

sudo make install LANGUAGES="c c++" CFLAGS=-O3 CC=gcc-3.4 PATH=$PATH:/opt/simplescalar/bin 




10) Testing the installation!!! 
cd /tmp/simplescalar 
/opt/simplescalar/bin/sslittle-na-sstrix-gcc hello.c 
/opt/simplescalar/simplesim-3.0/sim-safe a.out 
2

構建simpleutils與-D_FORTIFY_SOURCE=1。這修復了ar的sprintf()緩衝區溢出問題。

Ubuntu> = 8.10的默認值爲-D_FORTIFY_SOURCE= 2,它打破了幾個舊的C程序。