Ticket #53605: patch-use-libcxx.diff

File patch-use-libcxx.diff, 1006 bytes (added by RJVB (René Bertin), 8 years ago)
  • g++spec.c

    old new  
    4646#endif
    4747
    4848#ifndef LIBSTDCXX
    49 #define LIBSTDCXX "stdc++"
     49#define LIBSTDCXX "c++"
     50#define LIBSTDCXXABI "c++abi"
    5051#endif
    51 #ifndef LIBSTDCXX_PROFILE
     52#undef LIBSTDCXX_PROFILE
    5253#define LIBSTDCXX_PROFILE LIBSTDCXX
    53 #endif
     54
    5455#ifndef LIBSTDCXX_STATIC
    55 #define LIBSTDCXX_STATIC NULL
     56// this is a hack, probably to be dropped on systems that have a new enough libc++
     57// which has `operator delete(void*, unsigned long)`
     58#define LIBSTDCXX_STATIC "stdc++"
    5659#endif
    5760
    5861void
     
    347350                       CL_DRIVER, &new_decoded_options[j]);
    348351      added_libraries++;
    349352      j++;
     353      // add -lc++abi
     354      generate_option (OPT_l, LIBSTDCXXABI, 1,
     355                       CL_DRIVER, &new_decoded_options[j]);
     356      added_libraries++;
     357      j++;
    350358      /* Add target-dependent static library, if necessary.  */
    351359      if ((static_link || library > 1) && LIBSTDCXX_STATIC != NULL)
    352360        {