Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/config.tests/unix/fvisibility.test

    r2 r846  
    55VERBOSE=$2
    66
     7CMDLINE=
     8
     9
    710RunCompileTest() {
    811    cat >>fvisibility.c << EOF
    9 __attribute__((visibility("default"))) void blah();
    10 #if !defined(__GNUC__)
    11 # error "Visiblility support requires GCC"
    12 #elif __GNUC__ < 4
    13 # error "GCC3 with backported visibility patch is known to miscompile Qt"
     12#if defined(__GNUC__)
     13#   if (__GNUC__ < 4)
     14#      error "GCC3 with backported visibility patch is known to miscompile Qt"
     15#   endif
     16__attribute((visibility("default"))) void blah();
     17#elif defined(__SUNPRO_CC)
     18#   if (__SUNPRO_CC < 0x0550)
     19#      error "SunStudio 8 or later is required for ELF visibility"
     20#   endif
     21__global void blah();
     22#else
     23#   error "GCC4+ or SunStudio 8+ are required to support ELF visibility"
    1424#endif
    1525EOF
    1626
    1727    if [ "$VERBOSE" = "yes" ] ; then
    18         "$COMPILER" -c -fvisibility=hidden fvisibility.c && FVISIBILITY_SUPPORT=yes
     28        "$COMPILER" -c $CMDLINE fvisibility.c && FVISIBILITY_SUPPORT=yes
    1929    else
    20         "$COMPILER" -c -fvisibility=hidden fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes
     30        "$COMPILER" -c $CMDLINE fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes
    2131    fi
    2232    rm -f fvisibility.c fvisibility.o
    2333}
    2434
     35
    2536case "$COMPILER" in
     37*g++*|*c++*)
     38    CMDLINE="-fvisibility=hidden"
     39    RunCompileTest
     40   ;;
     41
    2642aCC*)
    2743    ;;
     
    3551    *)
    3652        # the compile test works for the intel compiler because it mimics gcc's behavior
     53        CMDLINE="-fvisibility=hidden"
    3754        RunCompileTest
    3855        ;;
     
    4057    ;;
    4158
    42     *)
    43     RunCompileTest
    44     ;;
     59CC)
     60   # This should be SunStudio.  If not, it'll get caught.
     61   CMDLINE="-xldscope=hidden"
     62   RunCompileTest
     63   ;;
    4564esac
    4665
Note: See TracChangeset for help on using the changeset viewer.