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

[TEMP] circleci: testing the cross-compilation for aarch64-linux-gnu #2748

Closed

Conversation

masatake
Copy link
Member

@masatake masatake commented Dec 4, 2020

The change should be merged to #2742.

This is just a test for testing.

leleliu008 added 14 commits December 2, 2020 03:55
…make auto apped to *_PROGRAMS when generating the Makefile, but we want to use
there exists a ready-to-use macro called `AX_PROG_CXX_FOR_BUILD` which is provided by `ax_prog_cc_for_build.m4` and is widely used for supporting cross-compilation. this macro defined `CC_FOR_BUILD`, `CFLAGS_FOR_BUILD`, `CPPFLAGS_FOR_BUILD`, `LDFLAGS_FOR_BUILD`, `BUILD_EXEEXT` variables. user can set `CC_FOR_BUILD`、`CFLAGS_FOR_BUILD`、`CPPFLAGS_FOR_BUILD`、`LDFLAGS_FOR_BUILD` when cross-compiling. when native-compiling, `FOO_FOR_BUILD` is same as `FOO`. here is a example show you how to use these variables:

configure \
    --host=armv7a-linux-androideabi \
    --prefix=`pwd`/out \
    --enable-static \
    --disable-seccomp \
    CC=/usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi21-clang \
    CFLAGS='-v' \
    CPP='/usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi21-clang -E' \
    CPPFLAGS='-I/Users/leleliu008/.ndk-pkg/pkg/jansson/armeabi-v7a/include -I/Users/leleliu008/.ndk-pkg/pkg/libyaml/armeabi-v7a/include -I/Users/leleliu008/.ndk-pkg/pkg/libxml2/armeabi-v7a/include -I/Users/leleliu008/.ndk-pkg/pkg/libiconv/armeabi-v7a/include --sysroot /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -Qunused-arguments -Dftello=ftell -Dfseeko=fseek' \
    LDFLAGS='-L/Users/leleliu008/.ndk-pkg/pkg/jansson/armeabi-v7a/lib -L/Users/leleliu008/.ndk-pkg/pkg/libyaml/armeabi-v7a/lib -L/Users/leleliu008/.ndk-pkg/pkg/libxml2/armeabi-v7a/lib -L/Users/leleliu008/.ndk-pkg/pkg/libiconv/armeabi-v7a/lib --sysroot /usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/sysroot' \
    AR=/usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar \
    RANLIB=/usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ranlib \
    CC_FOR_BUILD=/usr/bin/cc \
    CFLAGS_FOR_BUILD='-v' \
    PKG_CONFIG_PATH=/Users/leleliu008/.ndk-pkg/pkg/libiconv/armeabi-v7a/lib/pkgconfig:/Users/leleliu008/.ndk-pkg/pkg/libxml2/armeabi-v7a/lib/pkgconfig:/Users/leleliu008/.ndk-pkg/pkg/libyaml/armeabi-v7a/lib/pkgconfig:/Users/leleliu008/.ndk-pkg/pkg/jansson/armeabi-v7a/lib/pkgconfig \
    PKG_CONFIG_LIBDIR=/Users/leleliu008/.ndk-pkg/pkg

ax_prog_cc_for_build.m4 has been downloaded from `http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_prog_cc_for_build.m4` and placed in m4 directory. to use aclocal from Automake to generate aclocal.m4, we must also set `ACLOCAL_AMFLAGS = -I m4` in top-level Makefile.am.

build packcc don't follow `The Uniform Naming Scheme`. because automake auto append `$(EXEEXT)` to `*_PROGRAMS` when generating the Makefile, but here we want to use `$(BUILD_EXEEXT)`. as we don't use `The Uniform Naming Scheme`, we must clean `packcc` and `packcc.exe` by myself.

References:
*https://www.gnu.org/software/autoconf-archive/ax_prog_cc_for_build.html
*https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Input.html
*https://www.gnu.org/software/automake/manual/html_node/Uniform.html
…make auto apped to *_PROGRAMS when generating the Makefile, but we want to use
@masatake
Copy link
Member Author

masatake commented Dec 4, 2020

I use this pull request for inspecting the Valgrind error reported in #2742.
"make units" should propagate the error reported by Valgrind.

@masatake masatake force-pushed the leleliu008-master+testing branch 3 times, most recently from 8f99ec8 to d6a674a Compare December 4, 2020 06:19
@coveralls
Copy link

coveralls commented Dec 4, 2020

Coverage Status

Coverage remained the same at 87.078% when pulling ae30b92 on masatake:leleliu008-master+testing into e52cf4a on universal-ctags:master.

@codecov
Copy link

codecov bot commented Dec 4, 2020

Codecov Report

Merging #2748 (ae30b92) into master (e52cf4a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2748   +/-   ##
=======================================
  Coverage   86.99%   86.99%           
=======================================
  Files         190      190           
  Lines       40450    40450           
=======================================
  Hits        35190    35190           
  Misses       5260     5260           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e52cf4a...ae30b92. Read the comment docs.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
@masatake
Copy link
Member Author

masatake commented Dec 5, 2020

The change is backported to the original pull request.

@masatake masatake closed this Dec 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants