build: x86_64 bootstrap build fixes and workaround.

* configure: Substitute @arch@ (WAS: ARCH).  Update users.
* configure.sh: Substitute @arch@.
* build-aux/build-mes.sh: Use $GUILE for x86_64 build.
* build-aux/install.sh.in: Install mes.S, mes.x86_64-mes-S too.
Prune *.E, *.out.
This commit is contained in:
Jan Nieuwenhuizen 2018-10-09 19:22:51 +02:00
parent 4ae2a111db
commit 33f37f2747
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
8 changed files with 20 additions and 17 deletions

View file

@ -107,9 +107,9 @@ fi
PREPROCESS=1 PREPROCESS=1
if [ ! -d "$MES_SEED" ] \ if [ ! -d "$MES_SEED" ] \
&& [ "$ARCH" = "i386" \ && [ "$arch" = "i386" \
-o "$ARCH" = "i586" \ -o "$arch" = "i586" \
-o "$ARCH" = "i686" ]; then -o "$arch" = "i686" ]; then
MES_ARENA=100000000 MES_ARENA=100000000
fi fi

View file

@ -107,13 +107,6 @@ fi
PREPROCESS=1 PREPROCESS=1
if [ ! -d "$MES_SEED" ] \
&& [ "$ARCH" = "i386" \
-o "$ARCH" = "i586" \
-o "$ARCH" = "i686" ]; then
MES_ARENA=100000000
fi
MES_ARENA=100000000 MES_ARENA=100000000
ARCHDIR=1 NOLINK=1 bash ${srcdest}build-aux/cc-x86_64-mes.sh lib/linux/x86_64-mes/crt1 ARCHDIR=1 NOLINK=1 bash ${srcdest}build-aux/cc-x86_64-mes.sh lib/linux/x86_64-mes/crt1

View file

@ -24,6 +24,7 @@ abs_top_srcdir="@abs_top_srcdir@"
abs_top_builddir="@abs_top_builddir@" abs_top_builddir="@abs_top_builddir@"
prefix=${prefix-@prefix@} prefix=${prefix-@prefix@}
VERSION=${VERSION-@VERSION@} VERSION=${VERSION-@VERSION@}
arch=${arch-@arch@}
. ${srcdest}build-aux/config.sh . ${srcdest}build-aux/config.sh
. ${srcdest}build-aux/trace.sh . ${srcdest}build-aux/trace.sh
@ -53,6 +54,6 @@ if [ -n "$TCC" ]; then
fi fi
sh ${srcdest}build-aux/build-mes.sh sh ${srcdest}build-aux/build-mes.sh
if [ "$MES" = guile ]; then if [ "$arch" = x86_64 -a "$GUILE" ]; then
sh ${srcdest}build-aux/build-x86_64-mes.sh MES=$GUILE sh ${srcdest}build-aux/build-x86_64-mes.sh
fi fi

View file

@ -58,6 +58,7 @@ export V
export abs_top_builddir export abs_top_builddir
export abs_top_srcdir export abs_top_srcdir
export arch
export datadir export datadir
export moduledir export moduledir
export prefix export prefix

View file

@ -48,8 +48,8 @@ ifdef DESTDIR
export DESTDIR export DESTDIR
endif endif
ifdef ARCH ifdef arch
export ARCH export arch
endif endif
ifdef CC ifdef CC

View file

