Module Name: src
Committed By: kamil
Date: Sat May 13 23:51:39 UTC 2017
Modified Files:
src/tests/usr.bin/cc: t_hello.sh
Log Message:
Correct hellp_pic ATF test in usr.bin/cc
Drop "-dPIC", this is misspelled "-DPIC" option for libtool.
Enhance code example to be more pedantic.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/cc/t_hello.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/usr.bin/cc/t_hello.sh
diff -u src/tests/usr.bin/cc/t_hello.sh:1.3 src/tests/usr.bin/cc/t_hello.sh:1.4
--- src/tests/usr.bin/cc/t_hello.sh:1.3 Sun Apr 3 14:41:30 2016
+++ src/tests/usr.bin/cc/t_hello.sh Sat May 13 23:51:39 2017
@@ -1,4 +1,4 @@
-# $NetBSD: t_hello.sh,v 1.3 2016/04/03 14:41:30 gson Exp $
+# $NetBSD: t_hello.sh,v 1.4 2017/05/13 23:51:39 kamil Exp $
#
# Copyright (c) 2011 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -62,15 +62,16 @@ EOF
hello_pic_body() {
cat > test.c << EOF
#include <stdlib.h>
+int callpic(void);
int main(void) {callpic();exit(0);}
EOF
cat > pic.c << EOF
#include <stdio.h>
-int callpic(void) {printf("hello world\n");}
+int callpic(void) {printf("hello world\n");return 0;}
EOF
atf_check -s exit:0 -o ignore -e ignore \
- cc -fPIC -dPIC -shared -o libtest.so pic.c
+ cc -fPIC -shared -o libtest.so pic.c
atf_check -s exit:0 -o ignore -e ignore \
cc -o hello test.c -L. -ltest