Compare commits

...

6 Commits

Author SHA1 Message Date
Oliver Tappe
d6fd401aa3 Fix use of non-existent variable (GCCDATE instead of gccDate). 2011-12-15 11:41:15 +01:00
Fredrik Holmqvist
e310d205fb Add Haiku to list of elf-target so that is_elf is true.
This enables --enable-gold flag to be used (doesn't compile yet though).
The gold linker promises up to five times faster linking than ld, it is also possible to use link-time optimizations.
2011-12-03 10:14:13 +01:00
Oliver Tappe
68d377c247 Improve build-gcc2-optional-package.sh:
* automatically build the compiler if it doesn't exist yet
* protect against unneeded cruft breaking the build
2011-11-23 16:49:35 +00:00
Oliver Tappe
5abab92edf Bump legacy compiler version. 2011-11-22 18:59:35 +01:00
Oliver Tappe
073cb9127c Define __STDC_ISO_10646__ in our gccs.
* define __STDC_ISO_10646__ to '201103' in order to indicate that
  Haiku's wchar_t supports the Universal Character Set (UCS) defined
  by the ISO 10646 standard published in March 2011.
2011-11-19 16:45:49 +01:00
Matt Madia
ef37057d92 Prevent fixing the includes.
Forcibly prevent fixinclude from executing. This prevents the spawning of a
shell process, which would be abandoned due to fixinc crashing.

Submitted By: BLFS Book <blfs-book@linuxfromscratch.org>
Date: 2003-10-05
Initial Package Version: 2.95.3
Origin: BLFS Book
http://www.linuxfromscratch.org/blfs/view/5.1/general/gcc2.html
2011-11-16 18:01:03 -05:00
13 changed files with 64 additions and 14 deletions

2
binutils/configure vendored
View File

@@ -2049,7 +2049,7 @@ if test "${ENABLE_GOLD}" = "yes"; then
is_elf=no
case "${target}" in
*-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
| *-*-linux* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
| *-*-linux* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* | *-*-haiku* \
| *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-solaris2*)
case "${target}" in
*-*-linux*aout* | *-*-linux*oldld*)

View File

@@ -304,7 +304,7 @@ if test "${ENABLE_GOLD}" = "yes"; then
is_elf=no
case "${target}" in
*-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
| *-*-linux* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
| *-*-linux* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* | *-*-haiku* \
| *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-solaris2*)
case "${target}" in
*-*-linux*aout* | *-*-linux*oldld*)

View File

@@ -28,10 +28,54 @@ fi
current_dir=$(pwd)
base=/boot/develop/abi/x86/gcc2/tools/gcc-2.95.3-haiku-$GCCDATE
if [ ! -d "$base" ]; then
echo GCC directory \"$base\" does not exist!
exit
fi
echo GCC directory \"$base\" does not exist, so we start a build ...
echo "This is going to take a while ..."
sleep 3
# From now on fail, if anything goes wrong.
set -o errexit
cd $gcc_base/..
rm -rf binutils-obj
mkdir binutils-obj
cd binutils-obj
CFLAGS="-O2" CXXFLAGS="-O2" ../binutils/configure \
--prefix=/boot/develop/abi/x86/gcc2/tools/gcc-2.95.3-haiku-${GCCDATE} \
--disable-nls --enable-shared=yes
make
cd ..
(cd gcc/gcc; touch c-parse.{h,c} cexp.c cp/parse.{c,h} c-gperf.h)
rm -rf gcc-obj
mkdir gcc-obj
cd gcc-obj
CFLAGS="-O2" CXXFLAGS="-O2" ../gcc/configure \
--prefix=/boot/develop/abi/x86/gcc2/tools/gcc-2.95.3-haiku-${GCCDATE} \
--disable-nls --enable-shared=yes --enable-languages=c,c++
# hack the Makefile to avoid trouble with stuff we don't need anyway
sedExpr=
for toRemove in libio libjava libobjc libstdc++; do
sedExpr="$sedExpr -e 's@^\(TARGET_CONFIGDIRS =.*\)$toRemove\(.*\)@\1\2@'"
done
echo sedExpr: $sedExpr
mv Makefile Makefile.bak || exit 1
eval "sed $sedExpr Makefile.bak > Makefile" || exit 1
rm Makefile.bak
# build gcc
make bootstrap
cd ..
mkdir /boot/develop/abi/x86/gcc2/tools/gcc-2.95.3-haiku-${GCCDATE}
cd binutils-obj
make install
cd ..
cd gcc-obj
make install
cd ..
ln -sfn gcc-2.95.3-haiku-${GCCDATE} /boot/develop/abi/x86/gcc2/tools/current
fi
### HTML documentation ####################################
@@ -49,12 +93,10 @@ if [ ! -d "$html_base" ]; then
makeinfo --html $gcc_base/../gcc/gcc/cpp.texi
makeinfo --html $gcc_base/../gcc/gcc/gcc.texi
makeinfo --html $gcc_base/../binutils/libiberty/libiberty.texi
makeinfo --force --html $gcc_base/../gcc/libio/iostream.texi
ln -sf cpp/index.html $html_base/cpp.html
ln -sf gcc/index.html $html_base/gcc.html
ln -sf libiberty/index.html $html_base/libiberty.html
ln -sf iostream/index.html $html_base/iostream.html
fi
if [ -d "$base/share/doc" ]; then
echo "Adding binutils HTML documentation..."

