diff options
author | Paul Smith <psmith@gnu.org> | 2013-10-19 15:39:15 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2013-10-19 15:39:15 -0400 |
commit | 107ab16bf6f0bb912aab2d72e019f20e11a03aba (patch) | |
tree | dbcf0e781246f3a52c323cd71d65ee2605c4a85f /tests/scripts/features/load | |
parent | 07f2666b91c0083a36135c9893305b2a620e3b38 (diff) | |
download | gunmake-107ab16bf6f0bb912aab2d72e019f20e11a03aba.tar.gz |
[SV 40240] Use configure info to build load test shared libs
* tests/config-flags.pm.in: A new file containing variable assignments
for the test suite; these variables are set by configure to contain
the values detected there for compilers, flags, etc.
* tests/run_make_tests.pl: Require the config-flags.pm file
* tests/scripts/features/load, tests/scripts/features/loadapi: Use the
configure-provided values when building the shared test library.
* configure.ac: Replace tests/config-flags.pm.in
* Makefile.am: Make sure tests/config-flags.pm is up to date
Diffstat (limited to 'tests/scripts/features/load')
-rw-r--r-- | tests/scripts/features/load | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/scripts/features/load b/tests/scripts/features/load index 2e3f263..05e9ddb 100644 --- a/tests/scripts/features/load +++ b/tests/scripts/features/load @@ -6,8 +6,6 @@ $details = "Test dynamic loading of modules."; # Don't do anything if this system doesn't support "load" exists $FEATURES{load} or return -1; -my $sobuild = '$(CC) '.($srcdir? "-I$srcdir":'').' -g -shared -fPIC -o $@ $<'; - # First build a shared object # Provide both a default and non-default load symbol @@ -39,7 +37,15 @@ EOF close($F) or die "close: testload.c: $!\n"; # Make sure we can compile -run_make_test('testload.so: testload.c ; @'.$sobuild, '', ''); +# CONFIG_FLAGS are loaded from config-flags.pm and set by configure + +my $sobuild = "$CONFIG_FLAGS{CC} ".($srcdir? "-I$srcdir":'')." $CONFIG_FLAGS{CPPFLAGS} $CONFIG_FLAGS{CFLAGS} -shared -fPIC $CONFIG_FLAGS{LDFLAGS} -o testload.so testload.c"; + +my $clog = `$sobuild 2>&1`; +if ($? != 0) { + $verbose and print "Failed to build testload.so:\n$sobuild\n$_"; + return -1; +} # TEST 1 run_make_test(q! |