diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index deebc8fb7..a96e01763 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -27,6 +27,8 @@ jobs: ROS_DISTRO: noetic - DOCKER_IMAGE: osrf/ubuntu_armhf:trusty - DOCKER_IMAGE: osrf/ubuntu_armhf:xenial + - DOCKER_IMAGE: osrf/ubuntu_armhf:bionic + - DOCKER_IMAGE: osrf/ubuntu_armhf:focal - DOCKER_IMAGE: osrf/ubuntu_arm64:trusty - DOCKER_IMAGE: osrf/ubuntu_arm64:xenial - DOCKER_IMAGE: osrf/ubuntu_arm64:bionic @@ -82,10 +84,12 @@ jobs: export ROS_DISTRO=${{matrix.ROS_DISTRO}} export QEMU=${{matrix.QEMU}} export MAKEFLAGS="-j4" + if [[ "$DOCKER_IMAGE" == *"armhf"* ]]; then sudo add-apt-repository -y ppa:canonical-server/server-backports; fi # install qemu 6.0 to fix segfault / https://askubuntu.com/a/1344079 + if [[ "$QEMU" != "" || "$DOCKER_IMAGE" == *"arm"* ]]; then sudo apt update -y -qq; fi if [[ "$QEMU" != "" ]]; then sudo apt-get install -y -qq qemu-user-static; ls /usr/bin/qemu-*-static; export QEMU_VOLUME="-v /usr/bin/qemu-$QEMU-static:/usr/bin/qemu-$QEMU-static" ; fi if [[ "$QEMU" != "" ]]; then docker run --rm --privileged multiarch/qemu-user-static:register; fi if [[ "$DOCKER_IMAGE" == *"arm"* ]]; then sudo apt-get install -y -qq qemu-user-static; fi - if [[ "$DOCKER_IMAGE" == *"arm"* ]]; then git clone http://github.com/euslisp/jskeus ${HOME}/jskeus; fi + if [[ "$DOCKER_IMAGE" == *"arm"* ]]; then git clone http://github.com/k-okada/jskeus ${HOME}/jskeus -b armhf_focal; fi echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME on $QEMU_VOLUME" docker run --rm $QEMU_VOLUME -v $HOME:$HOME -e "QEMU=$QEMU" -e "TRAVIS_OS_NAME=$TRAVIS_OS_NAME" -e "CI_SOURCE_PATH=$CI_SOURCE_PATH" -e "HOME=$HOME" -e "MAKEFLAGS=$MAKEFLAGS" -e "DOCKER_IMAGE=$DOCKER_IMAGE" -t $DOCKER_IMAGE sh -c "cd $CI_SOURCE_PATH; ./.travis.sh" diff --git a/lisp/Makefile.LinuxARM b/lisp/Makefile.LinuxARM index 2929dcd21..1fe1abfad 100644 --- a/lisp/Makefile.LinuxARM +++ b/lisp/Makefile.LinuxARM @@ -36,7 +36,14 @@ XVERSION=X_V11R6_1 #MACHINE=armv6 #MACHINE=armv5te -MACHINE=$(shell uname -m | sed 's/\(armv[0-9]\).*/\1/') +GCC_MACHINE=$(shell gcc -dumpmachine) +$(info "-- GCC_MACHINE = ${GCC_MACHINE}") +ifneq (, $(findstring aarch64,$(GCC_MACHINE))) + MACHINE=aarch64 +else ifneq (, $(findstring arm,$(GCC_MACHINE))) + MACHINE=armv7 +endif +$(info "-- MACHINE = ${MACHINE}") GCC_MAJOR_VERSION=$(shell gcc -dumpversion | sed -e 's/\([0-9]\)\.\([0-9]\)\([\.0-9]*\)/\1/') GCC_MINOR_VERSION=$(shell gcc -dumpversion | sed -e 's/\([0-9]\)\.\([0-9]\)\([\.0-9]*\)/\2/') @@ -104,7 +111,7 @@ THREADDEP=mthread_posix.c #THREADDEP=pthreads.c # If you don't like optimization, comment out the next line. -OFLAGS=-O2 +OFLAGS=-O2 -fno-tree-vrp # link-editor's default flags ?-rdynamic SOFLAGS= -shared -Xlinker -build-id diff --git a/lisp/c/eval.c b/lisp/c/eval.c index 400625124..1b3f8665f 100644 --- a/lisp/c/eval.c +++ b/lisp/c/eval.c @@ -1111,8 +1111,8 @@ pointer args[]; double f; if (code->c.fcode.entry2 != NIL) { - ifunc = (eusinteger_t (*)())((((eusinteger_t)ifunc)&0xffffffff00000000) - | (intval(code->c.fcode.entry2)&0x00000000ffffffff)); + ifunc = (eusinteger_t (*)())((((eusinteger_t)ifunc)&0xffff0000) + | (intval(code->c.fcode.entry2)&0x0000ffff)); /* R.Hanai 090726 */ } while (iscons(paramtypes)) { diff --git a/lisp/c/memory.c b/lisp/c/memory.c index a00641baa..a73cc0de1 100644 --- a/lisp/c/memory.c +++ b/lisp/c/memory.c @@ -83,6 +83,7 @@ register int k; set_heap_range((unsigned int)cp, (unsigned int)cp + (s+2)*sizeof(pointer)+(sizeof(pointer)-1)); #endif + if (cp==NULL) return(ERR); /*can't allocate new memory*/ #if Linux || Cygwin || Darwin if (minmemory > (char *)cp) minmemory = (char *)cp; if (maxmemory < (char *)sbrk(0)) maxmemory = (char *)sbrk(0); @@ -91,7 +92,6 @@ register int k; maxmemory=(char *)sbrk(0); #endif if (QDEBUG && debug) fprintf(stderr,";; maxmemory=%p\n",maxmemory); - if (cp==NULL) return(ERR); /*can't allocate new memory*/ #if alpha if( chunklist == NULL ) { top_addr = (eusinteger_t)cp; diff --git a/lisp/c/reader.c b/lisp/c/reader.c index 946b432a2..08e1dfbe5 100644 --- a/lisp/c/reader.c +++ b/lisp/c/reader.c @@ -640,8 +640,8 @@ char token[]; subchar=to_upper(ch); macrofunc=Spevalof(QREADTABLE)->c.rdtab.dispatch->c.vec.v[subchar]; if (macrofunc==NIL) error(E_USER,(pointer)"no # macro defined"); - if (isint(macrofunc)) { /*internal macro*/ - intmac=(pointer (*)())(intval(macrofunc)); + if (isint(macrofunc)||isbignum(macrofunc)) { /*internal macro*/ + intmac=(pointer (*)())(bigintval(macrofunc)); result=(*intmac)(ctx,f,val,subchar,token);} else { vpush(f); vpush(makeint(subchar)); vpush(makeint(val)); @@ -991,8 +991,8 @@ register pointer ins; case ch_termmacro: case ch_nontermacro: macrofunc=Spevalof(QREADTABLE)->c.rdtab.macro->c.vec.v[ch]; if (macrofunc==NIL) error(E_USER,(pointer)"no char macro defined"); - if (isint(macrofunc)) { /*internal macro*/ - intmac=(pointer (*)())(intval(macrofunc)); + if (isint(macrofunc)||isbignum(macrofunc)) { /*internal macro*/ + intmac=(pointer (*)())(bigintval(macrofunc)); result=(*intmac)(ctx,ins,ch,token);} else { vpush(ins); vpush(makeint(ch)); diff --git a/lisp/tool/gccls.c b/lisp/tool/gccls.c index d6979af49..bc93aab3f 100644 --- a/lisp/tool/gccls.c +++ b/lisp/tool/gccls.c @@ -29,7 +29,7 @@ int main(argc,argv) int argc; char *argv[]; { - char *lispfn, cfn[128], hfn[128], tempfn[128], catcom[256], entryname[128]; + char *lispfn, cfn[128], hfn[128], tempfn[128], catcom[512], entryname[128]; FILE *in, *out; char *s, *d, ch; int i,j,k, string_count;