Changeset 2814 for branches


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
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/libc-0.6/src/emx/ChangeLog.LIBC

    r2813 r2814  
    552006-09-09: knut st. osmundsen <bird-gccos2-spam@anduin.net>
    66    - libc:
     7        o #124: Link libstdc++ into the libc dll.
    78        o #125: Implemented nan(), nanl(), and nanf().
    89    - emxomfld:
  • branches/libc-0.6/src/emx/src/lib/libc.smak

    r2802 r2814  
    187187                $(LIBC.LIBS) \
    188188                $(filter %.lib,$(LIBC.DEPS)) \
    189                 -L$.omf -lgcc -lgcc_eh $(LIBC.STUBARG)
     189                -L$.omf -lstdc++ -lgcc -lgcc_eh $(LIBC.STUBARG)
    190190ifeq ($(MODE),opt)
    191191        cp $@ $(@:.dll=.dbg)
     
    194194
    195195# LIBC .def file
    196 $(LIBC.DEF): $(LIBC.LIBS) src/lib/libc.def version.smak
     196$(LIBC.DEF): $(LIBC.LIBS) src/lib/libc.def src/lib/libstdc++.def version.smak
    197197        $(call RM,$@)
    198198        @$(call FECHO,$@,LIBRARY libc$(VH)$(VM)$(VL) INITINSTANCE TERMINSTANCE)
     
    205205        mv -f $@.tmp $@
    206206        krx.exe src/lib/dlllegacy.cmd -e "_DLL_InitTerm" $@ src/lib/libc.def
     207        mv -f $@ $@.tmp
     208        cat "src/lib/libstdc++.def" >> $@.tmp
     209        mv -f $@.tmp $@
     210   
    207211
    208212# LIBC import libraries with dllinit, libsocket and libsyslog.
     
    238242                $(LIBC.LOG.LIBS) \
    239243                $(filter %.lib,$(LIBC.LOG.DEPS)) \
    240                 -L$.omf -lgcc -lgcc_eh $(LIBC.STUBARG)
     244                -L$.omf -lstdc++ -lgcc -lgcc_eh $(LIBC.STUBARG)
    241245        echo $@
    242246
     
    248252                $(LIBC.PRF.LIBS) \
    249253                $(filter %.lib,$(LIBC.PRF.DEPS)) \
    250                 -L$.omf-prof -L$.omf -lgcc -lgcc_eh $(LIBC.STUBARG)
     254                -L$.omf-prof -L$.omf -lstdc++ -lgcc -lgcc_eh $(LIBC.STUBARG)
    251255        echo $@
    252256
     
    268272                $(LIBC.ELH.LIBS) \
    269273                $(filter %.lib,$(LIBC.ELH.DEPS)) \
    270                 -L$.omf -lgcc -lgcc_eh $(LIBC.STUBARG)
     274                -L$.omf -lstdc++ -lgcc -lgcc_eh $(LIBC.STUBARG)
    271275        echo $@
    272276
  • 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.