This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
linux->i686-pc-pe compiler won't build libiberty
- To: GCC <gcc at gcc dot gnu dot org>
- Subject: linux->i686-pc-pe compiler won't build libiberty
- From: Stephen Smith <ischis2 at home dot com>
- Date: Mon, 25 Jun 2001 13:21:15 -0700
I am building a cross compiler hosted on linux and targeting a i686-pc-pe or i686-pc-cygwin. I get the same errors
using both targets. The scripts are at the bottom of the error message.
The compiler runs - I have tried. It is just that liberty won't compile. The errors fall into two catagories and only
happen when trying to build the full compiler.:
/usr/local/cross-compilers/cross-source/build-gcc-i686-pc-pe/gcc/xgcc
-B/usr/local/cross-compilers/cross-source/build-gcc-i686-pc-pe/gcc/ -B/usr/local/cross-compilers/intel/i686-pc-pe/bin/
-c -DHAVE_CONFIG_H -g -O2 -I. -I../../../gcc-2.95.2-6/libiberty/../include -W -Wall -Wtraditional -fpic
../../../gcc-2.95.2-6/libiberty/pexecute.c -o pic/pexecute.o
cc1: warning: -fpic ignored for target (all code is position independent)
../../../gcc-2.95.2-6/libiberty/pexecute.c: In function `pexecute':
../../../gcc-2.95.2-6/libiberty/pexecute.c:378: warning: implicit declaration of function `_pipe'
../../../gcc-2.95.2-6/libiberty/pexecute.c:378: `O_BINARY' undeclared (first use in this function)
../../../gcc-2.95.2-6/libiberty/pexecute.c:378: (Each undeclared identifier is reported only once
../../../gcc-2.95.2-6/libiberty/pexecute.c:378: for each function it appears in.)
../../../gcc-2.95.2-6/libiberty/pexecute.c:426: warning: assignment discards qualifiers from pointer target type
../../../gcc-2.95.2-6/libiberty/pexecute.c:361: warning: unused variable `sleep_interval'
../../../gcc-2.95.2-6/libiberty/pexecute.c:361: warning: unused variable `retries'
../../../gcc-2.95.2-6/libiberty/pexecute.c:353: warning: unused parameter `this_pname'
../../../gcc-2.95.2-6/libiberty/pexecute.c:354: warning: unused parameter `temp_base'
../../../gcc-2.95.2-6/libiberty/pexecute.c:359: warning: `org_stdin' might be used uninitialized in this function
../../../gcc-2.95.2-6/libiberty/pexecute.c:359: warning: `org_stdout' might be used uninitialized in this function
../../../gcc-2.95.2-6/libiberty/pexecute.c: In function `pwait':
../../../gcc-2.95.2-6/libiberty/pexecute.c:442: warning: unused parameter `pid'
../../../gcc-2.95.2-6/libiberty/pexecute.c:444: warning: unused parameter `flags'
make[1]: [pexecute.o] Error 1 (ignored)
/usr/local/cross-compilers/cross-source/build-gcc-i686-pc-pe/gcc/xgcc
-B/usr/local/cross-compilers/cross-source/build-gcc-i686-pc-pe/gcc/ -B/usr/local/cross-compilers/intel/i686-pc-pe/bin/
-c -DHAVE_CONFIG_H -g -O2 -I. -I../../../gcc-2.95.2-6/libiberty/../include -W -Wall -Wtraditional -fpic
../../../gcc-2.95.2-6/libiberty/strsignal.c -o pic/strsignal.o
cc1: warning: -fpic ignored for target (all code is position independent)
../../../gcc-2.95.2-6/libiberty/strsignal.c: In function `psignal':
../../../gcc-2.95.2-6/libiberty/strsignal.c:592: argument `signo' doesn't match prototype
/usr/include/signal.h:131: prototype declaration
../../../gcc-2.95.2-6/libiberty/strsignal.c:592: argument `message' doesn't match prototype
/usr/include/signal.h:131: prototype declaration
../../../gcc-2.95.2-6/libiberty/strsignal.c:597: warning: comparison between signed and unsigned
------------------------------- current script ---------------
#! /bin/bash
# Find out which cross compiler we want:
if [ "x$1" = "x" ]
then
export target_system="not set"
else
case $1 in
cygwin2powerpc | powerpc | x86 )
export target_system="$1"
;;
*)
export target_system="not set"
;;
esac
fi
# Set up the variables for the various flavors
case $target_system in
cygwin2powerpc)
export target=powerpc-motorola-elf
export prefix=/usr/local/powerpc-motorola-elf
export gcc_version=2.95.2-6
export binutils_version=2.10.1
export cygwin_version=1.1.8-2
;;
powerpc)
export target=powerpc-motorola-elf
export prefix=/usr/local/cross-compilers/powerpc
export gcc_version=2.95.2-6
export binutils_version=2.10.1
export cygwin_version=1.1.8-2
;;
x86)
export target=i686-pc-pe
export prefix=/usr/local/cross-compilers/intel
export gcc_version=2.95.2-6
export binutils_version=2.10.1
export cygwin_version=1.1.8-2
;;
*)
echo "Usage $0 [ cygwin2powerpc | powerpc | x86 ] "
exit 1;
;;
esac
#############################################################
#
# Don't modify below this point
#
#############################################################
export languages="c,c++"
export curdir=`pwd`
export tarfiles=tars
echo "$0: Start `date`"
export PATH=$prefix/bin:$PATH
set -e
# get the source
if [ ! -d gcc-${gcc_version} ]
then
tar -xzf $tarfiles/gcc-${gcc_version}*.tar.gz
fi
if [ ! -d cygwin-${cygwin_version} ]
then
tar -xzf $tarfiles/cygwin-${cygwin_version}*.tar.gz
fi
if [ ! -d binutils-${binutils_version} ]
then
tar -xzf $tarfiles/binutils-${binutils_version}*.tar.gz
fi
# config.guess is part of the gcc, binutils, and
# cygwin distributions.
if [ -x $curdir/cygwin-${cygwin_version}/config.guess ]
then
export host=`$curdir/cygwin-${cygwin_version}/config.guess`
export build=`$curdir/cygwin-${cygwin_version}/config.guess`
else
echo "Could not find the config.gues file."
echo "Tried: `$curdir/cygwin-${cygwin_version}/config.guess`"
exit 1;
fi
# Create build directories
mkdir -p build-binutils-${target} build-gcc-${target} build-cygwin-${target}
# Build the binary utilities
echo "building binary utilities"
cd $curdir/build-binutils-${target}
../binutils-${binutils_version}/configure \
--prefix=$prefix --target=$target \
--host=$host --build=$build \
--with-included-gettext
echo "... making binary utilities"
make 2>&1 | tee make.log
echo "... installing binary utilities"
make install 2>&1 | tee install.log
# When trying to build a cross compiler for a windows
# or PE system, the definitions are in the windows.h file.
# we need to move those files to one of the include directories.
case $target_system in
x86)
echo "moving windows support headers"
mkdir -p $prefix/$target/include
cp -p -r $curdir/cygwin-1.1.8-2/winsup/w32api/include/* $prefix/$target/include
cp -p $curdir/cygwin-${cygwin_version}/winsup/cygwin/include/io.h $curdir/gcc-${gcc_version}/include
cp -p $curdir/cygwin-${cygwin_version}/newlib/libc/include/process.h $curdir/gcc-${gcc_version}/include
;;
*)
;;
esac
# Build and install "just the C" portion of gcc
# (feel free to change
# the arguments to --enable-languages to suit your needs):
echo "building gcc - C only"
cd $curdir/build-gcc-${target}
../gcc-${gcc_version}/configure --prefix=$prefix \
--target=$target --host=$host --build=$build \
--with-newlib --enable-languages=$languages \
--with-included-gettext --enable-shared --enable-threads \
--with-as=$prefix/bin/powerpc-motorola-elf-as
echo "... making minimal gcc"
make LANGUAGES=c all-gcc 2>&1 | tee make.log
echo "... installing minimal gcc"
make LANGUAGES=c install-gcc 2>&1 | tee install.log
# Build and install newlib
echo "building newlib library"
cd $curdir/build-cygwin-${target}
../cygwin-${cygwin_version}/newlib/configure \
--prefix=$prefix --target=$target \
--host=$host --build=$build
echo "... making newlib library"
make 2>&1 | tee make.log
echo "... installing newlib library"
make install 2>&1 | tee install.log
# Make the sys-include link (may not need this, but why not):
(cd $prefix/$target; ln -s include sys-include)
# Build the rest of gcc
echo "building rest of gcc"
cd $curdir/build-gcc-${target}
echo "... making the rest of gcc"
make -i 2>&1 | tee make_full.log
echo "... installing the rest of gcc"
make -i install 2>&1 | tee install_full.log
echo "$0: finished `date`"