Ignore:
Timestamp:
Sep 10, 2006, 1:58:27 AM (19 years ago)
Author:
bird
Message:

Link libstdc++ into the libc dll. Fixes #124.

Location:
branches/libc-0.6/src/gcc/gcc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/libc-0.6/src/gcc/gcc/config/i386/emx-libgcc_so_d.def

    r2003 r2814  
    11; Auto-generated file, DO NOT EDIT!!! (see libgcc_d.awk) */
    2 LIBRARY libc06b5 INITINSTANCE TERMINSTANCE
     2LIBRARY libc062 INITINSTANCE TERMINSTANCE
    33EXPORTS
    44EXPORTS
  • branches/libc-0.6/src/gcc/gcc/config/i386/emx.h

    r2249 r2814  
    406406*-----------------------------------------------------------------------------*/
    407407
    408 /* Predefine symbols. */
     408/* Use the stdc++ code linked into the libc dll when possible. */
     409#define LIBSTDCXX                   "-lc_dll"
     410#define LIBSTDCXX_STATIC            "-lstdc++"
     411#define LIBSTDCXX_PROFILE           LIBSTDCXX
     412#define LIBSTDCXX_PROFILE_STATIC    LIBSTDCXX_STATIC
     413
     414/* Predefine symbols.
     415   We could possibly move these to an include and use -include here...
     416  __KLIBC_VERSION__ = (__KLIBC__ << 24) | (__KLIBC_MINOR__ << 16) | __KLIBC_PATCHLEVEL__
     417  __INNOTEK_LIBC__ = __KLIBC__ (legacy) */
    409418#undef CPP_PREDEFINES
    410 #define CPP_PREDEFINES "-D__INNOTEK_LIBC__=0x006"
     419#define CPP_PREDEFINES "-D__KLIBC__=0 -D__KLIBC_MINOR__=6 -D__KLIBC_PATCHLEVEL__=2 " \
     420                       "-D__KLIBC_VERSION__=0x00060002 " \
     421                       "-D__INNOTEK_LIBC__=0x006 "
    411422
    412423/* Provide extra args to the C preprocessor and extra switch-translations.  */
  • branches/libc-0.6/src/gcc/gcc/cp/g++spec.c

    r1392 r2814  
    4343#define LIBSTDCXX_PROFILE "-lstdc++"
    4444#endif
     45#ifdef LIBSTDCXX_STATIC                                                             /* bird */
     46#define LIBSTDCXX_STATIC "-lstdc++"                                                 /* bird */
     47#endif                                                                              /* bird */
     48#ifdef LIBSTDCXX_PROFILE_STATIC                                                     /* bird */
     49#define LIBSTDCXX_PROFILE_STATIC "-lstdc++"                                         /* bird */
     50#endif                                                                              /* bird */
    4551
    4652void
     
    95101  int shared_libgcc = 1;
    96102
     103  /* True if we saw the '-static' option on the commandline. */                     /* bird */
     104  int saw_static = 0;                                                               /* bird */
     105                                                                                    /* bird */
    97106  /* The total number of arguments with the new stuff.  */
    98107  int argc;
     
    155164                {
    156165                  /* If they only gave us `-v', don't try to link
    157                      in libg++.  */ 
     166                     in libg++.  */
    158167                  library = 0;
    159168                }
     
    176185              added -= 2;
    177186            }
    178           else if (strcmp (argv[i], "-static-libgcc") == 0
    179                    || strcmp (argv[i], "-static") == 0)
     187          else if (strcmp (argv[i], "-static-libgcc") == 0)                             /* bird */
    180188            shared_libgcc = 0;
     189          else if (strcmp (argv[i], "-static") == 0)                                /* bird */
     190            {                                                                       /* bird */
     191              saw_static = 1;                                                       /* bird */
     192              shared_libgcc = 0;                                                    /* bird */
     193            }                                                                       /* bird */
    181194          else if (DEFAULT_WORD_SWITCH_TAKES_ARG (&argv[i][1]))
    182195            i++;
     
    187200      else
    188201        {
    189           int len; 
     202          int len;
    190203
    191204          if (saw_speclang)
     
    230243  i = 0;
    231244  j = 0;
    232  
     245
    233246  /* Copy the 0th argument, i.e., the name of the program itself.  */
    234247  arglist[i++] = argv[j++];
     
    273286  if (library)
    274287    {
    275       arglist[j++] = saw_profile_flag ? LIBSTDCXX_PROFILE : LIBSTDCXX;
     288      arglist[j++] = saw_profile_flag                                               /* bird */
     289                   ? saw_static ? LIBSTDCXX_PROFILE_STATIC : LIBSTDCXX_PROFILE      /* bird */
     290                   : saw_static ? LIBSTDCXX_STATIC : LIBSTDCXX;                     /* bird */
    276291      added_libraries++;
    277292#ifdef USE_LIBUNWIND_EXCEPTIONS
     
    311326int lang_specific_extra_outfiles = 0;  /* Not used for C++.  */
    312327
    313 /* Table of language-specific spec functions.  */ 
     328/* Table of language-specific spec functions.  */
    314329const struct spec_function lang_specific_spec_functions[] =
    315330{
Note: See TracChangeset for help on using the changeset viewer.