Ticket #53605: patch-use-libcxx.2.diff

File patch-use-libcxx.2.diff, 1.4 KB (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        {
  • incpath.c

    old new  
    129129  int relocated = cpp_relocated ();
    130130  size_t len;
    131131
     132  if (cxx_stdinc) {
     133      add_path (xstrdup ("@PREFIX@/libexec/llvm-3.9/include/c++/v1"), SYSTEM, true, false);
     134  }
    132135  if (iprefix && (len = cpp_GCC_INCLUDE_DIR_len) != 0)
    133136    {
    134137      /* Look for directories that start with the standard prefix.