openpkg/dot.bash_login

Tue, 29 Mar 2011 20:04:34 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 29 Mar 2011 20:04:34 +0200
changeset 334
4a34d7a82eab
child 428
f880f219c566
permissions
-rw-r--r--

Rework package yet again, correcting and introducing new buildconf logic:
Conditionally disable bootstrap stage comparison correctly, correct
english grammar, better find system as(1) and ld(1), indotruce detailed
optimization option messages, more completely guess cpu types, allow
profiled bootstrapping without a preinstalled GCC because many other
compilers have long since implemented 64-bit arithmetic, instruct make
to build sequentially (not in sparallel) when building a profiled
bootstrap as GCC online documents recommend, and generally improve
comment blocks.

The single most important correction in this changeset relates to the
GCC changed optimization policy since at least GCC 4.5, in which -march
is always passed and not always correctly guessed. In the case of this
package, allowing GCC to guess the architecture leads to wild build
errors at various subcomponents (zlib, libgcc, libiberty...) and
bootstrap stages. It seems quite platform specific, and the safest
approach to correcting this seems to be explicitly always specifying the
-march argument when bootstrapping GCC. Because the best choice 'native'
is not available when bootstrapping using a foreign (non GCC) compiler,
a guess is made according to rpmmacros l_platform in that case.

It is questionable as to whether these recent optimization changes
on the part of GCC or this package are compatible with each other,
or if either are complete or correct at all. At least applying these
corrections allows this package to build again in most cases test.

     1 ##
     2 ##  @l_prefix@/.bash_login -- Local Bash Login Script
     3 ##
     5 #   provide user and host information in default prompt
     6 PS1="\u@\h\$ "
     8 #   environment permissions
     9 umask 022
    10 ulimit -c 16384
    12 #   history functionality
    13 shopt -s histappend
    14 HISTSIZE=100
    15 HISTFILESIZE=100
    17 #   various additional variables
    18 export TMPDIR=/tmp
    19 export BLOCKSIZE=1024
    21 #   activate the bootstrapping Bourne-Shell
    22 #   environment of the OpenPKG hierarchy
    23 eval `@l_prefix@/bin/openpkg rc --eval openpkg env`
    25 #   make sure some non-standard but usually
    26 #   important executable directories are active
    27 test -d /usr/ccs/bin   && PATH="$PATH:/usr/ccs/bin"
    28 test -d /usr/local/bin && PATH="$PATH:/usr/local/bin"
    30 #   initially adjust $PWD to symbolic path
    31 cd $HOME
    33 #   path to bash environment init script
    34 BASH_ENV=$HOME/.bashrc
    36 #   source the standard environment script
    37 . $BASH_ENV

mercurial