mirror of
https://review.haiku-os.org/buildtools
synced 2026-02-05 08:23:14 +01:00
Compare commits
10 Commits
btrev38375
...
btrev39409
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e30b3120c | ||
|
|
5c3390ac15 | ||
|
|
d436eaa1b8 | ||
|
|
4813397466 | ||
|
|
d1a8102665 | ||
|
|
5e6384156e | ||
|
|
7eb32704ba | ||
|
|
b4eb6056d7 | ||
|
|
3019b27ced | ||
|
|
3f8e71737b |
@@ -1,19 +1,22 @@
|
||||
How to build gcc-4.3 natively on Haiku:
|
||||
How to build gcc-4.4 natively on Haiku:
|
||||
|
||||
checkout the buildtools from the haiku repository
|
||||
cd into the buildtools folder (where this file lives)
|
||||
|
||||
declare the current gcc-version-date like this:
|
||||
export GCCDATE=100421
|
||||
(just use the current date instead of '100421')
|
||||
export GCCVERSION=gcc-4.4.4-haiku-${GCCDATE}
|
||||
(just use the current date instead of '100421' and the current gcc version
|
||||
instead of '4.4.4')
|
||||
|
||||
compile binutils:
|
||||
|
||||
mkdir binutils-obj
|
||||
cd binutils-obj
|
||||
CFLAGS="-O2" CXXFLAGS="-O2" ../binutils/configure \
|
||||
--prefix=/boot/develop/abi/x86/gcc4/tools/gcc-4.3.3-haiku-${GCCDATE} \
|
||||
--disable-nls --enable-shared=yes
|
||||
--prefix=/boot/develop/abi/x86/gcc4/tools/${GCCVERSION} \
|
||||
--disable-nls --enable-shared=yes \
|
||||
--with-htmldir=html-docs
|
||||
make -j2
|
||||
cd ..
|
||||
|
||||
@@ -22,21 +25,20 @@ compile gcc:
|
||||
mkdir gcc-obj
|
||||
cd gcc-obj
|
||||
CFLAGS="-O2" CXXFLAGS="-O2" ../gcc/configure \
|
||||
--prefix=/boot/develop/abi/x86/gcc4/tools/gcc-4.3.3-haiku-${GCCDATE} \
|
||||
--prefix=/boot/develop/abi/x86/gcc4/tools/${GCCVERSION} \
|
||||
--enable-shared --enable-languages=c,c++ \
|
||||
--disable-nls --without-libiconv-prefix --disable-libstdcxx-pch
|
||||
--disable-nls --without-libiconv-prefix --disable-libstdcxx-pch \
|
||||
--with-htmldir=html-docs
|
||||
make -j2 bootstrap
|
||||
cd ..
|
||||
|
||||
Ok, now everything is compiled and ready, waiting to be installed:
|
||||
|
||||
mkdir /boot/develop/abi/x86/gcc4/tools/gcc-4.3.3-haiku-${GCCDATE}
|
||||
mkdir /boot/develop/abi/x86/gcc4/tools/${GCCVERSION}
|
||||
cd binutils-obj
|
||||
make install
|
||||
cd ..
|
||||
cd gcc-obj
|
||||
make install
|
||||
cd ..
|
||||
ln -sfn gcc-4.3.3-haiku-${GCCDATE} /boot/develop/abi/x86/gcc4/tools/current
|
||||
make install install-html
|
||||
cd ../gcc-obj
|
||||
make install install-html
|
||||
ln -sfn ${GCCVERSION} /boot/develop/abi/x86/gcc4/tools/current
|
||||
|
||||
Please send questions & bug-reports to: Oliver Tappe <gcc@hirschkaefer.de>
|
||||
|
||||
158
build-gcc4-optional-package-Haiku.sh
Executable file
158
build-gcc4-optional-package-Haiku.sh
Executable file
@@ -0,0 +1,158 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Builds an GCC (optional) package from the sources.
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "Usage: $0 [ <options> ] <gcc date>"
|
||||
}
|
||||
|
||||
|
||||
# get the relevant directories
|
||||
currentDir=`pwd`
|
||||
cd `dirname "$0"`
|
||||
buildtoolsDir=`pwd`
|
||||
cd "$currentDir"
|
||||
|
||||
binutilsSources="$buildtoolsDir/binutils"
|
||||
gccSources="$buildtoolsDir/gcc"
|
||||
|
||||
buildDir="$currentDir/gcc-objects"
|
||||
binutilsBuildDir="$buildDir/binutils"
|
||||
gccBuildDir="$buildDir/gcc"
|
||||
|
||||
|
||||
# parse the arguments
|
||||
jobArgs=
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-h|--help) usage; exit 0;;
|
||||
-j*) jobArgs="$1"; shift 1;;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
|
||||
# get the GCC date
|
||||
if [ $# -ne 1 ]; then
|
||||
usage >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
gccDate=$1
|
||||
|
||||
case "$gccDate" in
|
||||
[0-9][0-9][0-9][0-9][0-9][0-9]) true;;
|
||||
*) echo "Invalid GCC date string '$gccDate'." >&2; exit 1;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
# get the GCC version
|
||||
gccVersion=`cat $gccSources/gcc/BASE-VER`
|
||||
if [ -z "$gccVersion" ]; then
|
||||
echo "Failed to get GCC version." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
gccVersionedName=gcc-${gccVersion}-haiku-${gccDate}
|
||||
|
||||
|
||||
# get the architecture
|
||||
gccArch=`uname -m`
|
||||
case $gccArch in
|
||||
BePC) gccArch=x86;;
|
||||
*) echo "Unsupported architecture: '$gccArch'" >&2; exit 1;;
|
||||
esac
|
||||
|
||||
|
||||
# check whether the installation dir does already exit
|
||||
installDir=/boot/develop/abi/$gccArch/gcc4/tools/$gccVersionedName
|
||||
if [ -e "$installDir" ]; then
|
||||
echo "The installation directory '$installDir' does already exist." >&2
|
||||
echo "Remove it first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# print some info before we start the action
|
||||
echo "Building binutils and gcc optional packages from the source."
|
||||
echo "sources: $buildtoolsDir"
|
||||
echo "build dir: $buildDir"
|
||||
echo "GCC date: $gccDate"
|
||||
echo "GCC version: $gccVersion"
|
||||
echo "install dir: $installDir"
|
||||
echo
|
||||
echo "This is going to take a while ..."
|
||||
sleep 3
|
||||
|
||||
|
||||
# From now on fail, if anything goes wrong.
|
||||
set -o errexit
|
||||
|
||||
|
||||
# remove and recreate the build directories
|
||||
rm -rf "$buildDir"
|
||||
mkdir -p "$binutilsBuildDir" "$gccBuildDir"
|
||||
|
||||
|
||||
# build and install the binutils
|
||||
cd "$binutilsBuildDir"
|
||||
CFLAGS="-O2" CXXFLAGS="-O2" "$binutilsSources/configure" \
|
||||
--prefix="$installDir" --disable-nls --enable-shared=yes \
|
||||
--with-htmldir=html-docs
|
||||
make $jobArgs
|
||||
make install install-html
|
||||
|
||||
|
||||
# build and install gcc
|
||||
cd "$gccBuildDir"
|
||||
CFLAGS="-O2" CXXFLAGS="-O2" "$gccSources/configure" \
|
||||
--prefix="$installDir" --enable-shared --enable-languages=c,c++ \
|
||||
--disable-nls --without-libiconv-prefix --disable-libstdcxx-pch \
|
||||
--with-htmldir=html-docs
|
||||
make $jobArgs bootstrap
|
||||
make install install-html
|
||||
|
||||
|
||||
# remove installed stuff we don't want
|
||||
rm -rf "$installDir/info" "$installDir/man" "$installDir/share" \
|
||||
"$installDir/lib/libstdc++.so"
|
||||
|
||||
|
||||
# add C++ header symlink
|
||||
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)
|
||||
packageFile="$currentDir/gcc-${gccVersion}-${gccArch}-gcc4-${gccVersionYear}-${gccVersionMonth}-${gccVersionDay}.zip"
|
||||
|
||||
cd /boot
|
||||
zip -ry "$packageFile" `echo $installDir | cut -d/ -f3-`
|
||||
|
||||
|
||||
# add the "current" version symlink
|
||||
cd "$buildDir"
|
||||
mkdir -p develop/abi/x86/gcc4/tools/
|
||||
ln -s $gccVersionedName develop/abi/x86/gcc4/tools/current
|
||||
zip -y "$packageFile" develop/abi/x86/gcc4/tools/current
|
||||
|
||||
|
||||
# add the optional package description
|
||||
cd "$buildDir"
|
||||
echo "Package: GCC
|
||||
Version: ${gccVersion}-haiku-${gccDate}
|
||||
Copyright: 1988-2010 Free Software Foundation, Inc.
|
||||
License: GNU GPL v3
|
||||
License: GNU LGPL v3
|
||||
URL: http://www.gnu.org/software/gcc/
|
||||
" > .OptionalPackageDescription
|
||||
|
||||
zip "$packageFile" .OptionalPackageDescription
|
||||
|
||||
|
||||
# clean up
|
||||
cd "$currentDir"
|
||||
rm -rf "$buildDir"
|
||||
@@ -1,7 +1,7 @@
|
||||
# Makefile for jam
|
||||
|
||||
CC = cc
|
||||
CFLAGS =
|
||||
CFLAGS = -O3
|
||||
EXENAME = ./jam0
|
||||
TARGET = -o $(EXENAME)
|
||||
HOST_SYSTEM=$(shell uname)
|
||||
|
||||
@@ -464,7 +464,7 @@
|
||||
*/
|
||||
|
||||
# ifndef MAXLINE
|
||||
# define MAXLINE 40960 /* longest 'together' actions' */
|
||||
# define MAXLINE 51200 /* longest 'together' actions' */
|
||||
# endif
|
||||
|
||||
# ifndef EXITOK
|
||||
|
||||
@@ -141,9 +141,9 @@ M4 = `if [ -f $$r/m4/m4 ] ; \
|
||||
then echo $$r/m4/m4 ; \
|
||||
else echo ${DEFAULT_M4} ; fi`
|
||||
|
||||
MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
|
||||
then echo $$r/texinfo/makeinfo/makeinfo ; \
|
||||
else echo makeinfo ; fi`
|
||||
MAKEINFO = `if [ -x /usr/bin/makeinfo ] ; \
|
||||
then echo makeinfo ; \
|
||||
else echo $$r/texinfo/makeinfo/makeinfo ; fi`
|
||||
|
||||
# This just becomes part of the MAKEINFO definition passed down to
|
||||
# sub-makes. It lets flags be given on the command line while still
|
||||
|
||||
1569
legacy/gcc/config.guess
vendored
1569
legacy/gcc/config.guess
vendored
File diff suppressed because it is too large
Load Diff
912
legacy/gcc/config.sub
vendored
912
legacy/gcc/config.sub
vendored
File diff suppressed because it is too large
Load Diff
@@ -139,7 +139,9 @@ const int x86_deep_branch = m_PPRO| m_K6;
|
||||
#define AT_BP(mode) (gen_rtx_MEM ((mode), frame_pointer_rtx))
|
||||
|
||||
extern FILE *asm_out_file;
|
||||
#ifndef __APPLE__
|
||||
extern char *strcat ();
|
||||
#endif
|
||||
|
||||
static void ix86_epilogue PROTO((int));
|
||||
static void ix86_prologue PROTO((int));
|
||||
|
||||
4
legacy/gcc/gcc/configure
vendored
4
legacy/gcc/gcc/configure
vendored
@@ -3597,6 +3597,10 @@ for machine in $build $host $target; do
|
||||
tm_file=i386/freebsd.h
|
||||
tmake_file=t-freebsd
|
||||
;;
|
||||
i[34567]86-*-darwin*)
|
||||
tm_file=i386/freebsd.h
|
||||
tmake_file=t-freebsd
|
||||
;;
|
||||
i[34567]86-*-netbsd*)
|
||||
tm_file=i386/netbsd.h
|
||||
tmake_file=t-netbsd
|
||||
|
||||
@@ -1205,6 +1205,12 @@ changequote([,])dnl
|
||||
tm_file=i386/freebsd.h
|
||||
tmake_file=t-freebsd
|
||||
;;
|
||||
changequote(,)dnl
|
||||
i[34567]86-*-darwin*)
|
||||
changequote([,])dnl
|
||||
tm_file=i386/freebsd.h
|
||||
tmake_file=t-freebsd
|
||||
;;
|
||||
changequote(,)dnl
|
||||
i[34567]86-*-netbsd*)
|
||||
changequote([,])dnl
|
||||
|
||||
@@ -1 +1 @@
|
||||
char *version_string = "2.95.3-haiku-100712";
|
||||
char *version_string = "2.95.3-haiku-100818";
|
||||
|
||||
Reference in New Issue
Block a user