Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add armhf test for bionic and focal, #474

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
6 changes: 5 additions & 1 deletion .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"

Expand Down
11 changes: 9 additions & 2 deletions lisp/Makefile.LinuxARM
Original file line number Diff line number Diff line change
Expand Up @@ -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/')
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lisp/c/eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion lisp/c/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions lisp/c/reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion lisp/tool/gccls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down