Browse Source

Stefan Fiedler:


			
			
				rocklinux
			
			
		
Stefan Fiedler 18 years ago
parent
commit
dc8231ff8d
15 changed files with 623 additions and 720 deletions
  1. +31
    -57
      package/base/gcc/config-300.in
  2. +153
    -416
      package/base/gcc/gcc.conf
  3. +1
    -1
      package/base/gcc/gcc.desc
  4. +0
    -50
      package/base/gcc/gcc42/auxbase.patch
  5. +0
    -12
      package/base/gcc/gcc42/fixincludes-hotfix.patch.cross
  6. +53
    -0
      package/base/gcc/gcc42/gcc-4.2.1-cross_search_paths-1.patch.cross
  7. +299
    -0
      package/base/gcc/gcc42/gcc-4.2.1-posix-1.patch
  8. +0
    -39
      package/base/gcc/gcc42/install_so.patch
  9. +0
    -36
      package/base/gcc/gcc42/no-install-libiberty.patch
  10. +0
    -30
      package/base/gcc/gcc42/no-install-zlib.patch
  11. +70
    -72
      package/base/gcc/parse-config
  12. +0
    -1
      package/base/gcc/pkgmapper.in
  13. +2
    -0
      package/base/gcc/postconfig.in
  14. +11
    -4
      package/base/gcc/preconfig.in
  15. +3
    -2
      package/base/gcc/wrappers.in

+ 31
- 57
package/base/gcc/config-300.in

@ -27,63 +27,37 @@ if pkgcheck "gcc=.*" X ; then
ROCKCFG_PKG_GCC_STACKPRO 0
include "package/*/*/subconfig-gcc.in"
if pkgcheck gcc=gcc2 X; then
for gcc_version in 2 32 33 34 40 41 42 ; do
if eval pkgcheck gcc=gcc${gcc_version} X; then
comment ' '
comment '--- GCC 2.x options'
bool 'Do not build CHILL compiler' \
ROCKCFG_PKG_GCC2_NO_CHILL 1
include "package/*/*/subconfig-gcc2.in"
fi
if pkgcheck gcc=gcc32 X; then
comment ' '
comment '--- GCC 3.2.x options'
bool 'Do not build JAVA compiler' \
ROCKCFG_PKG_GCC32_NO_JAVA 1
include "package/*/*/subconfig-gcc32.in"
fi
if pkgcheck gcc=gcc33 X; then
comment ' '
comment '--- GCC 3.3.x options'
bool 'Do not build JAVA compiler' \
ROCKCFG_PKG_GCC33_NO_JAVA 1
include "package/*/*/subconfig-gcc33.in"
fi
if pkgcheck gcc=gcc34 X; then
comment ' '
comment '--- GCC 3.4.x options'
bool 'Do not build JAVA compiler' \
ROCKCFG_PKG_GCC34_NO_JAVA 1
bool 'Do profiled bootstrap' \
ROCKCFG_PKG_GCC34_PROFILED 1
include "package/*/*/subconfig-gcc34.in"
fi
if pkgcheck gcc=gcc40 X; then
comment ' '
comment '--- GCC 4.0.x options'
bool 'Do not build JAVA compiler' \
ROCKCFG_PKG_GCC40_NO_JAVA 1
bool 'Do profiled bootstrap' \
ROCKCFG_PKG_GCC40_PROFILED 1
include "package/*/*/subconfig-gcc40.in"
fi
if pkgcheck gcc=gcc41 X; then
comment ' '
comment '--- GCC 4.1.x options'
bool 'Do not build JAVA compiler' \
ROCKCFG_PKG_GCC41_NO_JAVA 1
bool 'Do profiled bootstrap' \
ROCKCFG_PKG_GCC41_PROFILED 1
include "package/*/*/subconfig-gcc41.in"
fi
if pkgcheck gcc=gcc42 X; then
comment ' '
comment '--- GCC 4.2.x options'
bool 'Do not build JAVA compiler' \
ROCKCFG_PKG_GCC42_NO_JAVA 1
bool 'Do profiled bootstrap' \
ROCKCFG_PKG_GCC42_PROFILED 1
include "package/*/*/subconfig-gcc42.in"
fi
comment "--- gcc${gcc_version} options"
if [[ $gcc_version -eq 2 ]] ; then
bool 'Build CHILL compiler' \
ROCKCFG_PKG_GCC${gcc_version}_CHILL 1
fi
if [[ $gcc_version -ge 32 ]] ; then
bool 'Build ADA compiler' \
ROCKCFG_PKG_GCC${gcc_version}_ADA 0
fi
bool 'Build C++ compiler' \
ROCKCFG_PKG_GCC${gcc_version}_CPP 1
bool 'Build Fortran compiler' \
ROCKCFG_PKG_GCC${gcc_version}_FORTRAN 1
bool 'Build JAVA compiler' \
ROCKCFG_PKG_GCC${gcc_version}_JAVA 0
bool 'Build Objective C compiler' \
ROCKCFG_PKG_GCC${gcc_version}_OBJC 1
if [[ $gcc_version -gt 40 ]] ; then
bool 'Build Objective C++ compiler' \
ROCKCFG_PKG_GCC${gcc_version}_OBJCPP 1
fi
include "package/*/*/subconfig-gcc{$pkg_gcc_version}.in"
if [[ $gcc_version -ge 34 ]] ; then
bool 'Do profiled bootstrap' \
ROCKCFG_PKG_GCC${gcc_version}_PROFILED 1
fi
fi
done
menu_end
fi

+ 153
- 416
package/base/gcc/gcc.conf