View File

@@ -131,9 +131,9 @@ ln -s c++/$gccVersion $installDir/include/g++
# zip everything up
gccVersionYear=20$(echo $GCCDATE | cut -c1-2)
gccVersionMonth=$(echo $GCCDATE | cut -c3-4)
gccVersionDay=$(echo $GCCDATE | cut -c5-6)
gccVersionYear=20$(echo $gccDate | cut -c1-2)
gccVersionMonth=$(echo $gccDate | cut -c3-4)
gccVersionDay=$(echo $gccDate | cut -c5-6)
packageFile="$currentDir/gcc-${gccVersion}-${gccArch}-gcc4-${gccVersionYear}-${gccVersionMonth}-${gccVersionDay}.zip"
cd /boot

View File

@@ -56,6 +56,7 @@
builtin_define ("__arm__"); \
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
builtin_define ("__STDC_ISO_10646__=201103L"); \
builtin_assert ("system=haiku"); \
/* Haiku apparently doesn't support merging of symbols across shared \
object boundaries. Hence we need to explicitly specify that \

View File

@@ -39,6 +39,7 @@ Boston, MA 02111-1307, USA. */
builtin_define ("_X86_"); \
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
builtin_define ("__STDC_ISO_10646__=201103L"); \
builtin_assert ("system=haiku"); \
} \
while (0)

View File

@@ -47,6 +47,7 @@ Boston, MA 02111-1307, USA. */
builtin_define ("__x86_64__"); \
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
builtin_define ("__STDC_ISO_10646__=201103L"); \
builtin_assert ("system=haiku"); \
} \
while (0)
@@ -59,6 +60,7 @@ Boston, MA 02111-1307, USA. */
builtin_define ("__X86__"); \
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
builtin_define ("__STDC_ISO_10646__=201103L"); \
builtin_assert ("system=haiku"); \
} \
while (0)

View File

@@ -74,6 +74,7 @@ Boston, MA 02110-1301, USA. */
builtin_define_std ("mc68020"); \
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
builtin_define ("__STDC_ISO_10646__=201103L"); \
builtin_assert ("system=haiku"); \
} \
while (0)

View File

@@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */
builtin_define ("_MIPSEL_"); \
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
builtin_define ("__STDC_ISO_10646__=201103L"); \
builtin_assert ("system=haiku"); \
if (flag_pic) \
{ \

View File

@@ -40,6 +40,7 @@ Boston, MA 02111-1307, USA. */
builtin_define ("__powerpc__"); \
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
builtin_define ("__STDC_ISO_10646__=201103L"); \
builtin_assert ("system=haiku"); \
builtin_assert ("cpu=powerpc"); \
builtin_assert ("machine=powerpc"); \

View File

@@ -2121,8 +2121,8 @@ stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h
else :; fi
# Install the README
rm -f include/README
cp $(srcdir)/README-fixinc include/README
chmod a+r include/README
#cp $(srcdir)/README-fixinc include/README
#chmod a+r include/README
touch $@
# Now that float.h no longer depends upon enquire, this is actually a no-op.
@@ -2164,7 +2164,7 @@ stmp-fixinc: fixinc.sh gsyslimits.h
TARGET_MACHINE=$(target); srcdir=`cd $(srcdir); pwd`; \
INSTALL_ASSERT_H=$(INSTALL_ASSERT_H); SHELL=$(SHELL) ;\
export TARGET_MACHINE srcdir INSTALL_ASSERT_H SHELL ; \
$(SHELL) ./fixinc.sh `pwd`/include $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS)
#$(SHELL) ./fixinc.sh `pwd`/include $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS)
rm -f include/syslimits.h
if [ -f include/limits.h ]; then \
mv include/limits.h include/syslimits.h; \

View File

@@ -159,6 +159,7 @@ Boston, MA 02111-1307, USA. */
-D__stdcall=__attribute__((__stdcall__)) \
-D__cdecl=__attribute__((__cdecl__)) \
-D__declspec(x)=__attribute__((x)) \
-D__STDC_ISO_10646__=201103L \
-Asystem(haiku)"
#undef CPP_SPEC

View File

@@ -1 +1 @@
char *version_string = "2.95.3-haiku-100818";
char *version_string = "2.95.3-haiku-111122";