ユーザ用ツール

サイト用ツール


mae_devel:host_setup_virtualbox:edit_config:start

設定ファイルの更新

VMが起動後、

  • Portageツリー同期先
  • コンパイル時最適化フラグ (CFLAGS)

などを環境にあわせて更新する必要があります。

Portageツリー同期先

ファイルは /etc/portage/make.conf になります。

viやnanoなどのエディタを用いて、下記部分を更新します。

# SYNC is the server used by rsync to retrieve a localized rsync mirror
#     rotation. This allows you to select servers that are geographically
#     close to you, yet still distribute the load over a number of servers.
#     Please do not single out specific rsync mirrors. Doing so places undue
#     stress on particular mirrors.  Instead you may use one of the following
#     continent specific rotations:
#
#   Default:       "rsync://rsync.gentoo.org/gentoo-portage"
#   North America: "rsync://rsync.namerica.gentoo.org/gentoo-portage"
#   South America: "rsync://rsync.samerica.gentoo.org/gentoo-portage"
#   Europe:        "rsync://rsync.europe.gentoo.org/gentoo-portage"
#   Asia:          "rsync://rsync.asia.gentoo.org/gentoo-portage"
#   Australia:     "rsync://rsync.au.gentoo.org/gentoo-portage"
#
#     If you have multiple Gentoo boxes, it is probably a good idea to have only
#     one of them sync from the rotations above. The other boxes can then rsync
#     from the local rsync server, reducing the load on the mirrors.
#     Instructions for setting up a local rsync server are available here:
#     http://www.gentoo.org/doc/en/rsync.xml
#
#SYNC="rsync://rsync.gentoo.org/gentoo-portage"
SYNC="rsync://192.168.253.5/gentoo-portage"

ローカルのネットワーク内に rsync server を立てていない場合、デフォルトの設定に戻します。

(#SYNC= の部分のコメントを外し、現在有効になっている 192.168.253.5 の部分を削除します)。

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

ビルドの並列ジョブ数変更

CPU数が 4 を想定した設定値にしてあるため、変更します。

VirtualBoxに割り当てた CPU数+1 にするのが一般的です。

# MAKEOPTS provides extra options that may be passed to 'make' when a
#     program is compiled. Presently the only use is for specifying
#     the number of parallel makes (-j) to perform. The suggested number
#     for parallel makes is CPUs+1.
MAKEOPTS="-j5"

CPU最適化フラグ変更

64bit対応のPentium4対応で設定してあります。 より新しいCPUを使用している場合、変更すると作成したバイナリがより高速に動作するようになる可能性があります。

#
# Decent examples:
#CFLAGS="-mcpu=athlon-xp -O2 -pipe"
#CFLAGS="-march=pentium3 -O2 -pipe"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"

GCCの最適化フラグは、下記ページが参考になります。

3.17.16 Intel 386 and AMD x86-64 Options

mae_devel/host_setup_virtualbox/edit_config/start.txt · 最終更新: 2013/08/30 13:09 by admin