@ -31,9 +31,12 @@ case "$xpkg" in
pkg_gcc_version=${pkg_gcc_version%-cross-*}
pkg_gcc_target="${pkg_gcc_cross}-unknown-linux-gnu"
prefix=usr
set_confopt
var_append confopt " " "--target=$pkg_gcc_target"
echo_status "Preparing to build a cross-gcc package for $pkg_gcc_cross."
var_append INSTALL_WRAPPER_FILTER "|" 'sed -r "\,/share/(info|locale)/, d"'
var_append INSTALL_WRAPPER_FILTER "|" 'sed -r "\,(/share/(info|locale)|/usr/(man|info)), d"'
;;
gcc?|gcc??)
;;
@ -43,254 +46,157 @@ case "$xpkg" in
;;
esac
case "$pkg_gcc_version" in
34|4*)
gcc_lib_dir="gcc/${pkg_gcc_target}/${ver%%-*}"
;;
*)
gcc_lib_dir="gcc-lib/${pkg_gcc_target}/${ver%%-*}"
;;
esac
patchfiles="`ls $patchfiles $confdir/gcc$pkg_gcc_version/*.patch \
$confdir/gcc$pkg_gcc_version/*.patch.$arch 2>/dev/null | tr '\n' ' '`"
$confdir/gcc$pkg_gcc_version/*.patch.$arch 2>/dev/null | tr '\n' ' '`"
if [ $stagelevel -le 1 ]; then
patchfiles="`ls $patchfiles $confdir/gcc$pkg_gcc_version/*.patch.cross \
$confdir/gcc$pkg_gcc_version/*.patch.cross.$arch 2>/dev/null | tr '\n' ' '`"
patchfiles="`ls $patchfiles $confdir/gcc$pkg_gcc_version/*.patch.cross \
$confdir/gcc$pkg_gcc_version/*.patch.cross.$arch 2>/dev/null | tr '\n' ' '`"
fi
create_links() {
for x ; do
if [ -f "$root/$prefix/bin/$x-${pkg_gcc_version}" ] ; then
rm -vf $root/$prefix/bin/$x
ln -vs $x-${pkg_gcc_version} $root/$prefix/bin/$x
fi
x="${pkg_gcc_target}-$x"
if [ -f $root/$prefix/bin/$x-${pkg_gcc_version} ] ; then
rm -vf $root/$prefix/bin/$x
ln -vs $x-${pkg_gcc_version} $root/$prefix/bin/$x
fi
done
}
genrockspecs() {
# Hint for the reader:
# The options are listed in _inverse_ order here.
x="$base/build/$ROCKCFG_ID"
tr '\n' '@' < specs | sed \
-e "s|@\\*link:@|@*link:@-L $x/usr/$arch_target/lib |" \
-e "s|@\\*link:@|@*link:@-L $x/usr/local/lib |" \
-e "s|@\\*link:@|@*link:@-L $x/usr/lib |" \
-e "s|@\\*link:@|@*link:@-L $x/lib |" \
-e "s|@\\*link:@|@*link:@-L $x/ROCK/tools.cross/$arch_target/lib |" \
-e "s|@\\*link:@|@*link:@-rpath-link $x/lib:$x/usr/lib |" \
-e "s|@\\*cpp:@|@*cpp:@-I $x/usr/$arch_target/include |" \
-e "s|@\\*cpp:@|@*cpp:@-I $x/usr/local/include |" \
-e "s|@\\*cpp:@|@*cpp:@-I $x/usr/include |" \
| tr '@' '\n' > specs.cross
tr '\n' '@' < specs | sed \
-e "s|@\\*link_libgcc:@|@*link_libgcc:@-L /ROCK/tools.cross/$arch_target/lib |" \
-e "s|@\\*link_libgcc:@|@*link_libgcc:@-L /usr/$arch_target/lib |" \
-e "s|@\\*link_libgcc:@|@*link_libgcc:@-L /usr/local/lib |" \
-e "s|@\\*link_libgcc:@|@*link_libgcc:@-L /usr/lib |" \
-e "s|@\\*link_libgcc:@|@*link_libgcc:@-L /lib |" \
-e "s|@\\*link:@|@*link:@-rpath-link /lib:/usr/lib |" \
-e "s|@\\*cpp:@|@*cpp:@-I $x/usr/$arch_target/include |" \
-e "s|@\\*cpp:@|@*cpp:@-I $x/usr/local/include |" \
-e "s|@\\*cpp:@|@*cpp:@-I $x/usr/include |" \
| tr '@' '\n' > specs.chroot
}
hook_add preconf 2
custmain() {
hook_eval preconf
# In stage 1 we only build a normal c compiler (no c++, etc)
#
if [ $stagelevel -le 1 ] ; then
echo 'Setting LANGUAGES="c" in Makefile.in.'
sed -i -e 's/LANGUAGES="[^"]*"/LANGUAGES="c"/g' Makefile.in
elif [ "$ROCKCFG_DEBUG" = 1 ] ; then
if [ -f libstdc++*/configure ] ; then
echo "Setting DEBUG_FLAGS='-s' in libstdc++ configure."
sed -i -e "s/DEBUG_FLAGS='-g'/DEBUG_FLAGS='-s'/g" libstdc++*/configure
if [ "$pkg_gcc_cross" ] ; then
configprefix=""
confopt="--prefix=$root/$prefix \
--host=$arch_target --target=$pkg_gcc_target \
--disable-nls --disable-multilib"
# A gcc with shared libraries needs at least this file from glibc.
if [ ! -e $root/$prefix/$pkg_gcc_target/lib/crti.o ] ; then
echo_status "Building only static gcc because there is no cross-glibc (yet)."
var_append confopt " " "--disable-shared --enable-languages=c"
makeopt="all-gcc"
makeinstopt="install-gcc"
else
var_append confopt " " "--enable-shared --enable-languages=c,c++"
makeopt=""
makeinstopt="install"
fi
elif [ $stagelevel -eq 0 ] ; then
configprefix=""
confopt="--prefix=${CLFS}/$cross_tools \
--host=${CLFS_HOST} --target=${CLFS_TARGET} \
--with-sysroot=${CLFS} --disable-nls --disable-shared \
--enable-languages=c"
makeopt="all-gcc"
makeinstopt="install-gcc"
elif [ $stagelevel -eq 1 ] ; then
configprefix=""
confopt="--prefix=${CLFS}/$cross_tools \
--host=${CLFS_HOST} --target=${CLFS_TARGET} \
--with-sysroot=${CLFS} --disable-nls --enable-shared \
--enable-languages=c,c++ --enable-__cxa_atexit \
--enable-c99 --enable-long-long --enable-threads=posix"
makeopt=""
makeinstopt="install"
elif [ $stagelevel -ge 2 ] ; then
var_append extraconfopt " " " \
--enable-shared \
--enable-__cxa_atexit \
--enable-c99 --enable-long-long --enable-threads=posix \
--enable-clocale=gnu"
if [ $stagelevel -eq 2 ] ; then
var_append extraconfopt " " "--enable-languages=c,c++ \
--disable-libstdcxx-pch"
else
var_append confopt ' ' '--enable-languages=$languages'
x="ROCKCFG_PKG_GCC${pkg_gcc_version}_PROFILED"
if [ "${!x}" = 1 ] ; then
var_append makeopt ' ' "GCJFLAGS=\"\$CXXFLAGS\" \
profiledbootstrap"
fi
MAKE="$MAKE LIBGCC2_DEBUG_CFLAGS=-s LDFLAGS=-Wl,-s JCFLAGS=-s"
fi
# GCC rebuilds itself using the xgcc which is build first. xgcc
# should also use the cc-wrapper. It might be better to patch big
# amounts of the gcc sources - but this should also do the job.
#
export CFLAGS="$(exec -a echo bash \
-c ". gcc-${pkg_gcc_version}" 2> /dev/null)"
export CXXFLAGS="$(exec -a echo bash \
-c ". g++-${pkg_gcc_version}" 2> /dev/null)"
#
echo "Setting \$CFLAGS to '$CFLAGS'."
echo "Setting \$CXXFLAGS to '$CXXFLAGS'."
mkdir objdir ; cd objdir
# We install binaries, info-files and man-pages in temporary
# directories so we can rename it (adding version suffix) before
# We install binaries, info files and man pages in temporary
# directories so we can rename them (adding version suffix) before
# moving them to their final directories.
#
makeinstopt=""
var_append makeopt " " "prefix=/$prefix libdir=/$prefix/lib"
var_append makeinstopt " " "prefix=$root/$prefix"
for x in bin info man data ; do
mkdir -p $builddir/inst_$x
makeinstopt="$makeinstopt ${x}dir=$builddir/inst_$x"
var_append makeinstopt " " "${x}dir=$builddir/inst_$x"
done
# NAMING VARIANT!? INTRODUCED IN GCC-3.2.1
if [ $arch = powerpc ] ; then
ln -s ppc-nocross-linux-gnu powerpc-nocross-linux-gnu
fi
# add the multi-lib config
if [ "$ROCKCFG_MULTILIB" = 1 ] ; then
confopt="$confopt --enable-multilib"
else
confopt="$confopt --disable-multilib"
fi
# do not install gc headers
if [ "$xpkg" != "gcc2" ] ; then
sed -i 's, install-includeHEADERS,,;' ../boehm-gc/include/Makefile.in
fi
# In stage 1 everything is a little bit more complicated
#
if [ $stagelevel -le 1 ] ; then
# libstdc++ locales are not installed to the $datadir without this.
var_append INSTALL_WRAPPER_FILTER "|" "sed -e \
's,$root/$prefix/share\(/locale/.*/libstdc++.mo\),$builddir/inst_data\1,'"
create_config_cache > config.cache
eval $configprefix bash ../configure $confopt --enable-languages=c
# creating native libiberty for build system
# (needed to build helper apps like gengenrtl)
#
mkdir -p $arch_build ; cd $arch_build
CC=$BUILDCC bash ../../configure
make all-libiberty ; cd ..
MAKE="$MAKE LANGUAGES=c"
# GCC thinks it can share object files between build and
# target if the CPUs are compatible, which isn't true if we
# are cross-building from glibc to dietlibc. So we also build
# helper programs with dietlibc if this is not a cross build
# between cpu architectures.
#
if ! [ "$pkg_dietlibc_useit" = 1 -a "$ROCKCFG_CROSSBUILD" = 0 ]
then
MAKE="$MAKE CC_FOR_BUILD='$BUILDCC'"
fi
# Fixincludes doesn't run when cross-building, but we
# need a syslimits.h for a working gcc
#
mkdir -p gcc/include
echo '#include "/usr/include/limits.h"' > gcc/include/syslimits.h
var_append extraconfopt " " "--enable-version-specific-runtime-libs"
fi
hook_eval premake
if [ "$ROCKCFG_MULTILIB" = 0 ] ; then
var_append extraconfopt " " "--disable-multilib"
else
var_append extraconfopt " " "--enable-multilib"
fi
# Build and install
#
eval $MAKE prefix=/$prefix libdir=/$prefix/lib
hook_eval inmake
eval $MAKE prefix=$root/$prefix $makeinstopt install
custmain="custmain"
custmain () {
# Don't install libiberty, use the one from binutils instead.
cp libiberty/Makefile.in{,.orig}
sed 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in.orig > \
libiberty/Makefile.in
if [ "$ROCKCFG_CROSSBUILD" = 1 -a -d ../libstdc++-v3 ]; then
rm -rf *
var_append CXX_WRAPPER_REMOVE " " "-lstdc++"
eval $configprefix bash ../libstdc++-v3/configure $confopt
eval make prefix=/$prefix libdir=/$prefix/lib
eval make prefix=$root/$prefix $makeinstopt install
fi
if [ $stagelevel -eq 2 ] ; then
cp gcc/gccbug.in{,.orig}
sed 's/@have_mktemp_command@/yes/' gcc/gccbug.in.orig > gcc/gccbug.in
# This stuff needs manual installation
#
echo "Creating /$prefix/${pkg_gcc_target} ..."
mkdir -p $root/$prefix/${pkg_gcc_target}/lib
cd $root/$prefix/${pkg_gcc_target}/lib
for x in Mcrt1.o crti.o gcrt1.o crt1.o crtn.o
do ln -sf ../../lib/$x . ; done
if [ -f ../../../lib/ld-linux-$arch_machine.so.2 ] ; then
ln -sf ../../../lib/ld-linux-$arch_machine.so.2 .
elif [ -f ../../../lib/ld-linux.so.2 ] ; then
ln -sf ../../../lib/ld-linux.so.2 .
fi
else
cp gcc/Makefile.in{,.orig}
sed 's@\./fixinc\.sh@-c true@' gcc/Makefile.in.orig > gcc/Makefile.in
fi
if [ $xpkg = gcc2 -a "$ROCKCFG_PKG_GCC2_NO_CHILL" != 0 ] ; then
# gcc-2.x contains no 'java' compiler
confopt="$confopt --enable-languages=c,c++,objc,f77"
elif [ "$ROCKCFG_DIETLIBC_ALL" = 1 -o "$ROCKCFG_DIETLIBC_gcc3" = 1 ] ; then
# FIXME: c++ and java are not working with dietlibc
confopt="$confopt --enable-languages=c,objc"
elif [ $xpkg = gcc32 -a "$ROCKCFG_PKG_GCC32_NO_JAVA" != 0 ] || \
[ $xpkg = gcc33 -a "$ROCKCFG_PKG_GCC33_NO_JAVA" != 0 ] || \
[ $xpkg = gcc34 -a "$ROCKCFG_PKG_GCC34_NO_JAVA" != 0 ]; then
confopt="$confopt --enable-languages=c,c++,objc,f77"
elif [ $xpkg = gcc40 -a "$ROCKCFG_PKG_GCC40_NO_JAVA" != 0 ] || \
[ $xpkg = gcc41 -a "$ROCKCFG_PKG_GCC41_NO_JAVA" != 0 ]; then
confopt="$confopt --enable-languages=c,c++,objc,f95"
elif [ $xpkg = gcc42 -a "$ROCKCFG_PKG_GCC42_NO_JAVA" != 0 ]; then
confopt="$confopt --enable-languages=c,c++,objc,fortran"
elif [ "$arch" = mips ] ; then
# FIXME: MIPS doesn't like the Java compiler
confopt="$confopt --disable-libgcj"
languages="c"
while read lang ; do
x=""
case $lang in
c++) x="ROCKCFG_PKG_GCC${pkg_gcc_version}_CPP"
;;
esac
if [ $stagelevel -ge 3 ] ; then
case $lang in
ada) x="ROCKCFG_PKG_GCC${pkg_gcc_version}_ADA"
;;
f77|f95|fortran)
x="ROCKCFG_PKG_GCC${pkg_gcc_version}_FORTRAN"
;;
java) x="ROCKCFG_PKG_GCC${pkg_gcc_version}_JAVA"
;;
objc) x="ROCKCFG_PKG_GCC${pkg_gcc_version}_OBJC"
;;
obj-c++)
x="ROCKCFG_PKG_GCC${pkg_gcc_version}_OBJCPP"
;;
esac
fi
# See http://gcc.gnu.org/gcc-3.2/c++-abi.html
# and http://www.codesourcery.com/cxx-abi/.
if [ $xpkg != gcc2 ] ; then
confopt="$confopt --enable-__cxa_atexit"
if [ "${!x}" = 1 ] ; then
var_append languages "," "$lang"
fi
done <<< "$( sed -nr 's,^language="(.*)",\1,p' gcc/*/config-lang.in )"
# Set enable-shared
if [ "$diet_dynamic_static" == "static" ] ; then
confopt="$confopt --enable-shared=no"
else
confopt="$confopt --enable-shared=yes"
fi
mkdir -v ../objdir ; cd ../objdir
# Configure, build and install as usual
#
eval $configprefix bash ../configure $confopt --with-gnu-as \
--enable-version-specific-runtime-libs \
--with-gnu-ld --enable-threads=posix
eval echo $configprefix ../gcc-*/configure $confopt
eval $configprefix ../gcc-*/configure $confopt
hook_eval premake
if [ $xpkg = gcc34 -a "$ROCKCFG_PKG_GCC34_PROFILED" != 0 ]; then
eval "$MAKE GCJFLAGS=\"$CXXFLAGS\" profiledbootstrap"
elif [ $xpkg = gcc40 -a "$ROCKCFG_PKG_GCC40_PROFILED" != 0 ]; then
eval "$MAKE GCJFLAGS=\"$CXXFLAGS\" profiledbootstrap"
elif [ $xpkg = gcc41 -a "$ROCKCFG_PKG_GCC41_PROFILED" != 0 ]; then
eval "$MAKE GCJFLAGS=\"$CXXFLAGS\" profiledbootstrap"
elif [ $xpkg = gcc42 -a "$ROCKCFG_PKG_GCC42_PROFILED" != 0 ]; then
eval "$MAKE GCJFLAGS=\"$CXXFLAGS\" profiledbootstrap"
else
eval "$MAKE GCJFLAGS=\"$CXXFLAGS\" all"
fi
hook_eval inmake
eval "$MAKE $makeinstopt install"
eval make $makeopt
# Fix the location of any improperly installed (F77) libraries
mv -vf $root/$prefix/lib/$gcc_lib_dir/../lib* \
$root/$prefix/lib/$gcc_lib_dir || true
if [ $stagelevel -eq 4 ] ; then
make -k check || true
../gcc-*/contrib/test_summary
fi
hook_eval postmake
# GCC 4 does not install a specs file and removes old ones.
# Regenerate the file with -dumpspecs.
#
cd $builddir/inst_bin
if [ "${pkg_gcc_version:0:1}" -ge "4" ]; then
if [ "$ROCKCFG_CROSSBUILD" == 1 ]; then
$root/ROCK/tools.cross/crosscc/${pkg_gcc_target}-gcc -dumpspecs > \
$root/${prefix}/lib/${gcc_lib_dir}/specs
else
for x in gcc ${pkg_gcc_target}-gcc ; do
[ -f "${x}" ] && ./${x} -dumpspecs > \
$root/${prefix}/lib/${gcc_lib_dir}/specs
done
fi
fi
eval make $makeinstopt
if [ $stagelevel -ge 2 -a -z "$pkg_gcc_cross" ] ; then
# Rename and install binaries
#
cd $builddir/inst_bin ; mkdir -p $root/$prefix/bin
@ -302,12 +208,6 @@ custmain() {
done
done
# gcc2 does not contain an own c++filt ... - so use the binutils one
#
if [ "$xpkg" = gcc2 ] ; then
ln -vsf $root/$prefix/bin/c++filt-2 c++filt-binutils
fi
# Rename and install info-files
#
cd $builddir/inst_info ; mkdir -p $root/$prefix/info
@ -336,7 +236,18 @@ custmain() {
fi
true
done
cd $builddir/inst_man/man7
mkdir -p $root/$prefix/man/man7
for x in * ; do
[ ! -f $x ] && continue # e.g. if $x becomes '*' somehow
mv -v $x $root/$prefix/man/man7/${x%.1}-${pkg_gcc_version}.7
if [ $ROCKCFG_DEFAULT_CC = $xpkg ] ; then
ln -sf ${x%.1}-${pkg_gcc_version}.7 $root/$prefix/man/man7/$x
fi
true
done
# Rename and install locales
#
if [ -d "$builddir/inst_data/locale" ] ; then
@ -355,8 +266,6 @@ custmain() {
true
done
fi
hook_eval postdoc
# Create various symlinks for cc, c++, cpp and f77.
#
@ -395,198 +304,26 @@ custmain() {
create_links gfortran
fi
# Inject our default optimisation options so when the user calls
# gcc/g++ they match the ones used to precompile the headers ...
# Save the options affecting optimization only.
#
if [ $ROCKCFG_DEFAULT_CC = $xpkg ]; then
echo "Creating /etc/profile.d/gcc ..."
{
echo "export CFLAGS_SIZE=\"$(echo $(
eval echo \$GCC_WRAPPER_INSERT \$GCC_WRAPPER_APPEND \
\$GCC${ver:0:1}_WRAPPER_INSERT \$GCC${ver:0:1}_WRAPPER_APPEND | \
tr ' ' '\n' | sed -e 's/^-SIZE-/-/' -e '/^-O/ { p; d; }' -e '/^-mcpu=/ { p; d; }' \
-e '/-march=/ { p; d; }' -e '/-mtune=/ { p; d; }' -e 'd'
))\""
echo "export CFLAGS_SPEED=\"$(echo $(
eval echo \$GCC_WRAPPER_INSERT \$GCC_WRAPPER_APPEND \
\$GCC${ver:0:1}_WRAPPER_INSERT \$GCC${ver:0:1}_WRAPPER_APPEND | \
tr ' ' '\n' | sed -e 's/^-SPEED-/-/' -e '/^-O/ { p; d; }' -e '/^-mcpu=/ { p; d; }' \
-e '/-march=/ { p; d; }' -e '/-mtune=/ { p; d; }' -e 'd'
))\""
echo "export CFLAGS=\"\$CFLAGS_SIZE\""
} > $root/etc/profile.d/gcc
fi
if [ $ROCKCFG_DEFAULT_CXX = $xpkg ]; then
echo "Creating /etc/profile.d/gxx ..."
{
echo "export CXXFLAGS_SIZE=\"$(echo $(
eval echo \$GCC_WRAPPER_INSERT \$GCC_WRAPPER_APPEND \
\$GCC${ver:0:1}_WRAPPER_INSERT \$GCC${ver:0:1}_WRAPPER_APPEND | \
tr ' ' '\n' | sed -e 's/^-SIZE-/-/' -e '/^-O/ { p; d; }' -e '/^-mcpu=/ { p; d; }' \
-e '/-march=/ { p; d; }' -e '/-mtune=/ { p; d; }' -e 'd'
))\""
echo "export CXXFLAGS_SPEED=\"$(echo $(
eval echo \$GCC_WRAPPER_INSERT \$GCC_WRAPPER_APPEND \
\$GCC${ver:0:1}_WRAPPER_INSERT \$GCC${ver:0:1}_WRAPPER_APPEND | \
tr ' ' '\n' | sed -e 's/^-SPEED-/-/' -e '/^-O/ { p; d; }' -e '/^-mcpu=/ { p; d; }' \
-e '/-march=/ { p; d; }' -e '/-mtune=/ { p; d; }' -e 'd'
))\""
echo "export CXXFLAGS=\"\$CFLAGS_SIZE\""
} > $root/etc/profile.d/gxx
fi
# Create symlinks for runtime libraries so they can be found by
# the dynamic loader and force rebuilding of the wrapper links
#
if [ $stagelevel -gt 1 ] ; then
[ $ROCKCFG_DEFAULT_CC = $xpkg ] && \
( mkdir -p $root/$prefix/lib ; cd $root/$prefix/lib ; \
ln -vfs ${gcc_lib_dir}/*.so.* . ; )
rm -fv $base/build/$ROCKCFG_ID/ROCK/$toolsdir/.lastupdate
fi
if [ "$ROCKCFG_PSEUDONATIVE" = 1 ]; then
echo "Adapting gcc specs file..."
cd $root/$prefix/lib/${gcc_lib_dir}
genrockspecs
# echo "Linking gcc libs to tools.cross..."
# cd $root/ROCK/tools.cross/lib/${gcc_lib_dir}/
# ln -sf ../../../../../../$prefix/lib/${gcc_lib_dir}/*.a .
# ln -sf ../../../../../../$prefix/lib/${gcc_lib_dir}/*.la .
# ln -sf ../../../../../../$prefix/lib/${gcc_lib_dir}/*.so .
# ln -sf ../../../../../../$prefix/lib/${gcc_lib_dir}/*.so.* .
fi
true
[ "$ROCKCFG_DEFAULT_CC" = $xpkg ] && \
( mkdir -p $root/$prefix/lib ; cd $root/$prefix/lib ; \
ln -vfs ${gcc_lib_dir}/*.so.* . ; )
fi
rm -fv $base/build/$ROCKCFG_ID/ROCK/$toolsdir/.lastupdate
}
gcc_cross() {
mkdir -p $root/$prefix/$pkg_gcc_target/{bin,lib}
if [ "$stagelevel" -eq 0 ]
then
rm -f $root/$prefix/$pkg_gcc_target/include
if [ -f $root/$prefix/include/stdio.h ]; then
ln -s ../include $root/$prefix/$pkg_gcc_target/include
elif [ -f $root/$prefix/diet-include/stdio.h ]; then
ln -s ../diet-include $root/$prefix/$pkg_gcc_target/include
fi
bindir="$root/$prefix/crosscc"
mkdir -p $root/$prefix/crosscc
fi
if [ "$pkg_gcc_version" != "2" ]; then
if [ "$ROCKCFG_PSEUDONATIVE" = 1 -o "$ROCKCFG_CROSSBUILD" = 1 ]; then
confopt="$confopt --enable-languages=c,c++"
else
confopt="$confopt --enable-languages=c"
fi
fi
mkdir objdir ; cd objdir ; hook_eval preconf
eval bash ../configure --program-prefix=${pkg_gcc_target}- --disable-cpp \
--disable-shared --disable-multilib $confopt
if [ -d libiberty ]; then make -C libiberty; fi
if [ -d texinfo ]; then make -C texinfo; fi
hook_eval premake
if [ "$xpkg" = "gcc2" ] ; then
make -C gcc all LANGUAGES="c"
hook_eval inmake
make -C gcc install LANGUAGES="c"
else
# workaround for at least gcc-3.2.3
mkdir -p $root/$prefix/lib/${gcc_lib_dir}
if [ -d gcc ]; then
make -C gcc all
hook_eval inmake
make -C gcc install
else
make all-gcc
hook_eval inmake
make install-gcc
create_links() {
for x ; do
if [ -f "$root/$prefix/bin/$x-${pkg_gcc_version}" ] ; then
rm -vf $root/$prefix/bin/$x
ln -vs $x-${pkg_gcc_version} $root/$prefix/bin/$x
fi
fi
hook_eval postmake
if [ -f $root/$prefix/lib/${gcc_lib_dir}/libgcc.a ]; then
${pkg_gcc_target}-ranlib \
$root/$prefix/lib/${gcc_lib_dir}/libgcc.a
fi
if [ "$stagelevel" -eq 0 ]; then
x="$root/$prefix/crosscc/${arch_target}"
ln -svf ${arch_target}-gcc $x-gcc-${pkg_gcc_version}
ln -svf ${arch_target}-g++ $x-g++-${pkg_gcc_version}
ln -svf ${arch_target}-gcc $x-kcc-${pkg_gcc_version}
ln -svf ${arch_target}-gcc $x-kcc
ln -svf ${arch_target}-gcc $x-cc
rm -vf "$root/$prefix/crosscc/gcc"
rm -vf "$root/$prefix/crosscc/gcj"
cd $root/$prefix/$arch_target/lib
for x in Mcrt1.o crt1.o crti.o crtn.o gcrt1.o \
libc.a libc.so libc_nonshared.a
do
if [ ! -e $x ]; then
ln -fvs $root/../../usr/lib/$x $x
fi
done
for x in ld-linux{,-$arch_machine}.so.2 ld.so.1 libc.so.{6,6.1}
do ln -fvs $root/../../lib/$x $x ; done
# glibc uses -lgcc_s with --as-needed, which fails if libgcc_s.{so,a}
# is not even there. -- clifford & fake
#
# the shared object is not really needed.
#if [ ! -e $root/$prefix/lib/${gcc_lib_dir}/libgcc_s.so ]; then
# ${pkg_gcc_target}-gcc -shared -nostdlib \
# -o $root/$prefix/lib/${gcc_lib_dir}/libgcc_s.so -x c /dev/null
#fi
if [ ! -e $root/$prefix/lib/${gcc_lib_dir}/libgcc_s.a ]; then
${pkg_gcc_target}-gcc -x c /dev/null -c -o null.o
${pkg_gcc_target}-ar q null.a null.o; rm -f null.o
${pkg_gcc_target}-ranlib null.a
mv null.a $root/$prefix/lib/${gcc_lib_dir}/libgcc_s.a
x="${pkg_gcc_target}-$x"
if [ -f $root/$prefix/bin/$x-${pkg_gcc_version} ] ; then
rm -vf $root/$prefix/bin/$x
ln -vs $x-${pkg_gcc_version} $root/$prefix/bin/$x
fi
rm -f $root/$prefix/.lastupdate
fi
# GCC 4 does not install a specs file and removes old ones.
# Regenerate the file with -dumpspecs.
#
if [ "${pkg_gcc_version:0:1}" -ge "4" ]; then
[ "$stagelevel" -eq 0 ] && $root/$prefix/crosscc/${pkg_gcc_target}-gcc -dumpspecs > $root/$prefix/lib/${gcc_lib_dir}/specs
[ "$stagelevel" -ne 0 ] && $root/$prefix/bin/${pkg_gcc_target}-gcc -dumpspecs > $root/$prefix/lib/${gcc_lib_dir}/specs
fi
if [ "$stagelevel" -eq 0 -o "$ROCKCFG_PSEUDONATIVE" = 1 ]; then
echo "Adapting gcc specs file..."
cd $root/$prefix/lib/${gcc_lib_dir}
genrockspecs
fi
true
done
}
if [ "$stagelevel" -eq 0 -o -n "$pkg_gcc_cross" ]
then
custmain="gcc_cross"
else
custmain="custmain"
fi
case "$pkg_gcc_version" in
34|4*)
gcc_lib_dir="gcc/${pkg_gcc_target}/${ver%%-*}"
;;
*)
gcc_lib_dir="gcc-lib/${pkg_gcc_target}/${ver%%-*}"
;;
esac

+ 1
- 1
package/base/gcc/gcc.desc

@ -44,7 +44,7 @@
[L] GPL
[S] Stable
[P] X 012------9 101.200
[P] X 012-4----9 100.600
#if xpkg == gcc2.*
[V] 2.95.3

+ 0
- 50
package/base/gcc/gcc42/auxbase.patch

@ -1,50 +0,0 @@
# --- 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/gcc/gcc41/auxbase.patch
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or 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.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
This fix is for passing -auxbase or -auxbase-strip thru the "gcc" driver
programs (e.g. 'gcc') to the backend compilers (e.g. 'cc1'). We will need
this for supporting feedback compilation using the ROCK toolchain...
- Clifford <clifford@clifford.at>
--- ./gcc/gcc.h.orig 2004-09-24 15:42:27.000000000 +0200
+++ ./gcc/gcc.h 2004-09-24 15:43:24.000000000 +0200
@@ -46,6 +46,7 @@
(!strcmp (STR, "Tdata") || !strcmp (STR, "Ttext") \
|| !strcmp (STR, "Tbss") || !strcmp (STR, "include") \
|| !strcmp (STR, "imacros") || !strcmp (STR, "aux-info") \
+ || !strcmp (STR, "auxbase") || !strcmp (STR, "auxbase-strip") \
|| !strcmp (STR, "idirafter") || !strcmp (STR, "iprefix") \
|| !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \
|| !strcmp (STR, "isystem") || !strcmp (STR, "-param") \
--- ./gcc/gcc.c.orig 2004-09-24 15:44:36.000000000 +0200
+++ ./gcc/gcc.c 2004-09-24 15:48:48.000000000 +0200
@@ -788,9 +788,9 @@
/* NB: This is shared amongst all front-ends. */
static const char *cc1_options =
"%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*}\
+ %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*}\
%{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}}\
- %{g*} %{O*} %{W*&pedantic*} %{w} %{std*&ansi&trigraphs}\
+ %{a*} %{g*} %{O*} %{W*&pedantic*} %{w} %{std*&ansi&trigraphs}\
%{v:-version} %{pg:-p} %{p} %{f*} %{undef}\
%{Qn:-fno-ident} %{--help:--help}\
%{--target-help:--target-help}\

+ 0
- 12
package/base/gcc/gcc42/fixincludes-hotfix.patch.cross

@ -1,12 +0,0 @@
--- ./fixincludes/mkheaders.in.orig 2007-06-29 11:02:37.000000000 +0200
+++ ./fixincludes/mkheaders.in 2007-06-29 11:04:35.000000000 +0200
@@ -62,7 +62,8 @@
isysroot=$1
shift
else
- isysroot=
+ isysroot=${prefix%/usr}
+ isysroot=${isysroot%/ROCK/tools.cross/*}
fi
# Directory in which to put host dependent programs and libraries

+ 53
- 0
package/base/gcc/gcc42/gcc-4.2.1-cross_search_paths-1.patch.cross

@ -0,0 +1,53 @@
Copied from www.linuxfromscratch.org to ROCK Linux.
Submitted by: Ryan Oliver <ryan.oliver@pha.com.au>
Date: 2007-02-14
Initial Package Version: 4.2.0
Origin: Ryan Oliver (issue reported by Erik-Jan Post)
Rediffed against 4.1.0 by Chris Staub
Rediffed against 4.1.2 by Jim Gifford
Rediffed against 4.2.0 by Joe Ciccone
Upstream Status: N/A
Description:
Removes standard_exec_prefix_2 from library search path when cross-compiling.
Removes both standard_exec_prefix_1 and standard_exec_prefix_2 from the gcc
executable search path when cross-compiling.
ie: if cross_compile = 1 in the specs file, do not
- do not add /usr/lib/gcc/${TARGET}/${GCC_VER} to the library search path
- do not add /usr/lib/gcc/${TARGET}/${GCC_VER} or
/usr/libexec/gcc/${TARGET}/${GCC_VER}
to the executable search path
This avoids the possibility of linking in libraries from the host if they
exist under those directories.
diff -Naur gcc-4.2.0.orig/gcc/gcc.c gcc-4.2.0/gcc/gcc.c
--- gcc-4.2.0.orig/gcc/gcc.c 2007-05-16 19:21:26.000000000 -0400
+++ gcc-4.2.0/gcc/gcc.c 2007-05-16 19:22:10.000000000 -0400
@@ -3949,16 +3949,22 @@
PREFIX_PRIORITY_LAST, 2, 0);
add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
PREFIX_PRIORITY_LAST, 2, 0);
- add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
+ if (*cross_compile == '0')
+ {
+ add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
PREFIX_PRIORITY_LAST, 2, 0);
- add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
+ add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
PREFIX_PRIORITY_LAST, 2, 0);
+ }
#endif
add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
PREFIX_PRIORITY_LAST, 1, 0);
- add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
+ if (*cross_compile == '0')
+ {
+ add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
PREFIX_PRIORITY_LAST, 1, 0);
+ }
tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
dir_separator_str, NULL);

+ 299
- 0
package/base/gcc/gcc42/gcc-4.2.1-posix-1.patch

@ -0,0 +1,299 @@
Copied from www.linuxfromscratch.org to ROCK Linux.
Submitted By: Jim Gifford (patches at jg555 dot com)
Date: 2007-02-14
Initial Package Version: 4.1.2
Origin: Jim Gifford
Rediffed against 4.1.0 by Chris Staub
Rediffed against 4.1.2 by Jim Gifford
Rediffed and additions against 4.2.0 by Joe Ciccone
Rediffed against 4.2.1 by Joe Ciccone
Upstream Status: On Hold
Description: Makes GCC Posix Compliant
diff -Naur gcc-4.2.1.orig/contrib/test_summary gcc-4.2.1/contrib/test_summary
--- gcc-4.2.1.orig/contrib/test_summary 2004-08-26 01:51:22.000000000 -0400
+++ gcc-4.2.1/contrib/test_summary 2007-07-22 19:31:03.000000000 -0400
@@ -106,7 +106,7 @@
srcdir = configflags;
sub(/\/configure .*/, "", srcdir);
printf "LAST_UPDATED: ";
- system("tail -1 " srcdir "/LAST_UPDATED");
+ system("tail -n 1 " srcdir "/LAST_UPDATED");
print "";
sub(/^[^ ]*\/configure */, " ", configflags);
diff -Naur gcc-4.2.1.orig/gcc/configure gcc-4.2.1/gcc/configure
--- gcc-4.2.1.orig/gcc/configure 2007-01-01 22:44:31.000000000 -0500
+++ gcc-4.2.1/gcc/configure 2007-07-22 19:31:03.000000000 -0400
@@ -14120,7 +14120,7 @@
# Therefore, use diff -b for the comparisons.
if test x$gcc_cv_objdump != x \
&& $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
- | tail -3 > conftest.got \
+ | tail -n 3 > conftest.got \
&& { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
|| diff -b conftest.big conftest.got > /dev/null 2>&1; }
then
diff -Naur gcc-4.2.1.orig/gcc/configure.ac gcc-4.2.1/gcc/configure.ac
--- gcc-4.2.1.orig/gcc/configure.ac 2007-01-01 22:44:31.000000000 -0500
+++ gcc-4.2.1/gcc/configure.ac 2007-07-22 19:31:03.000000000 -0400
@@ -2227,7 +2227,7 @@
# Therefore, use diff -b for the comparisons.
if test x$gcc_cv_objdump != x \
&& $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
- | tail -3 > conftest.got \
+ | tail -n 3 > conftest.got \
&& { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
|| diff -b conftest.big conftest.got > /dev/null 2>&1; }
then
diff -Naur gcc-4.2.1.orig/gcc/testsuite/ada/acats/run_all.sh gcc-4.2.1/gcc/testsuite/ada/acats/run_all.sh
--- gcc-4.2.1.orig/gcc/testsuite/ada/acats/run_all.sh 2006-09-14 06:12:03.000000000 -0400
+++ gcc-4.2.1/gcc/testsuite/ada/acats/run_all.sh 2007-07-22 19:31:03.000000000 -0400
@@ -68,7 +68,7 @@
ls ${i}?.adb > ${i}.lst 2> /dev/null
ls ${i}*m.adb >> ${i}.lst 2> /dev/null
ls ${i}.adb >> ${i}.lst 2> /dev/null
- main=`tail -1 ${i}.lst`
+ main=`tail -n 1 ${i}.lst`
}
EXTERNAL_OBJECTS=""
diff -Naur gcc-4.2.1.orig/libgomp/acinclude.m4 gcc-4.2.1/libgomp/acinclude.m4
--- gcc-4.2.1.orig/libgomp/acinclude.m4 2007-03-18 09:45:56.000000000 -0400
+++ gcc-4.2.1/libgomp/acinclude.m4 2007-07-22 19:31:03.000000000 -0400
@@ -147,7 +147,7 @@
# Start by getting the version number. I think the libtool test already
# does some of this, but throws away the result.
changequote(,)
- ldver=`$LD --version 2>/dev/null | head -1 | \
+ ldver=`$LD --version 2>/dev/null | head -n 1 | \
sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
changequote([,])
libgomp_gnu_ld_version=`echo $ldver | \
diff -Naur gcc-4.2.1.orig/libgomp/configure gcc-4.2.1/libgomp/configure
--- gcc-4.2.1.orig/libgomp/configure 2007-07-19 10:33:56.000000000 -0400
+++ gcc-4.2.1/libgomp/configure 2007-07-22 19:31:03.000000000 -0400
@@ -9314,7 +9314,7 @@
# Start by getting the version number. I think the libtool test already
# does some of this, but throws away the result.
- ldver=`$LD --version 2>/dev/null | head -1 | \
+ ldver=`$LD --version 2>/dev/null | head -n 1 | \
sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
libgomp_gnu_ld_version=`echo $ldver | \
diff -Naur gcc-4.2.1.orig/libjava/classpath/configure gcc-4.2.1/libjava/classpath/configure
--- gcc-4.2.1.orig/libjava/classpath/configure 2007-01-17 13:10:26.000000000 -0500
+++ gcc-4.2.1/libjava/classpath/configure 2007-07-22 19:31:03.000000000 -0400
@@ -18514,7 +18514,7 @@
fi # shortcircut to system "stdint.h"
# ------------------ PREPARE VARIABLES ------------------------------
if test "$GCC" = "yes" ; then
-ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
+ac_cv_stdint_message="using gnu compiler "`$CC --version | head -n 1`
else
ac_cv_stdint_message="using $CC"
fi
diff -Naur gcc-4.2.1.orig/libjava/classpath/ltcf-c.sh gcc-4.2.1/libjava/classpath/ltcf-c.sh
--- gcc-4.2.1.orig/libjava/classpath/ltcf-c.sh 2006-01-17 13:09:40.000000000 -0500
+++ gcc-4.2.1/libjava/classpath/ltcf-c.sh 2007-07-22 19:31:03.000000000 -0400
@@ -153,7 +153,7 @@
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is.
# If DATA tags from a recent dlltool are present, honour them!
- archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
+ archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
cp $export_symbols $output_objdir/$soname-def;
else
echo EXPORTS > $output_objdir/$soname-def;
diff -Naur gcc-4.2.1.orig/libjava/classpath/ltcf-gcj.sh gcc-4.2.1/libjava/classpath/ltcf-gcj.sh
--- gcc-4.2.1.orig/libjava/classpath/ltcf-gcj.sh 2005-09-23 17:31:04.000000000 -0400
+++ gcc-4.2.1/libjava/classpath/ltcf-gcj.sh 2007-07-22 19:31:03.000000000 -0400
@@ -156,7 +156,7 @@
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is.
# If DATA tags from a recent dlltool are present, honour them!
- archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
+ archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
cp $export_symbols $output_objdir/$soname-def;
else
echo EXPORTS > $output_objdir/$soname-def;
diff -Naur gcc-4.2.1.orig/libjava/classpath/m4/ax_create_stdint_h.m4 gcc-4.2.1/libjava/classpath/m4/ax_create_stdint_h.m4
--- gcc-4.2.1.orig/libjava/classpath/m4/ax_create_stdint_h.m4 2006-01-17 13:09:40.000000000 -0500
+++ gcc-4.2.1/libjava/classpath/m4/ax_create_stdint_h.m4 2007-07-22 19:31:03.000000000 -0400
@@ -217,7 +217,7 @@
fi # shortcircut to system "stdint.h"
# ------------------ PREPARE VARIABLES ------------------------------
if test "$GCC" = "yes" ; then
-ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
+ac_cv_stdint_message="using gnu compiler "`$CC --version | head -n 1`
else
ac_cv_stdint_message="using $CC"
fi
diff -Naur gcc-4.2.1.orig/libjava/configure gcc-4.2.1/libjava/configure
--- gcc-4.2.1.orig/libjava/configure 2007-07-19 10:33:56.000000000 -0400
+++ gcc-4.2.1/libjava/configure 2007-07-22 19:31:03.000000000 -0400
@@ -7025,8 +7025,8 @@
echo $ECHO_N "checking whether 'ld' is at least 2.13... $ECHO_C" >&6
LD_PROG=`$CC --print-prog-name=ld`
LD_VERSION=`$LD_PROG --version`
-LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
-LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
+LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
+LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 2`
if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
LD_OK="ok"
else
diff -Naur gcc-4.2.1.orig/libjava/mingwld.m4 gcc-4.2.1/libjava/mingwld.m4
--- gcc-4.2.1.orig/libjava/mingwld.m4 2005-08-22 18:36:35.000000000 -0400
+++ gcc-4.2.1/libjava/mingwld.m4 2007-07-22 19:31:03.000000000 -0400
@@ -3,8 +3,8 @@
AC_MSG_CHECKING(whether 'ld' is at least 2.13)
LD_PROG=`$CC --print-prog-name=ld`
LD_VERSION=`$LD_PROG --version`
-LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
-LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
+LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
+LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 2`
if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
LD_OK="ok"
else
diff -Naur gcc-4.2.1.orig/libstdc++-v3/acinclude.m4 gcc-4.2.1/libstdc++-v3/acinclude.m4
--- gcc-4.2.1.orig/libstdc++-v3/acinclude.m4 2007-06-28 19:02:05.000000000 -0400
+++ gcc-4.2.1/libstdc++-v3/acinclude.m4 2007-07-22 19:31:03.000000000 -0400
@@ -234,7 +234,7 @@
if test x"$with_gnu_ld" = x"yes"; then
AC_MSG_CHECKING([for ld version])
changequote(,)
- ldver=`$LD --version 2>/dev/null | head -1 | \
+ ldver=`$LD --version 2>/dev/null | head -n 1 | \
sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
changequote([,])
glibcxx_gnu_ld_version=`echo $ldver | \
diff -Naur gcc-4.2.1.orig/libstdc++-v3/configure gcc-4.2.1/libstdc++-v3/configure
--- gcc-4.2.1.orig/libstdc++-v3/configure 2007-06-28 19:02:05.000000000 -0400
+++ gcc-4.2.1/libstdc++-v3/configure 2007-07-22 19:31:03.000000000 -0400
@@ -8541,7 +8541,7 @@
echo "$as_me:$LINENO: checking for ld version" >&5
echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- ldver=`$LD --version 2>/dev/null | head -1 | \
+ ldver=`$LD --version 2>/dev/null | head -n 1 | \
sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
glibcxx_gnu_ld_version=`echo $ldver | \
@@ -54451,7 +54451,7 @@
echo "$as_me:$LINENO: checking for ld version" >&5
echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- ldver=`$LD --version 2>/dev/null | head -1 | \
+ ldver=`$LD --version 2>/dev/null | head -n 1 | \
sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
glibcxx_gnu_ld_version=`echo $ldver | \
@@ -75811,7 +75811,7 @@
echo "$as_me:$LINENO: checking for ld version" >&5
echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- ldver=`$LD --version 2>/dev/null | head -1 | \
+ ldver=`$LD --version 2>/dev/null | head -n 1 | \
sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
glibcxx_gnu_ld_version=`echo $ldver | \
@@ -77334,7 +77334,7 @@
echo "$as_me:$LINENO: checking for ld version" >&5
echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- ldver=`$LD --version 2>/dev/null | head -1 | \
+ ldver=`$LD --version 2>/dev/null | head -n 1 | \
sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
glibcxx_gnu_ld_version=`echo $ldver | \
@@ -78825,7 +78825,7 @@
echo "$as_me:$LINENO: checking for ld version" >&5
echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- ldver=`$LD --version 2>/dev/null | head -1 | \
+ ldver=`$LD --version 2>/dev/null | head -n 1 | \
sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
glibcxx_gnu_ld_version=`echo $ldver | \
@@ -100715,7 +100715,7 @@
echo "$as_me:$LINENO: checking for ld version" >&5
echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- ldver=`$LD --version 2>/dev/null | head -1 | \
+ ldver=`$LD --version 2>/dev/null | head -n 1 | \
sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
glibcxx_gnu_ld_version=`echo $ldver | \
@@ -101560,7 +101560,7 @@
echo "$as_me:$LINENO: checking for ld version" >&5
echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- ldver=`$LD --version 2>/dev/null | head -1 | \
+ ldver=`$LD --version 2>/dev/null | head -n 1 | \
sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
glibcxx_gnu_ld_version=`echo $ldver | \
@@ -102961,7 +102961,7 @@
echo "$as_me:$LINENO: checking for ld version" >&5
echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- ldver=`$LD --version 2>/dev/null | head -1 | \
+ ldver=`$LD --version 2>/dev/null | head -n 1 | \
sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
glibcxx_gnu_ld_version=`echo $ldver | \
@@ -104754,7 +104754,7 @@
echo "$as_me:$LINENO: checking for ld version" >&5
echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- ldver=`$LD --version 2>/dev/null | head -1 | \
+ ldver=`$LD --version 2>/dev/null | head -n 1 | \
sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
glibcxx_gnu_ld_version=`echo $ldver | \
@@ -105997,7 +105997,7 @@
echo "$as_me:$LINENO: checking for ld version" >&5
echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- ldver=`$LD --version 2>/dev/null | head -1 | \
+ ldver=`$LD --version 2>/dev/null | head -n 1 | \
sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
glibcxx_gnu_ld_version=`echo $ldver | \
@@ -107024,7 +107024,7 @@
echo "$as_me:$LINENO: checking for ld version" >&5
echo $ECHO_N "checking for ld version... $ECHO_C" >&6
- ldver=`$LD --version 2>/dev/null | head -1 | \
+ ldver=`$LD --version 2>/dev/null | head -n 1 | \
sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
glibcxx_gnu_ld_version=`echo $ldver | \
diff -Naur gcc-4.2.1.orig/ltcf-c.sh gcc-4.2.1/ltcf-c.sh
--- gcc-4.2.1.orig/ltcf-c.sh 2005-11-18 17:53:08.000000000 -0500
+++ gcc-4.2.1/ltcf-c.sh 2007-07-22 19:31:03.000000000 -0400
@@ -153,7 +153,7 @@
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is.
# If DATA tags from a recent dlltool are present, honour them!
- archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
+ archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
cp $export_symbols $output_objdir/$soname-def;
else
echo EXPORTS > $output_objdir/$soname-def;
diff -Naur gcc-4.2.1.orig/ltcf-gcj.sh gcc-4.2.1/ltcf-gcj.sh
--- gcc-4.2.1.orig/ltcf-gcj.sh 2005-07-15 22:30:53.000000000 -0400
+++ gcc-4.2.1/ltcf-gcj.sh 2007-07-22 19:31:03.000000000 -0400
@@ -156,7 +156,7 @@
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is.
# If DATA tags from a recent dlltool are present, honour them!
- archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
+ archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
cp $export_symbols $output_objdir/$soname-def;
else
echo EXPORTS > $output_objdir/$soname-def;

+ 0
- 39
package/base/gcc/gcc42/install_so.patch

@ -1,39 +0,0 @@
# --- 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/gcc/gcc41/install_so.patch
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or 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.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
--- ./install-sh.orig 2003-07-20 11:40:28.000000000 +0200
+++ ./install-sh 2003-11-02 17:04:13.000000000 +0100
@@ -279,8 +279,15 @@
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
# Now rename the file to the real destination.
- { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
- || {
+ { if echo $dstdir/$dstfile | grep -q 'lib/.*\.so' ; then
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
+ rc=$?
+ else
+ $doit $rmcmd -f $dstdir/$dstfile &&
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
+ rc=$?
+ fi
+ [ $rc -eq 0 ] || {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.

+ 0
- 36
package/base/gcc/gcc42/no-install-libiberty.patch

@ -1,36 +0,0 @@
# --- 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/gcc/gcc41/no-install-libiberty.patch
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or 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.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
--- ./libiberty/Makefile.in.orig 2003-03-23 06:16:03.000000000 -0400
+++ ./libiberty/Makefile.in 2003-05-15 17:02:18.000000000 -0400
@@ -342,10 +342,10 @@
# since it will be passed the multilib flags.
MULTIOSDIR = `$(CC) $(LIBCFLAGS) -print-multi-os-directory`
install_to_libdir: all
- ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR)
- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n
- ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n )
- mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)
+ #${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR)
+ #$(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n
+ #( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n )
+ #mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)
if test -n "${target_header_dir}"; then \
case "${target_header_dir}" in \
/*) thd=${target_header_dir};; \

+ 0
- 30
package/base/gcc/gcc42/no-install-zlib.patch

@ -1,30 +0,0 @@
# --- 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/gcc/gcc41/no-install-zlib.patch
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or 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.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
--- ./zlib/Makefile.in.orig 2002-11-25 21:28:45.000000000 +0200
+++ ./zlib/Makefile.in 2003-01-25 15:39:06.000000000 +0200
@@ -510,7 +510,7 @@
for dir in "$(DESTDIR)$(toolexeclibdir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
-install: install-am
+install:
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

+ 70
- 72
package/base/gcc/parse-config

@ -1,3 +1,4 @@
#!/bin/bash
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
@ -19,60 +20,87 @@
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
if [ $stagelevel -gt 0 ]
then
# ---- NOT IN STAGE 0 ---
# Use the GCC-[23] stack protector patch
#
if [ $pkg != glibc23 -a $pkg != glibc22 -a \
$pkg != grub -a $pkg != dietlibc ]
if [ $stagelevel -ge 2 -o $stagelevel -eq 1 -a $pkg = glibc ]
then
if [ "$ROCKCFG_PKG_GCC_STACKPRO" = 1 ] ; then
var_append GCC4_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_OPT" = "size" ] ; 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-*)
case "$x" in
KCC)
z="${archprefix}kcc ${archprefix}kcc-${y#gcc}" ;;
CC)
z="${archprefix}gcc ${archprefix}gcc-${y#gcc}" ;;
CXX-[1-9])
CXX)
z="${archprefix}g++ ${archprefix}g++-${y#gcc}" ;;
F77-[2-9])
F77)
z="${archprefix}g77 ${archprefix}g77-${y#gcc}" ;;
*)
export $x=${x}_not_available_in_stage_${stagelevel}
continue ;;
esac
export $x=${x}_not_available_in_stage_${stagelevel}
for y in $z ; do
[ "`type -p $y`" ] && export $x=$y
done
fi
done
unset x y z
if [ "$ROCKCFG_MULTILIB" = 1 -a $stagelevel -ge 1 ] ; then
if [[ "$xpkg" = *-32bit ]] ; then
export CC="${CC} ${BUILD32}" CXX="${CXX} ${BUILD32}"
else
export CC="${CC} ${BUILD64}" CXX="${CXX} ${BUILD64}"
fi
fi
var_append GCC_WRAPPER_APPEND " " "$ROCKCFG_C_FLAGS"
# 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"
# Compile (i.e. link) all bins statically
#
if [ "$ROCKCFG_STATIC" = 1 ]; then
var_insert GCC_WRAPPER_INSERT " " "-static"
fi
# Use the GCC 4.x stack protector
#
if [ $pkg != glibc23 -a $pkg != glibc22 -a \
$pkg != grub -a $pkg != dietlibc -a $pkg != glibc ]
then
if [ "$ROCKCFG_PKG_GCC_STACKPRO" = 1 ] ; then
var_append GCC4_WRAPPER_INSERT " " "-fstack-protector"
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
# Use automatically precompiled C++ headers
#
if [ "$ROCKCFG_AUTOPCH" = 1 ] ; then
[ -n "$CXX" -a -n "`type -p g++-autopch`" ] && \
CXX="eval AUTOPCHCXX=\"$CXX\" g++-autopch"
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
if [ "$ROCKCFG_OPT" = "size" ] ; then
var_insert KCC_WRAPPER_REMOVE " " "-O -O[0-9]"
var_insert KCC_WRAPPER_INSERT " " "-Os"
fi
fi
# Add the usual gcc optimization options
# Strip or add debug information
#
@ -82,12 +110,15 @@ if [ "$ROCKCFG_DEBUG" = 0 ] ; then
else
if [[ $pkg != glibc* ]] ; then
var_append GCC_WRAPPER_APPEND " " "-ggdb"
var_insert GCC_WRAPPER_REMOVE " " "-s -g*"
fi
var_insert GCC_WRAPPER_REMOVE " " "-s -g*"
fi
# remove other -O options from the argument list
var_insert GCC_WRAPPER_REMOVE " " "-O -O[0-9s]"
#
if [ "$ROCKCFG_OPT" != default ] ; then
var_insert GCC_WRAPPER_REMOVE " " "-O -O[0-9s]"
fi
case "$ROCKCFG_OPT" in
smart)
@ -117,30 +148,10 @@ case "$ROCKCFG_OPT" in
;;
esac
;;
default)
;;
esac
var_append GCC_WRAPPER_APPEND " " "$ROCKCFG_C_FLAGS"
# Compile (i.e. link) all bins statically
#
if [ "$ROCKCFG_STATIC" = 1 ]; then
var_insert GCC_WRAPPER_INSERT " " "-static"
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"
#
var_insert GCC4_WRAPPER_REMOVE " " "-I/usr/include"
var_insert GCC4_WRAPPER_REMOVE " " "-I/usr/local/include"
# Add the architecture gcc optimisation options
#
@ -148,23 +159,11 @@ if [ -f architecture/$arch/gcc-options ] ; then
. architecture/$arch/gcc-options
fi
# Use our cross specs file for stage 1
#
if [ $stagelevel -eq 1 ]; then
var_insert GCC_WRAPPER_INSERT " " "--specs=specs.cross"
if [ "$ROCKCFG_CROSSBUILD" = 1 ]; then
for x in $root/usr/include/c++/*; do
var_insert CXX_WRAPPER_INSERT " " "-I$x"
var_insert CXX_WRAPPER_INSERT " " "-I$x/$arch_target"
done
fi
fi
# Use our chroot specs file for pseudonative
#
if [ $stagelevel -gt 1 -a "$ROCKCFG_PSEUDONATIVE" = 1 ]; then
var_insert GCC_WRAPPER_INSERT " " "--specs=specs.chroot"
fi
# if [ $stagelevel -gt 2 -a "$ROCKCFG_PSEUDONATIVE" = 1 ]; then
# var_insert GCC_WRAPPER_INSERT " " "--specs=specs.chroot"
# fi
# register the forcefpic handler
gcc_force_fpic_handler() {
@ -175,5 +174,4 @@ gcc_force_fpic_handler() {
}
hook_add prepare 7 'gcc_force_fpic_handler'
# ---- NOT IN STAGE 0 ---
fi
fi # [ $stagelevel -ge 2 ]

+ 0
- 1
package/base/gcc/pkgmapper.in

@ -2,4 +2,3 @@
if [ -z "${pkg##gcc[234]*}" ]; then
pkg=gcc
fi

+ 2
- 0
package/base/gcc/postconfig.in

@ -0,0 +1,2 @@
pkgremove gcc

+ 11
- 4
package/base/gcc/preconfig.in

@ -1,10 +1,17 @@
#!/bin/bash
#!/bin/bash
for x in gcc2 gcc32 gcc33 gcc34 gcc40 gcc41 gcc42 ; do
pkgfork gcc $x
CFGTEMP_DEFAULT_CC="$x Use_${x}_as_default_C_compiler $CFGTEMP_DEFAULT_CC"
# GCC 2.x and 3.2.x cannot be used as the default C/C++ compilers because they
# don't support the --with-sysroot configure option.
case $x in
gcc2|gcc32) ;;
*)
CFGTEMP_DEFAULT_CC="$x Use_${x}_as_default_C_compiler $CFGTEMP_DEFAULT_CC"
CFGTEMP_DEFAULT_CXX="$x Use_${x}_as_default_C++_compiler $CFGTEMP_DEFAULT_CXX"
;;
esac
CFGTEMP_DEFAULT_KCC="$x Use_${x}_as_default_kernel_compiler $CFGTEMP_DEFAULT_KCC"
CFGTEMP_DEFAULT_CXX="$x Use_${x}_as_default_C++_compiler $CFGTEMP_DEFAULT_CXX"
CFGTEMP_DEFAULT_F77="$x Use_${x}_as_default_Fortran_77_compiler $CFGTEMP_DEFAULT_F77"
[[ "$x" == gcc4* ]] && CFGTEMP_DEFAULT_F95="$x Use_${x}_as_default_Fortran_95_compiler $CFGTEMP_DEFAULT_F95"
done
pkgremove gcc

+ 3
- 2
package/base/gcc/wrappers.in

@ -1,3 +1,4 @@
#!/bin/bash
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
@ -45,14 +46,14 @@ gcc_build_wrapper CC ${arch_target}-cc ${arch_target}-gcc{-2,-32,-33,-34,-40,-41
gcc_build_wrapper CXX ${arch_target}-{g++,c++}{-2,-32,-33,-34,-40,-41,-42,}
gcc_build_wrapper KCC ${arch_target}-kcc{-2,-32,-33,-34,-40,-41,-42,}
if [ $stagelevel -gt 1 -o "$ROCKCFG_USE_CROSSCC" = 0 ]; then
if [ $stagelevel -ge 3 ]; then
gcc_build_wrapper CC cc gcc{-2,-32,-33,-34,-40,-41,-42,}
gcc_build_wrapper CXX {c,g}++{-2,-32,-33,-34,-40,-41,-42,}
gcc_build_wrapper F77 {g,f}77{-2,-32,-33,-34,-40,-41,-42,}
gcc_build_wrapper KCC kcc{-2,-32,-33,-34,-40,-41,-42,}
fi
if [ $stagelevel -le 1 ]; then
if [ $stagelevel -le 2 ]; then
build_wrapper BUILDCC cc gcc
fi

Loading…
Cancel
Save