summaryrefslogtreecommitdiffstats
path: root/config.tests/unix/fvisibility.test
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-11 06:32:04 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-11 06:32:04 (GMT)
commit8e72075b8333dcefaa7ddbaeb0bc7ae45d42ff1e (patch)
treeb8b69f812095df8bf780f88302c7784c4d2e18e0 /config.tests/unix/fvisibility.test
parent34450eb48e56677395601bf155a6a05752b326ad (diff)
parentdbfe5f81e300de3a43311197826f23ff031b4b23 (diff)
downloadQt-8e72075b8333dcefaa7ddbaeb0bc7ae45d42ff1e.zip
Qt-8e72075b8333dcefaa7ddbaeb0bc7ae45d42ff1e.tar.gz
Qt-8e72075b8333dcefaa7ddbaeb0bc7ae45d42ff1e.tar.bz2
Merge remote branch 'origin/master' into bearermanagement/integration
Conflicts: configure
Diffstat (limited to 'config.tests/unix/fvisibility.test')
-rwxr-xr-xconfig.tests/unix/fvisibility.test39
1 files changed, 29 insertions, 10 deletions
diff --git a/config.tests/unix/fvisibility.test b/config.tests/unix/fvisibility.test
index b2bcc07..99e6fbe 100755
--- a/config.tests/unix/fvisibility.test
+++ b/config.tests/unix/fvisibility.test
@@ -4,25 +4,41 @@ FVISIBILITY_SUPPORT=no
COMPILER=$1
VERBOSE=$2
+CMDLINE=
+
+
RunCompileTest() {
cat >>fvisibility.c << EOF
-__attribute__((visibility("default"))) void blah();
-#if !defined(__GNUC__)
-# error "Visiblility support requires GCC"
-#elif __GNUC__ < 4
-# error "GCC3 with backported visibility patch is known to miscompile Qt"
+#if defined(__GNUC__)
+# if (__GNUC__ < 4)
+# error "GCC3 with backported visibility patch is known to miscompile Qt"
+# endif
+__attribute((visibility("default"))) void blah();
+#elif defined(__SUNPRO_CC)
+# if (__SUNPRO_CC < 0x0550)
+# error "SunStudio 8 or later is required for ELF visibility"
+# endif
+__global void blah();
+#else
+# error "GCC4+ or SunStudio 8+ are required to support ELF visibility"
#endif
EOF
if [ "$VERBOSE" = "yes" ] ; then
- "$COMPILER" -c -fvisibility=hidden fvisibility.c && FVISIBILITY_SUPPORT=yes
+ "$COMPILER" -c $CMDLINE fvisibility.c && FVISIBILITY_SUPPORT=yes
else
- "$COMPILER" -c -fvisibility=hidden fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes
+ "$COMPILER" -c $CMDLINE fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes
fi
rm -f fvisibility.c fvisibility.o
}
+
case "$COMPILER" in
+gcc|g++)
+ CMDLINE="-fvisibility=hidden"
+ RunCompileTest
+ ;;
+
aCC*)
;;
@@ -34,14 +50,17 @@ icpc)
;;
*)
# the compile test works for the intel compiler because it mimics gcc's behavior
+ CMDLINE="-fvisibility=hidden"
RunCompileTest
;;
esac
;;
- *)
- RunCompileTest
- ;;
+CC)
+ # This should be SunStudio. If not, it'll get caught.
+ CMDLINE="-xldscope=hidden"
+ RunCompileTest
+ ;;
esac
# done