16.02.2012 04:38, Radek Madej wrote:

> 2) As suggested, disabling JIT will do the trick and it seems like recent 
> versions of Firefox can actually have it disabled properly. So the ebuild for 
> icecat/firefox will work for you, you just need this in src_configure() : 
> 
>       if use pax_kernel; then
>                       mozconfig_annotate '' --disable-methodjit
>                       mozconfig_annotate '' --disable-tracejit
>       fi

Here's the hack I use not to modify the ebuilds:

# cat /etc/portage/bashrc
LC_ALL="C"

if [ X"$EBUILD_PHASE" != "X" ]; then
  if [ -f "/etc/portage/bashrc.d/${CATEGORY}/${PF}" ]; then
    source "/etc/portage/bashrc.d/${CATEGORY}/${PF}"
  elif [ -f "/etc/portage/bashrc.d/${CATEGORY}/${P}" ]; then
    source "/etc/portage/bashrc.d/${CATEGORY}/${P}"
  elif [ -f "/etc/portage/bashrc.d/${CATEGORY}/${PN}" ]; then
    source "/etc/portage/bashrc.d/${CATEGORY}/${PN}"
  fi

  if [ -f "/etc/portage/bashrc.d/${CATEGORY}/${PF}.${EBUILD_PHASE}" ]; then
    source "/etc/portage/bashrc.d/${CATEGORY}/${PF}.${EBUILD_PHASE}"
  elif [ -f "/etc/portage/bashrc.d/${CATEGORY}/${P}.${EBUILD_PHASE}" ]; then
    source "/etc/portage/bashrc.d/${CATEGORY}/${P}.${EBUILD_PHASE}"
  elif [ -f "/etc/portage/bashrc.d/${CATEGORY}/${PN}.${EBUILD_PHASE}" ]; then
    source "/etc/portage/bashrc.d/${CATEGORY}/${PN}.${EBUILD_PHASE}"
  fi
fi

# cat /etc/portage/bashrc.d/www-client/firefox.compile
disable_unsafe_options() {
  [ -f "$S"/.mozconfig ] || die
  sed -i 's/ac_add_options.*--enable-.*jit.*//' "$S"/.mozconfig
  sed -i 's/ac_add_options.*--enable-jemalloc.*//' "$S"/.mozconfig
  echo >> "$S"/.mozconfig
  local OPTIONS
  OPTIONS="$OPTIONS --disable-jemalloc"
  OPTIONS="$OPTIONS --disable-ctypes"
  OPTIONS="$OPTIONS --disable-tracejit"
  OPTIONS="$OPTIONS --disable-methodjit"
  OPTIONS="$OPTIONS --disable-jit"
  local O
  for O in $OPTIONS ; do
    echo "ac_add_options $O # fortify" >> "$S"/.mozconfig
  done
}

disable_unsafe_options

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to