@ -94,17 +94,22 @@ fi
mkdir -p $DESTDIR$MES_PREFIX mkdir -p $DESTDIR$MES_PREFIX
if [ -z "$srcdest" ]; then if [ -z "$srcdest" ]; then
tar -cf- include lib | tar -xf- -C $DESTDIR$MES_PREFIX tar -cf- --exclude='*.E' --exclude='*.*-out' include lib | tar -xf- -C $DESTDIR$MES_PREFIX
tar -cf- --exclude='*.go' module | tar -xf- -C $DESTDIR$MES_PREFIX tar -cf- --exclude='*.go' module | tar -xf- -C $DESTDIR$MES_PREFIX
tar -cf- --exclude='*.gcc*' --exclude='*.mes*' scaffold | tar -xf- -C $DESTDIR$MES_PREFIX tar -cf- --exclude='*.gcc*' --exclude='*.mes*' scaffold | tar -xf- -C $DESTDIR$MES_PREFIX
else else
tar -cf- -C ${srcdest} include lib | tar -xf- -C $DESTDIR$MES_PREFIX tar -cf- -C ${srcdest} include lib | tar -xf- -C $DESTDIR$MES_PREFIX
tar -cf- -C lib | tar -xf- -C $DESTDIR$MES_PREFIX tar -cf- -C lib --exclude='*.E' --exclude='*.*-out' | tar -xf- -C $DESTDIR$MES_PREFIX
tar -cf- -C ${srcdest} module | tar -xf- -C $DESTDIR$MES_PREFIX tar -cf- -C ${srcdest} module | tar -xf- -C $DESTDIR$MES_PREFIX
tar -cf- -C ${srcdest} scaffold | tar -xf- -C $DESTDIR$MES_PREFIX tar -cf- -C ${srcdest} scaffold | tar -xf- -C $DESTDIR$MES_PREFIX
fi fi
tar -cf- -C ${srcdest}mes module | tar -xf- -C $DESTDIR$MES_PREFIX tar -cf- -C ${srcdest}mes module | tar -xf- -C $DESTDIR$MES_PREFIX
cp src/mes.S $DESTDIR$MES_PREFIX/lib/x86-mes/mes.S
if [ -f src/mes.x86_64-mes-S ]; then
cp src/mes.x86_64-mes-S $DESTDIR$MES_PREFIX/lib/x86_64-mes/mes.S
fi
mkdir -p $DESTDIR$guile_site_dir mkdir -p $DESTDIR$guile_site_dir
mkdir -p $DESTDIR$guile_site_ccache_dir mkdir -p $DESTDIR$guile_site_ccache_dir
tar -cf- -C ${srcdest}module --exclude='*.go' . | tar -xf- -C $DESTDIR$guile_site_dir tar -cf- -C ${srcdest}module --exclude='*.go' . | tar -xf- -C $DESTDIR$guile_site_dir

3
configure vendored
View file

@ -423,7 +423,7 @@ Some influential environment variables:
(stdout "PACKAGE:=~a\n" PACKAGE) (stdout "PACKAGE:=~a\n" PACKAGE)
(stdout "VERSION:=~a\n" VERSION) (stdout "VERSION:=~a\n" VERSION)
(stdout "ARCH:=~a\n" arch) (stdout "arch:=~a\n" arch)
(stdout "build:=~a\n" build-type) (stdout "build:=~a\n" build-type)
(stdout "host:=~a\n" host-type) (stdout "host:=~a\n" host-type)
@ -481,6 +481,7 @@ Some influential environment variables:
("@guile_site_dir@" . ,guile-site-dir) ("@guile_site_dir@" . ,guile-site-dir)
("@guile_site_ccache_dir@" . ,guile-site-ccache-dir) ("@guile_site_ccache_dir@" . ,guile-site-ccache-dir)
("@VERSION@" . ,VERSION) ("@VERSION@" . ,VERSION)
("@arch@" . ,arch)
("mes/module/" . ,(string-append moduledir/))))) ("mes/module/" . ,(string-append moduledir/)))))
(for-each (lambda (o) (for-each (lambda (o)
(let* ((src (string-append srcdest o)) (let* ((src (string-append srcdest o))

View file

@ -60,6 +60,7 @@ moduledir=$(eval echo ${moduledir-$datadir/mes/module})
moduledir_="$moduledir/" moduledir_="$moduledir/"
guile_site_dir=$(eval echo ${guile_site_dir-$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION}) guile_site_dir=$(eval echo ${guile_site_dir-$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION})
guile_site_ccache_dir=$(eval echo ${guile_site_ccache_dir-$prefix/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache}) guile_site_ccache_dir=$(eval echo ${guile_site_ccache_dir-$prefix/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache})
arch=$(get_machine || uname -m)
subst () { subst () {
sed \ sed \
@ -74,6 +75,7 @@ subst () {
-e s,"@guile_site_dir@,$guile_site_dir,"\ -e s,"@guile_site_dir@,$guile_site_dir,"\
-e s,"@guile_site_ccache_dir@,$guile_site_ccache_dir,"\ -e s,"@guile_site_ccache_dir@,$guile_site_ccache_dir,"\
-e s,"@VERSION@,$VERSION,"\ -e s,"@VERSION@,$VERSION,"\
-e s,"@arch@,$arch,"\
-e s,"mes/module/,$moduledir/,"\ -e s,"mes/module/,$moduledir/,"\
$1 > $2 $1 > $2
} }