new development tools
This commit is contained in:
192
cross/init.sh
Executable file
192
cross/init.sh
Executable file
@@ -0,0 +1,192 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This file is part of Jehanne.
|
||||
#
|
||||
# Copyright (C) 2016 Giacomo Tesio <giacomo@tesio.it>
|
||||
#
|
||||
# Jehanne 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, version 2 of the License.
|
||||
#
|
||||
# Jehanne is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Jehanne. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if [ "$JEHANNE" = "" ]; then
|
||||
echo $0 requires the shell started by ./hacking/devshell.sh
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# WELLCOME TO HELL ! ! !
|
||||
#
|
||||
|
||||
# If you want to understand _WHY_ Jehanne exists, you should try to
|
||||
# create a GCC crosscompiler in Debian without requiring root access or Tex.
|
||||
# And this despite the extreme quality of Debian GNU/Linux!
|
||||
|
||||
# fetch all sources
|
||||
(cd src && fetch)
|
||||
|
||||
# To create a Jehanne version of GCC, we need specific OUTDATED versions
|
||||
# of Autotools that won't compile easily in a modern Linux distro.
|
||||
|
||||
function failOnError {
|
||||
# $1 -> exit status on a previous command
|
||||
# $2 -> task description
|
||||
if [ $1 -ne 0 ]; then
|
||||
echo "ERROR $2"
|
||||
exit $1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# build m4 1.4.14
|
||||
# - workaround a bug in lib/stdio.in.h, see http://lists.gnu.org/archive/html/bug-m4/2012-08/msg00008.html
|
||||
# - workaround a bug in src/m4.h, see https://bugs.archlinux.org/task/19829
|
||||
# both bugs exists thanks to changes in external code
|
||||
if [ ! -f tmp/bin/m4 ]; then
|
||||
(
|
||||
cd src/m4 &&
|
||||
sed -i '/_GL_WARN_ON_USE (gets/d' lib/stdio.in.h &&
|
||||
( grep -q '#include <sys/stat.h>' src/m4.h || sed -i 's:.*\#include <sys/types\.h>.*:&\n#include <sys/stat.h>:g' src/m4.h ) &&
|
||||
./configure --prefix=$JEHANNE/hacking/cross/tmp &&
|
||||
make && make install
|
||||
)
|
||||
failOnError $? "building m4"
|
||||
fi
|
||||
# build autoconf 2.64
|
||||
# - hack git-version-gen to avoid the -dirty flag in version on make
|
||||
# - autoreconf
|
||||
# - disable doc build
|
||||
# - disable man build
|
||||
if [ ! -f tmp/bin/autoconf ]; then
|
||||
(
|
||||
cd src/autoconf &&
|
||||
cp ../../patch/autoconf/build-aux/git-version-gen build-aux/git-version-gen &&
|
||||
autoreconf &&
|
||||
./configure --prefix=$JEHANNE/hacking/cross/tmp &&
|
||||
cp ../../patch/MakeNothing.in ../autoconf/doc/Makefile.in &&
|
||||
cp ../../patch/MakeNothing.in ../autoconf/man/Makefile.in &&
|
||||
make && make install
|
||||
)
|
||||
failOnError $? "building autoconf"
|
||||
fi
|
||||
# build automake 1.11.1
|
||||
# - autoreconf to avoid conflicts with installed automake
|
||||
# - automake; configure; make (that will fail) and then automake again
|
||||
# to workaround this hell
|
||||
# - disable doc build
|
||||
# - disable disable tests build
|
||||
if [ ! -f tmp/bin/automake ]; then
|
||||
(
|
||||
cd src/automake &&
|
||||
echo > doc/Makefile.am &&
|
||||
touch NEWS AUTHORS && autoreconf -i &&
|
||||
automake &&
|
||||
(./configure --prefix=$JEHANNE/hacking/cross/tmp && make; automake) &&
|
||||
./configure --prefix=$JEHANNE/hacking/cross/tmp &&
|
||||
cp ../../patch/MakeNothing.in doc/Makefile.in &&
|
||||
cp ../../patch/MakeNothing.in tests/Makefile.in &&
|
||||
make && make install
|
||||
)
|
||||
failOnError $? "building automake"
|
||||
fi
|
||||
# build libtool 2.4
|
||||
if [ ! -f tmp/bin/libtool ]; then
|
||||
(
|
||||
cd src/libtool &&
|
||||
./configure --prefix=$JEHANNE/hacking/cross/tmp &&
|
||||
make && make install
|
||||
)
|
||||
failOnError $? "building libtool"
|
||||
fi
|
||||
|
||||
# FINALLY! We have our OUTDATED autotools in tmp/bin
|
||||
export PATH=$JEHANNE/hacking/cross/tmp/bin:$PATH
|
||||
export CROSS_DIR=$JEHANNE/hacking/cross
|
||||
if [ "$BUILD_DIRS_ROOT" = "" ]; then
|
||||
export BUILD_DIRS_ROOT=$JEHANNE/hacking/cross/src
|
||||
fi
|
||||
if [ ! -d $BUILD_DIRS_ROOT ]; then
|
||||
mkdir $BUILD_DIRS_ROOT
|
||||
fi
|
||||
|
||||
function dynpatch {
|
||||
# $1 -> path from cross/src
|
||||
# $2 -> string to search
|
||||
( cd $JEHANNE/hacking/cross/src &&
|
||||
grep -q jehanne $1 ||
|
||||
sed -n -i -e "/$2/r ../patch/$1" -e '1x' -e '2,${x;p}' -e '${x;p}' $1
|
||||
)
|
||||
}
|
||||
|
||||
# Patch and build binutils
|
||||
if [ "$BINUTILS_BUILD_DIR" = "" ]; then
|
||||
export BINUTILS_BUILD_DIR=$BUILD_DIRS_ROOT/build-binutils
|
||||
fi
|
||||
if [ ! -d $BINUTILS_BUILD_DIR ]; then
|
||||
mkdir $BINUTILS_BUILD_DIR
|
||||
fi
|
||||
if [ ! -f toolchain/bin/x86_64-jehanne-ar ]; then
|
||||
(
|
||||
sed -i '/jehanne/b; /ELF_TARGET_ID/,/elf_backend_can_gc_sections/s/0x200000/0x1000 \/\/ jehanne hack/g' src/binutils/bfd/elf64-x86-64.c &&
|
||||
sed -i '/jehanne/b; s/| -tirtos/| -tirtos* | -jehanne/g' src/binutils/config.sub &&
|
||||
dynpatch 'binutils/bfd/config.bfd' '\# END OF targmatch.h' &&
|
||||
dynpatch 'binutils/gas/configure.tgt' ' i860-\*-\*)' &&
|
||||
( grep -q jehanne src/binutils/ld/configure.tgt || patch -p1 < patch/binutils/ld/configure.tgt ) &&
|
||||
cp patch/binutils/ld/emulparams/elf_x86_64_jehanne.sh src/binutils/ld/emulparams/ &&
|
||||
cp patch/binutils/ld/emulparams/elf_i386_jehanne.sh src/binutils/ld/emulparams/ &&
|
||||
dynpatch 'binutils/ld/Makefile.am' 'eelf_x86_64.c: ' &&
|
||||
(grep 'eelf_i386_jehanne.c \\' src/binutils/ld/Makefile.am || sed -i 's/.*ALL_EMULATION_SOURCES = \\.*/&\n\teelf_i386_jehanne.c \\/' src/binutils/ld/Makefile.am) &&
|
||||
(grep 'eelf_x86_64_jehanne.c \\' src/binutils/ld/Makefile.am || sed -i 's/.*ALL_64_EMULATION_SOURCES = \\.*/&\n\teelf_x86_64_jehanne.c \\/' src/binutils/ld/Makefile.am) &&
|
||||
cd src/binutils/ld && automake && cd ../ &&
|
||||
cd $BINUTILS_BUILD_DIR &&
|
||||
$CROSS_DIR/src/binutils/configure --disable-shared --enable-static --prefix=$JEHANNE/hacking/cross/toolchain --with-sysroot=$JEHANNE --target=x86_64-jehanne --enable-interwork --enable-multilib --disable-nls --disable-werror &&
|
||||
cp $CROSS_DIR/patch/MakeNothing.in $CROSS_DIR/src/binutils/bfd/doc/Makefile &&
|
||||
cp $CROSS_DIR/patch/MakeNothing.in $CROSS_DIR/src/binutils/bfd/po/Makefile &&
|
||||
cp $CROSS_DIR/patch/MakeNothing.in $CROSS_DIR/src/binutils/gas/doc/Makefile &&
|
||||
cp $CROSS_DIR/patch/MakeNothing.in $CROSS_DIR/src/binutils/binutils/doc/Makefile &&
|
||||
make MAKEINFO=true MAKEINFOHTML=true TEXI2DVI=true TEXI2PDF=true DVIPS=true &&
|
||||
make MAKEINFO=true MAKEINFOHTML=true TEXI2DVI=true TEXI2PDF=true DVIPS=true install
|
||||
)
|
||||
failOnError $? "building binutils"
|
||||
fi
|
||||
|
||||
# Patch and build gcc
|
||||
if [ "$GCC_BUILD_DIR" = "" ]; then
|
||||
export GCC_BUILD_DIR=$BUILD_DIRS_ROOT/build-gcc
|
||||
fi
|
||||
if [ ! -d $GCC_BUILD_DIR ]; then
|
||||
mkdir $GCC_BUILD_DIR
|
||||
fi
|
||||
(
|
||||
pwd &&
|
||||
( grep -q jehanne src/gcc/gcc/config.gcc || patch -p1 < patch/gcc/gcc/config.gcc ) &&
|
||||
cd src &&
|
||||
cp ../patch/gcc/contrib/download_prerequisites gcc/contrib/download_prerequisites &&
|
||||
( cd gcc && ./contrib/download_prerequisites ) &&
|
||||
dynpatch 'gcc/config.sub' '-none)' &&
|
||||
cp ../patch/gcc/gcc/config/jehanne.h gcc/gcc/config &&
|
||||
dynpatch 'gcc/libstdc++-v3/crossconfig.m4' ' \*)' &&
|
||||
cd gcc/libstdc++-v3 && autoconf -i && cd ../../ &&
|
||||
( pwd && grep -q jehanne gcc/libgcc/config.host ||
|
||||
sed -i -f ../patch/gcc/libgcc/config.host.sed gcc/libgcc/config.host
|
||||
) &&
|
||||
dynpatch 'gcc/fixincludes/mkfixinc.sh' 'i\?86-\*-cygwin\*' &&
|
||||
cd $GCC_BUILD_DIR &&
|
||||
$CROSS_DIR/src/gcc/configure --disable-shared --enable-static --target=x86_64-jehanne --prefix=$JEHANNE/hacking/cross/toolchain --with-sysroot=$JEHANNE --enable-languages=c,c++ &&
|
||||
make MAKEINFO=true MAKEINFOHTML=true TEXI2DVI=true TEXI2PDF=true DVIPS=true all-gcc all-target-libgcc &&
|
||||
make MAKEINFO=true MAKEINFOHTML=true TEXI2DVI=true TEXI2PDF=true DVIPS=true install-gcc install-target-libgcc
|
||||
# &&
|
||||
# make MAKEINFO=true MAKEINFOHTML=true TEXI2DVI=true TEXI2PDF=true DVIPS=true all-target-libstdc++-v3 &&
|
||||
# make MAKEINFO=true MAKEINFOHTML=true TEXI2DVI=true TEXI2PDF=true DVIPS=true install-target-libstdc++-v3
|
||||
)
|
||||
failOnError $? "building gcc"
|
||||
|
||||
# add sh
|
||||
ln -sf /bin/bash $JEHANNE/hacking/cross/toolchain/bin/x86_64-jehanne-sh
|
4
cross/patch/MakeNothing.in
Normal file
4
cross/patch/MakeNothing.in
Normal file
@@ -0,0 +1,4 @@
|
||||
all:
|
||||
echo "make all does nothing HERE"
|
||||
install:
|
||||
echo "make install does nothing HERE"
|
2
cross/patch/autoconf/build-aux/git-version-gen
Executable file
2
cross/patch/autoconf/build-aux/git-version-gen
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
echo "2.64" | tr -d '\012'
|
7
cross/patch/binutils/bfd/config.bfd
Normal file
7
cross/patch/binutils/bfd/config.bfd
Normal file
@@ -0,0 +1,7 @@
|
||||
#ifdef BFD64
|
||||
x86_64-*-jehanne*)
|
||||
targ_defvec=x86_64_elf64_vec
|
||||
targ_selvecs=i386_elf32_vec
|
||||
want64=true
|
||||
;;
|
||||
#endif
|
3
cross/patch/binutils/gas/configure.tgt
Normal file
3
cross/patch/binutils/gas/configure.tgt
Normal file
@@ -0,0 +1,3 @@
|
||||
i386-*-jehanne*) fmt=elf em=gnu ;;
|
||||
|
||||
|
8
cross/patch/binutils/ld/Makefile.am
Normal file
8
cross/patch/binutils/ld/Makefile.am
Normal file
@@ -0,0 +1,8 @@
|
||||
eelf_i386_jehanne.c: $(srcdir)/emulparams/elf_i386_jehanne.sh \
|
||||
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
${GENSCRIPTS} elf_i386_jehanne "$(tdir_elf_i386_jehanne)"
|
||||
|
||||
eelf_x86_64_jehanne.c: $(srcdir)/emulparams/elf_x86_64_jehanne.sh \
|
||||
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
${GENSCRIPTS} elf_x86_64_jehanne "$(tdir_elf_x86_64_jehanne)"
|
||||
|
25
cross/patch/binutils/ld/configure.tgt
Normal file
25
cross/patch/binutils/ld/configure.tgt
Normal file
@@ -0,0 +1,25 @@
|
||||
diff --git a/src/binutils/ld/configure.tgt b/src/binutils/ld/configure.tgt
|
||||
index 6b6bbf2..29b5f30 100644
|
||||
--- a/src/binutils/ld/configure.tgt
|
||||
+++ b/src/binutils/ld/configure.tgt
|
||||
@@ -383,6 +383,9 @@ x86_64-*-nacl*) targ_emul=elf32_x86_64_nacl
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
tdir_elf_i386_nacl=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
|
||||
;;
|
||||
+x86_64*-jehanne*) targ_emul=elf_x86_64_jehanne
|
||||
+ targ_extra_emuls="elf_i386_jehanne elf_x86_64 elf_i386"
|
||||
+ ;;
|
||||
i860-*-coff) targ_emul=coff_i860 ;;
|
||||
i860-stardent-sysv4* | i860-stardent-elf*)
|
||||
targ_emul=elf32_i860
|
||||
@@ -852,6 +855,10 @@ ia64-*-aix*)
|
||||
NATIVE_LIB_DIRS='/usr/local/lib /usr/lib/ia64l64 /lib /usr/lib'
|
||||
;;
|
||||
|
||||
+x86_64-*-jehanne*)
|
||||
+ NATIVE_LIB_DIRS='/arch/amd64/lib'
|
||||
+ ;;
|
||||
+
|
||||
sparc*-*-solaris2*)
|
||||
NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
|
||||
;;
|
4
cross/patch/binutils/ld/emulparams/elf_i386_jehanne.sh
Normal file
4
cross/patch/binutils/ld/emulparams/elf_i386_jehanne.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
. ${srcdir}/emulparams/elf_i386.sh
|
||||
GENERATE_SHLIB_SCRIPT=
|
||||
GENERATE_PIE_SCRIPT=yes
|
||||
ENTRY=_main
|
4
cross/patch/binutils/ld/emulparams/elf_x86_64_jehanne.sh
Normal file
4
cross/patch/binutils/ld/emulparams/elf_x86_64_jehanne.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
. ${srcdir}/emulparams/elf_x86_64.sh
|
||||
GENERATE_SHLIB_SCRIPT=
|
||||
GENERATE_PIE_SCRIPT=yes
|
||||
ENTRY=_main
|
3
cross/patch/gcc/config.sub
vendored
Normal file
3
cross/patch/gcc/config.sub
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
-jehanne*)
|
||||
os=-jehanne
|
||||
;;
|
71
cross/patch/gcc/contrib/download_prerequisites
Normal file
71
cross/patch/gcc/contrib/download_prerequisites
Normal file
@@ -0,0 +1,71 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Download some prerequisites needed by gcc.
|
||||
# Run this from the top level of the gcc source tree and the gcc
|
||||
# build will do the right thing.
|
||||
#
|
||||
# (C) 2010 Free Software Foundation
|
||||
#
|
||||
# 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 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
# If you want to build GCC with the Graphite loop optimizations,
|
||||
# set GRAPHITE_LOOP_OPT=yes to download optional prerequisties
|
||||
# ISL Library and CLooG.
|
||||
GRAPHITE_LOOP_OPT=yes
|
||||
|
||||
if [ ! -e gcc/BASE-VER ] ; then
|
||||
echo "You must run this script in the top level GCC source directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Necessary to build GCC.
|
||||
MPFR=mpfr-2.4.2
|
||||
GMP=gmp-4.3.2
|
||||
MPC=mpc-0.8.1
|
||||
|
||||
if [ ! -d $MPFR ]; then
|
||||
wget http://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/infrastructure/$MPFR.tar.bz2 || exit 1
|
||||
tar xjf $MPFR.tar.bz2 || exit 1
|
||||
ln -sf $MPFR mpfr || exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d $GMP ]; then
|
||||
wget http://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/infrastructure/$GMP.tar.bz2 || exit 1
|
||||
tar xjf $GMP.tar.bz2 || exit 1
|
||||
ln -sf $GMP gmp || exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d $MPC ]; then
|
||||
wget http://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/infrastructure/$MPC.tar.gz || exit 1
|
||||
tar xzf $MPC.tar.gz || exit 1
|
||||
ln -sf $MPC mpc || exit 1
|
||||
fi
|
||||
|
||||
# Necessary to build GCC with the Graphite loop optimizations.
|
||||
if [ "$GRAPHITE_LOOP_OPT" = "yes" ] ; then
|
||||
ISL=isl-0.12.2
|
||||
CLOOG=cloog-0.18.1
|
||||
|
||||
if [ ! -d $ISL ]; then
|
||||
wget http://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/infrastructure/$ISL.tar.bz2 || exit 1
|
||||
tar xjf $ISL.tar.bz2 || exit 1
|
||||
ln -sf $ISL isl || exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d $CLOOG ]; then
|
||||
wget http://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/infrastructure/$CLOOG.tar.gz || exit 1
|
||||
tar xzf $CLOOG.tar.gz || exit 1
|
||||
ln -sf $CLOOG cloog || exit 1
|
||||
fi
|
||||
fi
|
1
cross/patch/gcc/fixincludes/mkfixinc.sh
Normal file
1
cross/patch/gcc/fixincludes/mkfixinc.sh
Normal file
@@ -0,0 +1 @@
|
||||
*-jehanne* | \
|
31
cross/patch/gcc/gcc/config.gcc
Normal file
31
cross/patch/gcc/gcc/config.gcc
Normal file
@@ -0,0 +1,31 @@
|
||||
diff --git a/src/gcc/gcc/config.gcc b/src/gcc/gcc/config.gcc
|
||||
index f02ddbd..e5ebfe0 100644
|
||||
--- a/src/gcc/gcc/config.gcc
|
||||
+++ b/src/gcc/gcc/config.gcc
|
||||
@@ -862,6 +862,16 @@ case ${target} in
|
||||
tmake_file="$tmake_file vms/t-vmsnative"
|
||||
fi
|
||||
;;
|
||||
+*-*-jehanne*)
|
||||
+ gas=yes
|
||||
+ gnu_ld=yes
|
||||
+ default_use_cxa_atexit=yes
|
||||
+ case $target in
|
||||
+ x86_64-*)
|
||||
+ native_system_header_dir="/arch/amd64/include"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ ;;
|
||||
*-*-vxworks*)
|
||||
tmake_file=t-vxworks
|
||||
xm_defines=POSIX
|
||||
@@ -1347,6 +1357,9 @@ x86_64-*-darwin*)
|
||||
i[34567]86-*-elf*)
|
||||
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
|
||||
;;
|
||||
+x86_64-*-jehanne*)
|
||||
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h glibc-stdint.h i386/i386elf.h i386/x86-64.h jehanne.h"
|
||||
+ ;;
|
||||
x86_64-*-elf*)
|
||||
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
|
||||
;;
|
88
cross/patch/gcc/gcc/config/jehanne.h
Normal file
88
cross/patch/gcc/gcc/config/jehanne.h
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* This file is part of Jehanne.
|
||||
*
|
||||
* Copyright (C) 2016 Giacomo Tesio <giacomo@tesio.it>
|
||||
*
|
||||
* Jehanne 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, version 2 of the License.
|
||||
*
|
||||
* Jehanne is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Jehanne. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#undef TARGET_JEHANNE
|
||||
#define TARGET_JEHANNE 1
|
||||
|
||||
/* Default arguments you want when running x86_64-jehanne-gcc */
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC "-lc"
|
||||
|
||||
#undef STANDARD_STARTFILE_PREFIX
|
||||
#define STANDARD_STARTFILE_PREFIX "/arch/amd64/lib/"
|
||||
|
||||
#undef MD_STARTFILE_PREFIX
|
||||
#define MD_STARTFILE_PREFIX "/arch/amd64/lib/"
|
||||
|
||||
#undef GPLUSPLUS_INCLUDE_DIR
|
||||
#define GPLUSPLUS_INCLUDE_DIR "/posix/include/g++"
|
||||
|
||||
#undef GCC_INCLUDE_DIR
|
||||
#define GCC_INCLUDE_DIR "/posix/include/gcc"
|
||||
|
||||
/* Architecture specific header (u.h) goes here (from config.gcc) */
|
||||
#define ARCH_INCLUDE_DIR NATIVE_SYSTEM_HEADER_DIR
|
||||
|
||||
/* The default include dir is /sys/include but... */
|
||||
#define PORTABLE_INCLUDE_DIR "/sys/include"
|
||||
|
||||
/* ...we have to wrap libc.h and stdio.h with POSIX headers */
|
||||
#define POSIX_INCLUDE_DIR "/sys/include/apw"
|
||||
|
||||
#undef INCLUDE_DEFAULTS
|
||||
#define INCLUDE_DEFAULTS \
|
||||
{ \
|
||||
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 1, 0 }, \
|
||||
{ GCC_INCLUDE_DIR, 0, 0, 0, 1, 0 }, \
|
||||
{ POSIX_INCLUDE_DIR, 0, 0, 0, 1, 0 }, \
|
||||
{ ARCH_INCLUDE_DIR, 0, 0, 0, 1, 0 }, \
|
||||
{ PORTABLE_INCLUDE_DIR, 0, 0, 0, 1, 0 }, \
|
||||
{ ".", 0, 0, 0, 1, 0 }, \
|
||||
{ 0, 0, 0, 0, 0, 0 } \
|
||||
}
|
||||
|
||||
/* Files that are linked before user code.
|
||||
The %s tells gcc to look for these files in the library directory. */
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
|
||||
|
||||
/* Files that are linked after user code. */
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
|
||||
|
||||
/* Don't automatically add extern "C" { } around header files. */
|
||||
#undef NO_IMPLICIT_EXTERN_C
|
||||
#define NO_IMPLICIT_EXTERN_C 1
|
||||
|
||||
/* Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67132 */
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "unsigned int"
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE 32
|
||||
|
||||
#undef LINK_GCC_C_SEQUENCE_SPEC
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC "%G %L"
|
||||
|
||||
/* Additional predefined macros. */
|
||||
#undef TARGET_OS_CPP_BUILTINS
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do { \
|
||||
builtin_define ("__jehanne__"); \
|
||||
builtin_assert ("system=jehanne"); \
|
||||
} while(0);
|
||||
|
4
cross/patch/gcc/libgcc/config.host
Normal file
4
cross/patch/gcc/libgcc/config.host
Normal file
@@ -0,0 +1,4 @@
|
||||
x86_64-*-jehanne*)
|
||||
extra_parts="$extra_parts crtbegin.o crtend.o"
|
||||
tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
|
||||
;;
|
3
cross/patch/gcc/libgcc/config.host.sed
Normal file
3
cross/patch/gcc/libgcc/config.host.sed
Normal file
@@ -0,0 +1,3 @@
|
||||
/enable_execute_stack=enable-execute-stack-empty.c;/,/Configuration ${host} not supported/{
|
||||
/^case ${host} in$/r ../patch/gcc/libgcc/config.host
|
||||
}
|
6
cross/patch/gcc/libstdc++-v3/crossconfig.m4
Normal file
6
cross/patch/gcc/libstdc++-v3/crossconfig.m4
Normal file
@@ -0,0 +1,6 @@
|
||||
*-jehanne*)
|
||||
GLIBCXX_CHECK_COMPILER_FEATURES
|
||||
GLIBCXX_CHECK_LINKER_FEATURES
|
||||
GLIBCXX_CHECK_MATH_SUPPORT
|
||||
GLIBCXX_CHECK_STDLIB_SUPPORT
|
||||
;;
|
7
cross/src/.gitignore
vendored
Normal file
7
cross/src/.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
gcc
|
||||
binutils
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
m4
|
||||
build-*
|
62
cross/src/fetch.json
Normal file
62
cross/src/fetch.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"autoconf" : {
|
||||
"Upstream":"https://ftp.gnu.org/gnu/autoconf/autoconf-2.64.tar.bz2",
|
||||
"Digest": {
|
||||
"sha256":"872f4cadf12e7e7c8a2414e047fdff26b517c7f1a977d72433c124d0d3acaa85"
|
||||
},
|
||||
"Compress":"bzip2",
|
||||
"RemovePrefix": true,
|
||||
"Exclude": [
|
||||
]
|
||||
},
|
||||
"m4": {
|
||||
"Upstream":"https://ftp.gnu.org/gnu/m4/m4-1.4.14.tar.bz2",
|
||||
"Digest": {
|
||||
"sha256":"0885ffa93256353a96b1cf0bcbc4d639ed09953b687e6cc412c4048e656f4dd2"
|
||||
},
|
||||
"Compress":"bzip2",
|
||||
"RemovePrefix": true,
|
||||
"Exclude": [
|
||||
]
|
||||
},
|
||||
"automake": {
|
||||
"Upstream":"https://ftp.gnu.org/gnu/automake/automake-1.11.1.tar.bz2",
|
||||
"Digest": {
|
||||
"sha256":"5b159d3c0e0a1f87de71b68bcb9f1a1c49e9e71749c9b723f17e2e1e0295c7ae"
|
||||
},
|
||||
"Compress":"bzip2",
|
||||
"RemovePrefix": true,
|
||||
"Exclude": [
|
||||
]
|
||||
},
|
||||
"libtool": {
|
||||
"Upstream":"https://ftp.gnu.org/gnu/libtool/libtool-2.4.tar.gz",
|
||||
"Digest": {
|
||||
"sha256":"13df57ab63a94e196c5d6e95d64e53262834fe780d5e82c28f177f9f71ddf62e"
|
||||
},
|
||||
"Compress":"gzip",
|
||||
"RemovePrefix": true,
|
||||
"Exclude": [
|
||||
]
|
||||
},
|
||||
"binutils": {
|
||||
"Upstream":"https://ftp.gnu.org/gnu/binutils/binutils-2.26.tar.bz2",
|
||||
"Digest": {
|
||||
"sha256":"c2ace41809542f5237afc7e3b8f32bb92bc7bc53c6232a84463c423b0714ecd9"
|
||||
},
|
||||
"Compress":"bzip2",
|
||||
"RemovePrefix": true,
|
||||
"Exclude": [
|
||||
]
|
||||
},
|
||||
"gcc": {
|
||||
"Upstream":"https://ftp.gnu.org/gnu/gcc/gcc-4.9.4/gcc-4.9.4.tar.bz2",
|
||||
"Digest": {
|
||||
"sha256":"6c11d292cd01b294f9f84c9a59c230d80e9e4a47e5c6355f046bb36d4f358092"
|
||||
},
|
||||
"Compress":"bzip2",
|
||||
"RemovePrefix": true,
|
||||
"Exclude": [
|
||||
]
|
||||
}
|
||||
}
|
2
cross/tmp/.gitignore
vendored
Normal file
2
cross/tmp/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
3
cross/toolchain/.gitignore
vendored
Normal file
3
cross/toolchain/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
*
|
||||
!.gitignore
|
||||
|
Reference in New Issue
Block a user