43 lines
907 B
Bash
43 lines
907 B
Bash
#!/cmd/rc
|
|
if ( ~ 0 $#BUILD_INITIALIZED ) . $JEHANNE/arch/rc/lib/build/utils.rc
|
|
|
|
rm -f *.tag.*
|
|
|
|
TEST=`{ls *.c|grep -v libposix_}
|
|
|
|
CFLAGS=( \
|
|
-g \
|
|
-gdwarf-2 \
|
|
-ggdb \
|
|
-mcmodel=small \
|
|
-Wall \
|
|
-Wno-main \
|
|
-Wno-missing-braces \
|
|
-Wno-parentheses \
|
|
-Wno-unknown-pragmas \
|
|
-O2 \
|
|
-std=gnu11 \
|
|
)
|
|
|
|
# test without SIGCHILD emulation
|
|
mkdir -p $JEHANNE/arch/$ARCH/qa/lib/newlib/
|
|
for (f in $TEST) {
|
|
BINARY=`{basename $f|sed 's/\.c//'}
|
|
|
|
debuggable $CC $f libposix_customization.c -o $BINARY $STACKCHECK_CFLAGS $CFLAGS
|
|
debuggable mv $BINARY $JEHANNE/arch/$ARCH/qa/lib/newlib/
|
|
}
|
|
|
|
# test with SIGCHILD emulation
|
|
mkdir -p $JEHANNE/arch/$ARCH/qa/lib/newlib/sigchld/
|
|
for (f in $TEST) {
|
|
BINARY=`{basename $f|sed 's/\.c//'}
|
|
|
|
debuggable $CC $f libposix_sigchld.c -o $BINARY -DWITH_SIGCHLD $STACKCHECK_CFLAGS $CFLAGS
|
|
debuggable mv $BINARY $JEHANNE/arch/$ARCH/qa/lib/newlib/sigchld/
|
|
}
|
|
|
|
rm -f *.o
|
|
|
|
build testsuite/
|