summaryrefslogtreecommitdiff
path: root/tests/scripts/features/loadapi
diff options
context:
space:
mode:
authorJinWang An <jinwang.an@samsung.com>2021-12-28 15:15:18 +0900
committerJinWang An <jinwang.an@samsung.com>2021-12-28 15:15:18 +0900
commitb11e2699c7ec42e6d2fc0f4c940f14e7c89b3974 (patch)
tree14002517ee70130303762f511b4d1b50251267ca /tests/scripts/features/loadapi
parent0a1cba99f5ce73ae0cacdbf9ab1186137efd77f7 (diff)
downloadmake-b11e2699c7ec42e6d2fc0f4c940f14e7c89b3974.tar.gz
make-b11e2699c7ec42e6d2fc0f4c940f14e7c89b3974.tar.bz2
make-b11e2699c7ec42e6d2fc0f4c940f14e7c89b3974.zip
Imported Upstream version 4.3upstream/4.3
Diffstat (limited to 'tests/scripts/features/loadapi')
-rw-r--r--tests/scripts/features/loadapi13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/scripts/features/loadapi b/tests/scripts/features/loadapi
index 8c824c0..ba14928 100644
--- a/tests/scripts/features/loadapi
+++ b/tests/scripts/features/loadapi
@@ -6,6 +6,12 @@ $details = "Verify the different aspects of the shared object API.";
# Don't do anything if this system doesn't support "load"
exists $FEATURES{load} or return -1;
+my $cc = get_config('CC');
+if (! $cc) {
+ $verbose and print "Skipping load test: no CC defined\n";
+ return -1;
+}
+
# First build a shared object
# Provide both a default and non-default load symbol
@@ -72,7 +78,12 @@ testapi_gmk_setup ()
EOF
close($F) or die "close: testapi.c: $!\n";
-my $sobuild = "$CONFIG_FLAGS{CC} ".($srcdir? "-I$srcdir":'')." $CONFIG_FLAGS{CPPFLAGS} $CONFIG_FLAGS{CFLAGS} -shared -fPIC $CONFIG_FLAGS{LDFLAGS} -o testapi.so testapi.c";
+# Make sure we can compile
+
+my $cflags = get_config('CFLAGS');
+my $cppflags = get_config('CPPFLAGS');
+my $ldflags = get_config('LDFLAGS');
+my $sobuild = "$cc ".($srcdir? "-I$srcdir/src":'')." $cppflags $cflags -shared -fPIC $ldflags -o testapi.so testapi.c";
my $clog = `$sobuild 2>&1`;
if ($? != 0) {