new-build: get rid of Go(ogle) with few rc scripts

Also, in binutils: fix inlining compilation error,
see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242053
This commit is contained in:
2021-10-27 10:11:43 +02:00
parent 6b473cd28f
commit 0c2dabf975
50 changed files with 278 additions and 3978 deletions

View File

@@ -51,7 +51,7 @@ function dynpatch {
# setup Jehanne's headers
usyscalls header $JEHANNE/sys/src/sysconf.json > $JEHANNE/arch/amd64/include/syscalls.h
cat $JEHANNE/sys/src/lib/jehanne/syscallh.rc.template | template | rc | sed 's/ ,/,/g; s/ )/)/g' > $JEHANNE/arch/amd64/include/syscalls.h
mkdir -p $WORKING_DIR
date > $LOG
@@ -63,7 +63,7 @@ failOnError $? "libtool installation check"
cp -fpr $JEHANNE/hacking/cross/src $WORKING_DIR
cd $WORKING_DIR/src
fetch >> $LOG
./fetch.sh >> $LOG
failOnError $? "fetching sources"
mkdir -p $WORKING_DIR/build
@@ -76,10 +76,12 @@ echo -n Building binutils...
export BINUTILS_BUILD_DIR=$WORKING_DIR/build/binutils
mkdir -p $BINUTILS_BUILD_DIR
# for libctf/swap.h patch see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242053
( ( grep -q jehanne $WORKING_DIR/src/binutils/config.sub || (
cd $WORKING_DIR &&
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/| midnightbsd\*/| midnightbsd* | jehanne*/g' src/binutils/config.sub &&
sed -i 's/inline/static inline/g' src/binutils/libctf/swap.h &&
dynpatch 'binutils/bfd/config.bfd' '\# END OF targmatch.h' &&
dynpatch 'binutils/gas/configure.tgt' ' i386-\*-darwin\*)' &&
( grep -q jehanne src/binutils/ld/configure.tgt || patch -p1 < $CROSS_DIR/patch/binutils/ld/configure.tgt ) &&