diff options
author | Renato Botelho <renato@netgate.com> | 2017-02-23 06:28:41 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-02-23 06:28:41 -0300 |
commit | 82ceeb2ea625cd9bff60f2863b9a0830f55b7905 (patch) | |
tree | 263ca9347bf664a4489743f9302e699ce14de1df /contrib/netbsd-tests/share/mk | |
parent | 4a05f5440acda223e6a0ec5157bc32ecc0f09ff9 (diff) | |
parent | d20dd8b36e7a565be7bfbb22aade51c8ffd753e9 (diff) | |
download | FreeBSD-src-devel.zip FreeBSD-src-devel.tar.gz |
Merge remote-tracking branch 'origin/stable/10' into develdevel
Diffstat (limited to 'contrib/netbsd-tests/share/mk')
-rwxr-xr-x | contrib/netbsd-tests/share/mk/t_lib.sh | 8 | ||||
-rwxr-xr-x | contrib/netbsd-tests/share/mk/t_prog.sh | 8 | ||||
-rwxr-xr-x | contrib/netbsd-tests/share/mk/t_test.sh | 4 |
3 files changed, 19 insertions, 1 deletions
diff --git a/contrib/netbsd-tests/share/mk/t_lib.sh b/contrib/netbsd-tests/share/mk/t_lib.sh index 5f18e14..0187aa2 100755 --- a/contrib/netbsd-tests/share/mk/t_lib.sh +++ b/contrib/netbsd-tests/share/mk/t_lib.sh @@ -31,6 +31,12 @@ defaults__build_and_install_body() { create_c_module module1 first create_c_module module2 second + CC=gcc + if [ ! -e /usr/bin/gcc -a -e /usr/bin/clang ]; then + export HAVE_LLVM=yes + CC=clang + fi + cat >Makefile <<EOF LIB = two-modules SRCS = module1.c module2.c @@ -44,7 +50,7 @@ EOF atf_check -o ignore make install create_main_using_modules main.c module1.h:first module2.h:second - atf_check -o ignore gcc -I. -Lroot/usr/lib -o main main.c -ltwo-modules + atf_check -o ignore ${CC} -I. -Lroot/usr/lib -o main main.c -ltwo-modules atf_check -o inline:'module1\nmodule2\n' ./main } diff --git a/contrib/netbsd-tests/share/mk/t_prog.sh b/contrib/netbsd-tests/share/mk/t_prog.sh index d004070..e21f1f6 100755 --- a/contrib/netbsd-tests/share/mk/t_prog.sh +++ b/contrib/netbsd-tests/share/mk/t_prog.sh @@ -31,6 +31,10 @@ defaults__build_and_install_head() { atf_set "require.progs" "/usr/bin/mandoc" } defaults__build_and_install_body() { + if [ ! -e /usr/bin/gcc -a -e /usr/bin/clang ]; then + export HAVE_LLVM=yes + fi + cat >hello.c <<EOF #include <stdio.h> int main(void) { printf("Hello, test!\n"); return 0; } @@ -61,6 +65,10 @@ EOF atf_test_case without_man__build_and_install without_man__build_and_install_body() { + if [ ! -e /usr/bin/gcc -a -e /usr/bin/clang ]; then + export HAVE_LLVM=yes + fi + cat >hello.c <<EOF #include <stdio.h> int main(void) { printf("Hello, test!\n"); return 0; } diff --git a/contrib/netbsd-tests/share/mk/t_test.sh b/contrib/netbsd-tests/share/mk/t_test.sh index c8bb1f3..08681d8 100755 --- a/contrib/netbsd-tests/share/mk/t_test.sh +++ b/contrib/netbsd-tests/share/mk/t_test.sh @@ -34,6 +34,10 @@ # The second argument is the name of the test program, without an extension. # The corresponding source file must exist in the current directory. one_test() { + + if [ ! -e /usr/bin/gcc -a -e /usr/bin/clang ]; then + export HAVE_LLVM=yes + fi local lang="${1}"; shift local name="${1}"; shift |