2010年2月10日 星期三

Chrome for CentOS 5.4

http://www.cs.bham.ac.uk/~cxs548/chrome




wget http://www.cs.bham.ac.uk/~cxs548/chrome.tar.gz

tar -zxf chrome.tar.gz

cd chrome

./chrome-wrapper

2009年12月5日 星期六

Apache 403 Forbidden in CentOS

今天弄了一個下午Apache怎樣就是不捧場...

各使用者下的www不管怎麼設403 就是 403

以前在Fedora上有經驗知道要關SELinux

httpd.conf也不是第一次設定

所以應該沒有問題才對!!

www資料夾的權限也有設定

到了最後才發現大概是CentOS預設安全性比較高

home資料夾的權限只有700

只要改成755就可以動了...

(應該說至少要有給其使用者讀的權限就可以動了

感動的快哭了...

Make under multicore

現在隨便買都是Multicore CPU

但是常常在build程式的時候還是一樣慢

事實上GNU Make提供並行建構有段時間了

而且使用方式很簡單

只要在Make後面加-j n, n為最大任務數(# Thread)

ex:
make -j 8

n要多大多小視CPU核心而定

個人習慣上n設為 2*#core

i7上就設

make -j 16

不過這不是加速編譯的萬靈藥

在編譯初次build GCC的時候用了絕對會錯誤...

事實上原因在於舊有的許多Makefile在相依性上並沒有設計的很好所造成

但是在之後(修改部分檔案)重新建置時就很管用

尤其是GCC改md的部份動一個就幾乎要重編譯的情況下很管用



另外如果make -j n的過程如果錯誤的話再打一次試試看

真的不行的話就make clean all認命的慢慢的build吧...

2009年8月29日 星期六

gcc note for modify number of register

in machine.h

FIRST_PSEUDO_REGISTER

FIXED_REGISTERS

CALL_USED_REGISTERS

REG_ALLOC_ORDER

REG_CLASS_NAMES



for arm

arm.c
arm_compute_save_reg0_reg12_mask


arm.h
*_REG_OK_FOR_*

THUMB
HI_REG

arm_dbx_register_number

struct machine_function
rtx call_via[14]; <---

2009年8月25日 星期二

ARM Output template note : Condition code

%?
condition code, output by arm_print_condition

%.

/* The current condition code for a condition code setting instruction.
Preceded by 's' in unified syntax, otherwise followed by 's'. */
if (TARGET_UNIFIED_ASM)
{
fputc('s', stream);
arm_print_condition (stream);
}
else
{
arm_print_condition (stream);
fputc('s', stream);
}

%!
/* If the instruction is conditionally executed then print
the current condition code, otherwise print 's'. */
gcc_assert (TARGET_THUMB2 && TARGET_UNIFIED_ASM);
if (current_insn_predicate)
arm_print_condition (stream);
else
fputc('s', stream);

complete information in (arm.c : Line13341 : arm_print_operand : , gcc 4.4.0)