Index: uspace/app/dltest/dltest.c
===================================================================
--- uspace/app/dltest/dltest.c	(revision 97696ab1816deac19e577366523288ba111157cb)
+++ uspace/app/dltest/dltest.c	(revision 2112a79aa43a349dba940a1abbd738669af07398)
@@ -314,4 +314,6 @@
 }
 
+#ifndef STATIC_EXE
+
 /** Test calling a function that returns contents of a private initialized
  * fibril-local variable.
@@ -538,4 +540,6 @@
 }
 
+#endif /* STATIC_EXE */
+
 #ifdef DLTEST_LINKED
 
@@ -829,5 +833,5 @@
 }
 
-#endif
+#endif /* DLTEST_LINKED */
 
 static int test_dlfcn(void)
@@ -866,4 +870,5 @@
 		return 1;
 
+#ifndef STATIC_EXE
 	if (!test_dlfcn_dl_get_private_fib_var())
 		return 1;
@@ -883,4 +888,5 @@
 	if (!test_dlfcn_read_public_fib_uvar())
 		return 1;
+#endif /* STATIC_EXE */
 
 //	printf("dlclose()... ");
@@ -937,5 +943,5 @@
 }
 
-#endif
+#endif /* DLTEST_LINKED */
 
 static void print_syntax(void)
Index: uspace/app/dltests/Makefile
===================================================================
--- uspace/app/dltests/Makefile	(revision 97696ab1816deac19e577366523288ba111157cb)
+++ uspace/app/dltests/Makefile	(revision 2112a79aa43a349dba940a1abbd738669af07398)
@@ -35,2 +35,6 @@
 
 include $(USPACE_PREFIX)/Makefile.common
+
+ifeq ($(STATIC_BUILD), y)
+	EXTRA_CFLAGS += -DSTATIC_EXE
+endif
