-
Notifications
You must be signed in to change notification settings - Fork 632
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
[TEMP] circleci: testing the cross-compilation for aarch64-linux-gnu #2748
Conversation
…make auto apped to *_PROGRAMS when generating the Makefile, but we want to use
…'t need to delete it.
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
…'t need to delete it.
I use this pull request for inspecting the Valgrind error reported in #2742. |
8f99ec8
to
d6a674a
Compare
Codecov Report
@@ 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.
|
Signed-off-by: Masatake YAMATO <[email protected]>
d6a674a
to
ae30b92
Compare
The change is backported to the original pull request. |
The change should be merged to #2742.
This is just a test for testing.