[gentoo-user] [OT] Questions about building from source tarball

2012-10-30 Thread Walter Dnes
  Several years ago, back in the days of Mozilla 0.9x and Phoenix, I
used to build Mozilla and/or Pheonix from the source tarball.  I've been
using Gentoo for years, and I've forgotten a lot about building manually
from source.  I asked this question on mozillazine.org, but no answers
yet.  Hopefully, I can get some help here.  I'm looking at
https://developer.mozilla.org/en-US/docs/Simple_SeaMonkey_build and I
have a few questions...

1) What options do I need to set to make Seamonkey (or Firefox) build
in, and run from, a local dir, e.g. ${HOME}/seamonkey?  Something to
do with prefix and exec-prefix?  I'd prefer to avoid jumping to root
for the install.  And throwing in files in /usr that portage doesn't
know about, is begging for trouble.

2) I read the instructions on how to pass the O2 flag to the make and
compile process. What about the rest of the CFLAGS line?  My CFLAGS are

CFLAGS=-O2 -march=native -mfpmath=sse -fomit-frame-pointer -pipe 
-fno-unwind-tables -fno-asynchronous-unwind-tables

  For those who are wondering, I want to tweak it well beyond what the
Gentoo ebuild allows.  And I'll be doing some experimentation, so I
couldn't specify what I want right now.

-- 
Walter Dnes waltd...@waltdnes.org
I don't run desktop environments; I run useful applications



Re: [gentoo-user] [OT] Questions about building from source tarball

2012-10-30 Thread Michael Orlitzky
On 10/30/2012 04:56 AM, Walter Dnes wrote:
   Several years ago, back in the days of Mozilla 0.9x and Phoenix, I
 used to build Mozilla and/or Pheonix from the source tarball.  I've been
 using Gentoo for years, and I've forgotten a lot about building manually
 from source.  I asked this question on mozillazine.org, but no answers
 yet.  Hopefully, I can get some help here.  I'm looking at
 https://developer.mozilla.org/en-US/docs/Simple_SeaMonkey_build and I
 have a few questions...
 
 1) What options do I need to set to make Seamonkey (or Firefox) build
 in, and run from, a local dir, e.g. ${HOME}/seamonkey?  Something to
 do with prefix and exec-prefix?  I'd prefer to avoid jumping to root
 for the install.  And throwing in files in /usr that portage doesn't
 know about, is begging for trouble.
 

Most of the configuration directives reference the PREFIX by default.
This is from GNU tar, but FF is probably the same:

  Installation directories:
  --prefix=PREFIX ... [/usr/local]
  --exec-prefix=EPREFIX   ... [PREFIX]

  Fine tuning of the installation directories:
--bindir=DIR... [EPREFIX/bin]
--sbindir=DIR   ... [EPREFIX/sbin]
...

So by default, everything eventually references PREFIX, which defaults
to /usr/local. You can change PREFIX to be e.g. ~/local/ and the rest
should wind up in subdirectories of that. Just double check to make sure
all of the FF defaults refer back to PREFIX.


 2) I read the instructions on how to pass the O2 flag to the make and
 compile process. What about the rest of the CFLAGS line?  My CFLAGS are
 

I use this in my ~/.bashrc:

  # Grab CFLAGS, etc. from make.conf.
  . /etc/portage/make.conf

  # LDFLAGS comes from.. somewhere else.
  LDFLAGS=-Wl,-O1 -Wl,--as-needed

  # Portage does this for us.
  MAKE=make ${MAKEOPTS}

If anyone knows of a slicker way to do LDFLAGS, I'd like to know.