mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

110 lines
3.4 KiB

# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/base/gcc3/parse-config
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
# Use the GCC-[23] stack protector patch
#
if [ $pkg != glibc23 -a $pkg != glibc22 -a \
$pkg != grub -a $pkg != dietlibc ]
then
if [ "$ROCKCFG_PKG_GCC2_STACKPRO" = 1 ] ; then
var_append GCC2_WRAPPER_INSERT " " "-fstack-protector"
fi
if [ "$ROCKCFG_DEFAULT_CC" = "gcc3" -a "$ROCKCFG_PKG_GCC3_STACKPRO" = 1 ] ; then
var_append GCC3_WRAPPER_INSERT " " "-fstack-protector"
fi
if [ "$ROCKCFG_DEFAULT_CC" = "gcc33" -a "$ROCKCFG_PKG_GCC33_STACKPRO" = 1 ] ; then
var_append GCC3_WRAPPER_INSERT " " "-fstack-protector"
fi
fi
# maybe we add something more later. But imo it's better to
# let the options of KCC unmodified for gcc[23]. (Clifford)
#
if [[ $ROCKCFG_DEFAULT_KCC = gcc* ]] ; then
export KCC="${archprefix}kcc-${ROCKCFG_DEFAULT_KCC#gcc}"
if [ "$ROCKCFG_OPTSIZE" = 1 ] ; then
var_insert KCC_WRAPPER_REMOVE " " "-O -O[0-9]"
var_insert KCC_WRAPPER_INSERT " " "-Os"
fi
fi
# set CC, CXX and F77 environment variables
#
for x in CC CXX F77 ; do
eval "y=\$ROCKCFG_DEFAULT_$x"
if [[ $y = gcc* ]] ; then
case "$x-$stagelevel" in
CC-*)
z="${archprefix}gcc ${archprefix}gcc-${y#gcc}" ;;
CXX-[2-9])
z="${archprefix}g++ ${archprefix}g++-${y#gcc}" ;;
F77-[2-9])
z="${archprefix}g77 ${archprefix}g77-${y#gcc}" ;;
*)
export $x=${x}_not_available_in_stage_${stagelevel}
continue ;;
esac
for y in $z ; do
[ "`type -p $y`" ] && export $x=$y
done
fi
done
# Add the usual gcc optimazation options
# Strip or add debug information
#
if [ "$ROCKCFG_OPT" = 1 ] ; then
var_append GCC_WRAPPER_APPEND " " "-s"
var_insert GCC_WRAPPER_REMOVE " " "-g*"
var_insert GCC_WRAPPER_REMOVE " " "-O -O[0-9s] -m*"
if [ "$ROCKCFG_OPTSIZE" = 1 ] ; then
var_insert GCC_WRAPPER_INSERT " " "-Os -pipe"
else
var_insert GCC_WRAPPER_INSERT " " "-O2 -pipe"
fi
else
if [[ $pkg != glibc* ]] ; then
var_append GCC_WRAPPER_APPEND " " "-ggdb"
var_insert GCC_WRAPPER_REMOVE " " "-s -g*"
fi
fi
# Compile with no exceptions or rtti, gcc itself must support both
#
if [ "$ROCKCFG_LIMITCXX" = 1 ] && [[ $pkg != gcc* ]] ; then
var_append CXX_WRAPPER_APPEND " " "-fno-exceptions -fno-rtti"
fi
# Passing -I/usr{/local/}include creates a warning in gcc3 which is confusing
# some of the configure scripts and Makefiles.
#
var_insert GCC3_WRAPPER_REMOVE " " "-I/usr/include"
var_insert GCC3_WRAPPER_REMOVE " " "-I/usr/local/include"
# Add the architecture gcc optimisation options
#
if [ -f architecture/$arch/gcc-options ] ; then
. architecture/$arch/gcc-options
fi