www.digitalmars.com         C & C++   DMDScript  

D.gnu - gdc phobos and druntime automatic import

reply Benjamin Thaut <code benjamin-thaut.de> writes:
I want to use a different version of druntime and phobos with GDC but I 
don't want to overwrite the default ones. Instead I want to specifiy a 
different include directory during compile time. I first thought that 
-nostdinc is the option I want, but -nostdinc seems to do something 
different. How does GDC know where to import druntime and phobos from, 
and how do I overwrite it?

Kind Regards
Benjamin Thaut
Mar 14 2013
next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
--047d7b6da1d2eec8c704d7f3c1f8
Content-Type: text/plain; charset=ISO-8859-1

On 14 March 2013 19:05, Benjamin Thaut <code benjamin-thaut.de> wrote:

 I want to use a different version of druntime and phobos with GDC but I
 don't want to overwrite the default ones. Instead I want to specifiy a
 different include directory during compile time. I first thought that
 -nostdinc is the option I want, but -nostdinc seems to do something
 different. How does GDC know where to import druntime and phobos from, and
 how do I overwrite it?

 Kind Regards
 Benjamin Thaut

The library is installed in /usr/lib, which is part of the LIBRARY_PATH. The static library itself is a combination of druntime and phobos together, not separate at the moment. To specify a different standard library, use -defaultlib switch. -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; --047d7b6da1d2eec8c704d7f3c1f8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 1= 4 March 2013 19:05, Benjamin Thaut <span dir=3D"ltr">&lt;<a href=3D"mailto:= code benjamin-thaut.de" target=3D"_blank">code benjamin-thaut.de</a>&gt;</s= pan> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex">I want to use a different= version of druntime and phobos with GDC but I don&#39;t want to overwrite = the default ones. Instead I want to specifiy a different include directory = during compile time. I first thought that -nostdinc is the option I want, b= ut -nostdinc seems to do something different. How does GDC know where to im= port druntime and phobos from, and how do I overwrite it?<br> <br> Kind Regards<span class=3D""><font color=3D"#888888"><br> Benjamin Thaut<br> </font></span></blockquote></div><br><br></div><div class=3D"gmail_extra">T= he library is installed in /usr/lib,=A0 which is part of the LIBRARY_PATH.= =A0=A0 The static library itself is a combination of druntime and phobos to= gether, not separate at the moment.=A0 To specify a different standard libr= ary, use -defaultlib switch.<br> </div><div class=3D"gmail_extra"><br clear=3D"all"><br>-- <br>Iain Buclaw<b= r><br>*(p &lt; e ? p++ : p) =3D (c &amp; 0x0f) + &#39;0&#39;; </div></div> --047d7b6da1d2eec8c704d7f3c1f8--
Mar 15 2013
prev sibling next sibling parent reply Iain Buclaw <ibuclaw ubuntu.com> writes:
--00248c768dc6bc2ee804d7f3c850
Content-Type: text/plain; charset=ISO-8859-1

On 15 March 2013 10:03, Iain Buclaw <ibuclaw ubuntu.com> wrote:

 On 14 March 2013 19:05, Benjamin Thaut <code benjamin-thaut.de> wrote:

 I want to use a different version of druntime and phobos with GDC but I
 don't want to overwrite the default ones. Instead I want to specifiy a
 different include directory during compile time. I first thought that
 -nostdinc is the option I want, but -nostdinc seems to do something
 different. How does GDC know where to import druntime and phobos from, and
 how do I overwrite it?

 Kind Regards
 Benjamin Thaut

The library is installed in /usr/lib, which is part of the LIBRARY_PATH. The static library itself is a combination of druntime and phobos together, not separate at the moment. To specify a different standard library, use -defaultlib switch.

Will also make mention that druntime is installed in /usr/lib too ( -lgdruntime ) -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; --00248c768dc6bc2ee804d7f3c850 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 1= 5 March 2013 10:03, Iain Buclaw <span dir=3D"ltr">&lt;<a href=3D"mailto:ibu= claw ubuntu.com" target=3D"_blank">ibuclaw ubuntu.com</a>&gt;</span> wrote:= <br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bor= der-left:1px solid rgb(204,204,204);padding-left:1ex"> <div dir=3D"ltr"><div><div class=3D"h5"><div class=3D"gmail_extra"><div cla= ss=3D"gmail_quote">On 14 March 2013 19:05, Benjamin Thaut <span dir=3D"ltr"=
&lt;<a href=3D"mailto:code benjamin-thaut.de" target=3D"_blank">code benja=

<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex">I want to use a different= version of druntime and phobos with GDC but I don&#39;t want to overwrite = the default ones. Instead I want to specifiy a different include directory = during compile time. I first thought that -nostdinc is the option I want, b= ut -nostdinc seems to do something different. How does GDC know where to im= port druntime and phobos from, and how do I overwrite it?<br> <br> Kind Regards<span><font color=3D"#888888"><br> Benjamin Thaut<br> </font></span></blockquote></div><br><br></div></div></div><div class=3D"gm= ail_extra">The library is installed in /usr/lib,=A0 which is part of the LI= BRARY_PATH.=A0=A0 The static library itself is a combination of druntime an= d phobos together, not separate at the moment.=A0 To specify a different st= andard library, use -defaultlib switch.<span class=3D""><font color=3D"#888= 888"><br> </font></span></div><span class=3D""><font color=3D"#888888"><div class=3D"= gmail_extra"><br></div></font></span></div></blockquote><div><br><br></div>= <div>Will also make mention that druntime is installed in /usr/lib too ( -l= gdruntime )<br> <br><br><br></div></div>-- <br>Iain Buclaw<br><br>*(p &lt; e ? p++ : p) =3D= (c &amp; 0x0f) + &#39;0&#39;; </div></div> --00248c768dc6bc2ee804d7f3c850--
Mar 15 2013
parent reply Benjamin Thaut <code benjamin-thaut.de> writes:
Am 15.03.2013 11:05, schrieb Iain Buclaw:
 On 15 March 2013 10:03, Iain Buclaw <ibuclaw ubuntu.com
 <mailto:ibuclaw ubuntu.com>> wrote:

     On 14 March 2013 19:05, Benjamin Thaut <code benjamin-thaut.de
     <mailto:code benjamin-thaut.de>> wrote:

         I want to use a different version of druntime and phobos with
         GDC but I don't want to overwrite the default ones. Instead I
         want to specifiy a different include directory during compile
         time. I first thought that -nostdinc is the option I want, but
         -nostdinc seems to do something different. How does GDC know
         where to import druntime and phobos from, and how do I overwrite it?

         Kind Regards
         Benjamin Thaut



     The library is installed in /usr/lib,  which is part of the
     LIBRARY_PATH.   The static library itself is a combination of
     druntime and phobos together, not separate at the moment.  To
     specify a different standard library, use -defaultlib switch.



 Will also make mention that druntime is installed in /usr/lib too (
 -lgdruntime )



 --
 Iain Buclaw

 *(p < e ? p++ : p) = (c & 0x0f) + '0';

Well I don't want to overwrite the existing version of druntime and phobos. I want to be ablte to specifiy via a compiler option to use a different version of them. In some projects I use the original druntime + phobos and in other projects I use my custom version. With dmd this is possible via a custom sc.ini file. So is there a option to just remove druntime/phobos from LIBRARY_PATH? (and keep everything else) Kind Regards Benjamin Thaut
Mar 15 2013
parent reply Benjamin Thaut <code benjamin-thaut.de> writes:
Am 15.03.2013 13:26, schrieb Iain Buclaw:
 On 15 March 2013 12:01, Benjamin Thaut <code benjamin-thaut.de
 <mailto:code benjamin-thaut.de>> wrote:


     Well I don't want to overwrite the existing version of druntime and
     phobos. I want to be ablte to specifiy via a compiler option to use
     a different version of them. In some projects I use the original
     druntime + phobos and in other projects I use my custom version.
     With dmd this is possible via a custom sc.ini file. So is there a
     option to just remove druntime/phobos from LIBRARY_PATH? (and keep
     everything else)

     Kind Regards
     Benjamin Thaut


 You didn't seem to read my first message. :)

 On 15 March 2013 10:03, Iain Buclaw <ibuclaw ubuntu.com
 <mailto:ibuclaw ubuntu.com>
 <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>>> wrote:

      The library is installed in /usr/lib,  which is part of the
      LIBRARY_PATH.   The static library itself is a combination of
      druntime and phobos together, not separate at the moment.  To
      specify a different standard library, use -defaultlib switch.



 --
 Iain Buclaw

 *(p < e ? p++ : p) = (c & 0x0f) + '0';

I don't fully understand that statement. So the -defaultlib switch gives the location for the import files .di/.d and not for the actual library (.a) ? Kind Regards Benjamin Thaut
Mar 15 2013
parent reply Benjamin Thaut <code benjamin-thaut.de> writes:
Am 15.03.2013 14:20, schrieb Iain Buclaw:
 On 15 March 2013 13:18, Iain Buclaw <ibuclaw ubuntu.com
 <mailto:ibuclaw ubuntu.com>> wrote:

     On 15 March 2013 13:05, Benjamin Thaut <code benjamin-thaut.de
     <mailto:code benjamin-thaut.de>> wrote:

         Am 15.03.2013 13:26, schrieb Iain Buclaw:

             On 15 March 2013 12:01, Benjamin Thaut
             <code benjamin-thaut.de <mailto:code benjamin-thaut.de>

             <mailto:code benjamin-thaut.de
             <mailto:code benjamin-thaut.de>__>> wrote:


                  Well I don't want to overwrite the existing version of
             druntime and
                  phobos. I want to be ablte to specifiy via a compiler
             option to use
                  a different version of them. In some projects I use the
             original
                  druntime + phobos and in other projects I use my custom
             version.
                  With dmd this is possible via a custom sc.ini file. So
             is there a
                  option to just remove druntime/phobos from
             LIBRARY_PATH? (and keep
                  everything else)

                  Kind Regards
                  Benjamin Thaut


             You didn't seem to read my first message. :)

             On 15 March 2013 10:03, Iain Buclaw <ibuclaw ubuntu.com
             <mailto:ibuclaw ubuntu.com>
             <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>>
             <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>
             <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>>>> wrote:

                   The library is installed in /usr/lib,  which is part
             of the
                   LIBRARY_PATH.   The static library itself is a
             combination of
                   druntime and phobos together, not separate at the
             moment.  To
                   specify a different standard library, use -defaultlib
             switch.



             --
             Iain Buclaw

             *(p < e ? p++ : p) = (c & 0x0f) + '0';


         I don't fully understand that statement.
         So the -defaultlib switch gives the location for the import
         files .di/.d and not for the actual library (.a) ?


     No,  that's -I and -J



 Use case:

 gdc foo.d -defaultlib tango2


 This will invoke the driver to add -ltango2 to the linker options,
 instead of -lgphobos2

 Regards
 --
 Iain Buclaw

 *(p < e ? p++ : p) = (c & 0x0f) + '0';

Well but I'm not talking about the linker. If I do import std.stdio; I want to have a error message that std.stdio does not exist. Kind Regards Benjamin Thaut
Mar 15 2013
parent reply Benjamin Thaut <code benjamin-thaut.de> writes:
Am 15.03.2013 15:29, schrieb Iain Buclaw:
 On 15 March 2013 14:06, Benjamin Thaut <code benjamin-thaut.de
 <mailto:code benjamin-thaut.de>> wrote:

     Am 15.03.2013 14:20, schrieb Iain Buclaw:

         On 15 March 2013 13:18, Iain Buclaw <ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com>

         <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>>> wrote:

              On 15 March 2013 13:05, Benjamin Thaut
         <code benjamin-thaut.de <mailto:code benjamin-thaut.de>
              <mailto:code benjamin-thaut.de
         <mailto:code benjamin-thaut.de>__>> wrote:

                  Am 15.03.2013 13:26, schrieb Iain Buclaw:

                      On 15 March 2013 12:01, Benjamin Thaut
                      <code benjamin-thaut.de
         <mailto:code benjamin-thaut.de> <mailto:code benjamin-thaut.de
         <mailto:code benjamin-thaut.de>__>

                      <mailto:code benjamin-thaut.de
         <mailto:code benjamin-thaut.de>

                      <mailto:code benjamin-thaut.de
         <mailto:code benjamin-thaut.de>__>__>> wrote:


                           Well I don't want to overwrite the existing
         version of
                      druntime and
                           phobos. I want to be ablte to specifiy via a
         compiler
                      option to use
                           a different version of them. In some projects
         I use the
                      original
                           druntime + phobos and in other projects I use
         my custom
                      version.
                           With dmd this is possible via a custom sc.ini
         file. So
                      is there a
                           option to just remove druntime/phobos from
                      LIBRARY_PATH? (and keep
                           everything else)

                           Kind Regards
                           Benjamin Thaut


                      You didn't seem to read my first message. :)

                      On 15 March 2013 10:03, Iain Buclaw
         <ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>
                      <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>>
                      <mailto:ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com> <mailto:ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com>>>
                      <mailto:ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com> <mailto:ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com>>
                      <mailto:ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com> <mailto:ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com>>>>> wrote:

                            The library is installed in /usr/lib,  which
         is part
                      of the
                            LIBRARY_PATH.   The static library itself is a
                      combination of
                            druntime and phobos together, not separate at the
                      moment.  To
                            specify a different standard library, use
         -defaultlib
                      switch.



                      --
                      Iain Buclaw

                      *(p < e ? p++ : p) = (c & 0x0f) + '0';


                  I don't fully understand that statement.
                  So the -defaultlib switch gives the location for the import
                  files .di/.d and not for the actual library (.a) ?


              No,  that's -I and -J



         Use case:

         gdc foo.d -defaultlib tango2


         This will invoke the driver to add -ltango2 to the linker options,
         instead of -lgphobos2

         Regards
         --
         Iain Buclaw

         *(p < e ? p++ : p) = (c & 0x0f) + '0';


     Well but I'm not talking about the linker. If I do

     import std.stdio;

     I want to have a error message that std.stdio does not exist.

     Kind Regards
     Benjamin Thaut



 -nostdinc should do that.  Though the first error thrown would be that
 object.di cannot be found, which is correct behaviour,  you need to
 specify where the new object.di is using -I


 --
 Iain Buclaw

 *(p < e ? p++ : p) = (c & 0x0f) + '0';

Thats the problem. As soon as I specify -nostdinc a lot of other options get missing to. For example gdc no longer includes the contents of version(Windows) statements. Is it possible that the phobos-ver-syms files have something to do with that? Kind Regards Benjamin Thaut -- Kind Regards Benjamin Thaut
Mar 15 2013
parent reply Benjamin Thaut <code benjamin-thaut.de> writes:
Am 15.03.2013 17:06, schrieb Iain Buclaw:
 On 15 March 2013 15:21, Benjamin Thaut <code benjamin-thaut.de
 <mailto:code benjamin-thaut.de>> wrote:

     Am 15.03.2013 15:29, schrieb Iain Buclaw:

         On 15 March 2013 14:06, Benjamin Thaut <code benjamin-thaut.de
         <mailto:code benjamin-thaut.de>

         <mailto:code benjamin-thaut.de
         <mailto:code benjamin-thaut.de>__>> wrote:

              Am 15.03.2013 14:20, schrieb Iain Buclaw:

                  On 15 March 2013 13:18, Iain Buclaw <ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com>
                  <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>>

                  <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>
         <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>>>> wrote:

                       On 15 March 2013 13:05, Benjamin Thaut
                  <code benjamin-thaut.de <mailto:code benjamin-thaut.de>
         <mailto:code benjamin-thaut.de <mailto:code benjamin-thaut.de>__>
                       <mailto:code benjamin-thaut.de
         <mailto:code benjamin-thaut.de>
                  <mailto:code benjamin-thaut.de
         <mailto:code benjamin-thaut.de>__>__>> wrote:

                           Am 15.03.2013 13:26, schrieb Iain Buclaw:

                               On 15 March 2013 12:01, Benjamin Thaut
                               <code benjamin-thaut.de
         <mailto:code benjamin-thaut.de>
                  <mailto:code benjamin-thaut.de
         <mailto:code benjamin-thaut.de>__>
         <mailto:code benjamin-thaut.de <mailto:code benjamin-thaut.de>
                  <mailto:code benjamin-thaut.de
         <mailto:code benjamin-thaut.de>__>__>

                               <mailto:code benjamin-thaut.de
         <mailto:code benjamin-thaut.de>
                  <mailto:code benjamin-thaut.de
         <mailto:code benjamin-thaut.de>__>

                               <mailto:code benjamin-thaut.de
         <mailto:code benjamin-thaut.de>
                  <mailto:code benjamin-thaut.de
         <mailto:code benjamin-thaut.de>__>__>__>> wrote:


                                    Well I don't want to overwrite the
         existing
                  version of
                               druntime and
                                    phobos. I want to be ablte to
         specifiy via a
                  compiler
                               option to use
                                    a different version of them. In some
         projects
                  I use the
                               original
                                    druntime + phobos and in other
         projects I use
                  my custom
                               version.
                                    With dmd this is possible via a
         custom sc.ini
                  file. So
                               is there a
                                    option to just remove druntime/phobos
         from
                               LIBRARY_PATH? (and keep
                                    everything else)

                                    Kind Regards
                                    Benjamin Thaut


                               You didn't seem to read my first message. :)

                               On 15 March 2013 10:03, Iain Buclaw
                  <ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>
         <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>>
                               <mailto:ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com> <mailto:ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com>>>
                               <mailto:ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com>
                  <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>>
         <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>
                  <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>>>>
                               <mailto:ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com>
                  <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>>
         <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>
                  <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>>>
                               <mailto:ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com>
                  <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>>
         <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>
                  <mailto:ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com>>>>>__> wrote:

                                     The library is installed in
         /usr/lib,  which
                  is part
                               of the
                                     LIBRARY_PATH.   The static library
         itself is a
                               combination of
                                     druntime and phobos together, not
         separate at the
                               moment.  To
                                     specify a different standard
         library, use
                  -defaultlib
                               switch.



                               --
                               Iain Buclaw

                               *(p < e ? p++ : p) = (c & 0x0f) + '0';


                           I don't fully understand that statement.
                           So the -defaultlib switch gives the location
         for the import
                           files .di/.d and not for the actual library (.a) ?


                       No,  that's -I and -J



                  Use case:

                  gdc foo.d -defaultlib tango2


                  This will invoke the driver to add -ltango2 to the
         linker options,
                  instead of -lgphobos2

                  Regards
                  --
                  Iain Buclaw

                  *(p < e ? p++ : p) = (c & 0x0f) + '0';


              Well but I'm not talking about the linker. If I do

              import std.stdio;

              I want to have a error message that std.stdio does not exist.

              Kind Regards
              Benjamin Thaut



         -nostdinc should do that.  Though the first error thrown would
         be that
         object.di cannot be found, which is correct behaviour,  you need to
         specify where the new object.di is using -I


         --
         Iain Buclaw

         *(p < e ? p++ : p) = (c & 0x0f) + '0';


     Thats the problem. As soon as I specify -nostdinc a lot of other
     options get missing to. For example gdc no longer includes the
     contents of version(Windows) statements.
     Is it possible that the phobos-ver-syms files have something to do
     with that?


 That shouldn't be the case if you are using a recent development version
 (see patch-versym-os-4.8.x where there is a builtin define for Windows)

 --
 Iain Buclaw

 *(p < e ? p++ : p) = (c & 0x0f) + '0';

Well mingw-gdc is quite a bit behind. Kind Regards Benjamin Thaut
Mar 15 2013
parent reply Daniel Green <venix1 gmail.com> writes:
On 3/15/2013 11:42 AM, Benjamin Thaut wrote:
 Well mingw-gdc is quite a bit behind.

I'm working on that. C:\MinGW\msys\1.0>/crossdev/gdc/stage/bin/gdc -v Using built-in specs. COLLECT_GCC=/crossdev/gdc/stage/bin/gdc COLLECT_LTO_WRAPPER=c:/crossdev/gdc/stage/bin/../libexec/gcc/i686-pc-mingw32/4.8.0/lto-wrapper.exe Target: i686-pc-mingw32 Configured with: ../configure --prefix=/crossdev/gdc/stage --with-gmp=/crossdev/gdc/deps/gmp --with-mpfr=/crossdev/gdc/deps/mpfr --with-mpc=/crossdev/gdc/deps/mpc --with-cloog=/crossdev/gdc/deps/cloog/ --with-isl=/crossdev/gdc/deps/isl --disable-bootstrap --enable-languages=c,c++,d,lto Thread model: win32 gcc version 4.8.0 20130303 (experimental) (GCC) But in the meantime just modify the code directly. You can find it in d-lang.cc look for VersionCondition::addPredefinedGlobalIdent ("GNU"); and add one for Windows.
Mar 15 2013
parent Benjamin Thaut <code benjamin-thaut.de> writes:
Am 15.03.2013 20:00, schrieb Daniel Green:
 On 3/15/2013 11:42 AM, Benjamin Thaut wrote:
 Well mingw-gdc is quite a bit behind.

I'm working on that. C:\MinGW\msys\1.0>/crossdev/gdc/stage/bin/gdc -v Using built-in specs. COLLECT_GCC=/crossdev/gdc/stage/bin/gdc COLLECT_LTO_WRAPPER=c:/crossdev/gdc/stage/bin/../libexec/gcc/i686-pc-mingw32/4.8.0/lto-wrapper.exe Target: i686-pc-mingw32 Configured with: ../configure --prefix=/crossdev/gdc/stage --with-gmp=/crossdev/gdc/deps/gmp --with-mpfr=/crossdev/gdc/deps/mpfr --with-mpc=/crossdev/gdc/deps/mpc --with-cloog=/crossdev/gdc/deps/cloog/ --with-isl=/crossdev/gdc/deps/isl --disable-bootstrap --enable-languages=c,c++,d,lto Thread model: win32 gcc version 4.8.0 20130303 (experimental) (GCC) But in the meantime just modify the code directly. You can find it in d-lang.cc look for VersionCondition::addPredefinedGlobalIdent ("GNU"); and add one for Windows.

Awesome. Thank you very much. It is really nice to hear that you are working on a 4.8.0 mingw port.
Mar 15 2013
prev sibling next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
--20cf3074b7cca1cd6e04d7f5bf0c
Content-Type: text/plain; charset=ISO-8859-1

On 15 March 2013 12:01, Benjamin Thaut <code benjamin-thaut.de> wrote:

 Well I don't want to overwrite the existing version of druntime and
 phobos. I want to be ablte to specifiy via a compiler option to use a
 different version of them. In some projects I use the original druntime +
 phobos and in other projects I use my custom version. With dmd this is
 possible via a custom sc.ini file. So is there a option to just remove
 druntime/phobos from LIBRARY_PATH? (and keep everything else)

 Kind Regards
 Benjamin Thaut

You didn't seem to read my first message. :) On 15 March 2013 10:03, Iain Buclaw <ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>> wrote: The library is installed in /usr/lib, which is part of the LIBRARY_PATH. The static library itself is a combination of druntime and phobos together, not separate at the moment. To specify a different standard library, use -defaultlib switch. -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; --20cf3074b7cca1cd6e04d7f5bf0c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 1= 5 March 2013 12:01, Benjamin Thaut <span dir=3D"ltr">&lt;<a href=3D"mailto:= code benjamin-thaut.de" target=3D"_blank">code benjamin-thaut.de</a>&gt;</s= pan> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex"><br> Well I don&#39;t want to overwrite the existing version of druntime and pho= bos. I want to be ablte to specifiy via a compiler option to use a differen= t version of them. In some projects I use the original druntime + phobos an= d in other projects I use my custom version. With dmd this is possible via = a custom sc.ini file. So is there a option to just remove druntime/phobos f= rom LIBRARY_PATH? (and keep everything else)<br> <br> Kind Regards<span class=3D""><font color=3D"#888888"><br> Benjamin Thaut<br> </font></span></blockquote></div><br></div><div class=3D"gmail_extra">You d= idn&#39;t seem to read my first message. :)<br><br><div class=3D"im"> On 15 March 2013 10:03, Iain Buclaw &lt;<a href=3D"mailto:ibuclaw ubuntu.co= m" target=3D"_blank">ibuclaw ubuntu.com</a><br></div> &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" target=3D"_blank">ibuclaw = ubuntu.com</a>&gt;&gt; wrote:<br> <br> =A0 =A0 The library is installed in /usr/lib, =A0which is part of the<br> =A0 =A0 LIBRARY_PATH. =A0 The static library itself is a combination of<br> =A0 =A0 druntime and phobos together, not separate at the moment. =A0To<br> =A0 =A0 specify a different standard library, use -defaultlib switch.<br> <br></div><div class=3D"gmail_extra"><br clear=3D"all"><br>-- <br>Iain Bucl= aw<br><br>*(p &lt; e ? p++ : p) =3D (c &amp; 0x0f) + &#39;0&#39;; </div></div> --20cf3074b7cca1cd6e04d7f5bf0c--
Mar 15 2013
prev sibling next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
--047d7b6da1d267138204d7f67b54
Content-Type: text/plain; charset=ISO-8859-1

On 15 March 2013 13:05, Benjamin Thaut <code benjamin-thaut.de> wrote:

 Am 15.03.2013 13:26, schrieb Iain Buclaw:

 On 15 March 2013 12:01, Benjamin Thaut <code benjamin-thaut.de

 <mailto:code benjamin-thaut.de**>> wrote:


     Well I don't want to overwrite the existing version of druntime and
     phobos. I want to be ablte to specifiy via a compiler option to use
     a different version of them. In some projects I use the original
     druntime + phobos and in other projects I use my custom version.
     With dmd this is possible via a custom sc.ini file. So is there a
     option to just remove druntime/phobos from LIBRARY_PATH? (and keep
     everything else)

     Kind Regards
     Benjamin Thaut


 You didn't seem to read my first message. :)

 On 15 March 2013 10:03, Iain Buclaw <ibuclaw ubuntu.com
 <mailto:ibuclaw ubuntu.com>
 <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>>> wrote:

      The library is installed in /usr/lib,  which is part of the
      LIBRARY_PATH.   The static library itself is a combination of
      druntime and phobos together, not separate at the moment.  To
      specify a different standard library, use -defaultlib switch.



 --
 Iain Buclaw

 *(p < e ? p++ : p) = (c & 0x0f) + '0';

I don't fully understand that statement. So the -defaultlib switch gives the location for the import files .di/.d and not for the actual library (.a) ?

-- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; --047d7b6da1d267138204d7f67b54 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 1= 5 March 2013 13:05, Benjamin Thaut <span dir=3D"ltr">&lt;<a href=3D"mailto:= code benjamin-thaut.de" target=3D"_blank">code benjamin-thaut.de</a>&gt;</s= pan> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex">Am 15.03.2013 13:26, schrieb Iain Buclaw:<br=

x #ccc solid;padding-left:1ex"> On 15 March 2013 12:01, Benjamin Thaut &lt;<a href=3D"mailto:code benjamin-= thaut.de" target=3D"_blank">code benjamin-thaut.de</a><div class=3D"im"><br=

benjamin-thaut.de</a><u></u>&gt;&gt; wrote:<br> <br> <br> =A0 =A0 Well I don&#39;t want to overwrite the existing version of druntime= and<br> =A0 =A0 phobos. I want to be ablte to specifiy via a compiler option to use= <br> =A0 =A0 a different version of them. In some projects I use the original<br=


r> =A0 =A0 option to just remove druntime/phobos from LIBRARY_PATH? (and keep<= br> =A0 =A0 everything else)<br> <br> =A0 =A0 Kind Regards<br> =A0 =A0 Benjamin Thaut<br> <br> <br></div><div class=3D"im"> You didn&#39;t seem to read my first message. :)<br> <br></div><div class=3D"im"> On 15 March 2013 10:03, Iain Buclaw &lt;<a href=3D"mailto:ibuclaw ubuntu.co= m" target=3D"_blank">ibuclaw ubuntu.com</a><br> &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" target=3D"_blank">ibuclaw = ubuntu.com</a>&gt;<br></div><div class=3D"im"> &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" target=3D"_blank">ibuclaw = ubuntu.com</a> &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" target=3D"_= blank">ibuclaw ubuntu.com</a>&gt;&gt;&gt; wrote:<br> <br> =A0 =A0 =A0The library is installed in /usr/lib, =A0which is part of the<br=

br> =A0 =A0 =A0druntime and phobos together, not separate at the moment. =A0To<= br> =A0 =A0 =A0specify a different standard library, use -defaultlib switch.<br=

<br> <br></div><div class=3D"im"> --<br> Iain Buclaw<br> <br> *(p &lt; e ? p++ : p) =3D (c &amp; 0x0f) + &#39;0&#39;;<br> </div></blockquote> <br> I don&#39;t fully understand that statement.<br> So the -defaultlib switch gives the location for the import files .di/.d an= d not for the actual library (.a) ?<br> <br></blockquote></div><br></div><div class=3D"gmail_extra">No,=A0 that&#39= ;s -I and -J<br></div><div class=3D"gmail_extra"><br clear=3D"all"><br>-- <= br>Iain Buclaw<br><br>*(p &lt; e ? p++ : p) =3D (c &amp; 0x0f) + &#39;0&#39= ;; </div></div> --047d7b6da1d267138204d7f67b54--
Mar 15 2013
prev sibling next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
--20cf302ef79ed5159e04d7f68004
Content-Type: text/plain; charset=ISO-8859-1

On 15 March 2013 13:18, Iain Buclaw <ibuclaw ubuntu.com> wrote:

 On 15 March 2013 13:05, Benjamin Thaut <code benjamin-thaut.de> wrote:

 Am 15.03.2013 13:26, schrieb Iain Buclaw:

 On 15 March 2013 12:01, Benjamin Thaut <code benjamin-thaut.de

 <mailto:code benjamin-thaut.de**>> wrote:


     Well I don't want to overwrite the existing version of druntime and
     phobos. I want to be ablte to specifiy via a compiler option to use
     a different version of them. In some projects I use the original
     druntime + phobos and in other projects I use my custom version.
     With dmd this is possible via a custom sc.ini file. So is there a
     option to just remove druntime/phobos from LIBRARY_PATH? (and keep
     everything else)

     Kind Regards
     Benjamin Thaut


 You didn't seem to read my first message. :)

 On 15 March 2013 10:03, Iain Buclaw <ibuclaw ubuntu.com
 <mailto:ibuclaw ubuntu.com>
 <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>>> wrote:

      The library is installed in /usr/lib,  which is part of the
      LIBRARY_PATH.   The static library itself is a combination of
      druntime and phobos together, not separate at the moment.  To
      specify a different standard library, use -defaultlib switch.



 --
 Iain Buclaw

 *(p < e ? p++ : p) = (c & 0x0f) + '0';

I don't fully understand that statement. So the -defaultlib switch gives the location for the import files .di/.d and not for the actual library (.a) ?


Use case: gdc foo.d -defaultlib tango2 This will invoke the driver to add -ltango2 to the linker options, instead of -lgphobos2 Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; --20cf302ef79ed5159e04d7f68004 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 1= 5 March 2013 13:18, Iain Buclaw <span dir=3D"ltr">&lt;<a href=3D"mailto:ibu= claw ubuntu.com" target=3D"_blank">ibuclaw ubuntu.com</a>&gt;</span> wrote:= <br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-lef= t:1px #ccc solid;padding-left:1ex"> <div dir=3D"ltr"><div><div class=3D"h5"><div class=3D"gmail_extra"><div cla= ss=3D"gmail_quote">On 15 March 2013 13:05, Benjamin Thaut <span dir=3D"ltr"=
&lt;<a href=3D"mailto:code benjamin-thaut.de" target=3D"_blank">code benja=

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex">Am 15.03.2013 13:26, schrieb Iain Buclaw:<br=

x #ccc solid;padding-left:1ex"> On 15 March 2013 12:01, Benjamin Thaut &lt;<a href=3D"mailto:code benjamin-= thaut.de" target=3D"_blank">code benjamin-thaut.de</a><div><br> &lt;mailto:<a href=3D"mailto:code benjamin-thaut.de" target=3D"_blank">code= benjamin-thaut.de</a><u></u>&gt;&gt; wrote:<br> <br> <br> =A0 =A0 Well I don&#39;t want to overwrite the existing version of druntime= and<br> =A0 =A0 phobos. I want to be ablte to specifiy via a compiler option to use= <br> =A0 =A0 a different version of them. In some projects I use the original<br=


r> =A0 =A0 option to just remove druntime/phobos from LIBRARY_PATH? (and keep<= br> =A0 =A0 everything else)<br> <br> =A0 =A0 Kind Regards<br> =A0 =A0 Benjamin Thaut<br> <br> <br></div><div> You didn&#39;t seem to read my first message. :)<br> <br></div><div> On 15 March 2013 10:03, Iain Buclaw &lt;<a href=3D"mailto:ibuclaw ubuntu.co= m" target=3D"_blank">ibuclaw ubuntu.com</a><br> &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" target=3D"_blank">ibuclaw = ubuntu.com</a>&gt;<br></div><div> &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" target=3D"_blank">ibuclaw = ubuntu.com</a> &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" target=3D"_= blank">ibuclaw ubuntu.com</a>&gt;&gt;&gt; wrote:<br> <br> =A0 =A0 =A0The library is installed in /usr/lib, =A0which is part of the<br=

br> =A0 =A0 =A0druntime and phobos together, not separate at the moment. =A0To<= br> =A0 =A0 =A0specify a different standard library, use -defaultlib switch.<br=

<br> <br></div><div> --<br> Iain Buclaw<br> <br> *(p &lt; e ? p++ : p) =3D (c &amp; 0x0f) + &#39;0&#39;;<br> </div></blockquote> <br> I don&#39;t fully understand that statement.<br> So the -defaultlib switch gives the location for the import files .di/.d an= d not for the actual library (.a) ?<br> <br></blockquote></div><br></div></div></div><div class=3D"gmail_extra">No,= =A0 that&#39;s -I and -J<br></div><div class=3D"im"><div class=3D"gmail_ext= ra"><br></div></div></div></blockquote></div><br><br></div><div class=3D"gm= ail_extra"> Use case:<br><br></div><div class=3D"gmail_extra">gdc foo.d -defaultlib tan= go2<br><br><br></div><div class=3D"gmail_extra">This will invoke the driver= to add -ltango2 to the linker options, instead of -lgphobos2<br></div><div= class=3D"gmail_extra"> <br clear=3D"all"></div><div class=3D"gmail_extra">Regards<br></div><div cl= ass=3D"gmail_extra">-- <br>Iain Buclaw<br><br>*(p &lt; e ? p++ : p) =3D (c = &amp; 0x0f) + &#39;0&#39;; </div></div> --20cf302ef79ed5159e04d7f68004--
Mar 15 2013
prev sibling next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
--0021cc02206618ab9804d7f776aa
Content-Type: text/plain; charset=ISO-8859-1

On 15 March 2013 14:06, Benjamin Thaut <code benjamin-thaut.de> wrote:

 Am 15.03.2013 14:20, schrieb Iain Buclaw:

 On 15 March 2013 13:18, Iain Buclaw <ibuclaw ubuntu.com

 <mailto:ibuclaw ubuntu.com>> wrote:

     On 15 March 2013 13:05, Benjamin Thaut <code benjamin-thaut.de
     <mailto:code benjamin-thaut.de**>> wrote:

         Am 15.03.2013 13:26, schrieb Iain Buclaw:

             On 15 March 2013 12:01, Benjamin Thaut
             <code benjamin-thaut.de <mailto:code benjamin-thaut.de**>

             <mailto:code benjamin-thaut.de

             <mailto:code benjamin-thaut.de**>__>> wrote:


                  Well I don't want to overwrite the existing version of
             druntime and
                  phobos. I want to be ablte to specifiy via a compiler
             option to use
                  a different version of them. In some projects I use the
             original
                  druntime + phobos and in other projects I use my custom
             version.
                  With dmd this is possible via a custom sc.ini file. So
             is there a
                  option to just remove druntime/phobos from
             LIBRARY_PATH? (and keep
                  everything else)

                  Kind Regards
                  Benjamin Thaut


             You didn't seem to read my first message. :)

             On 15 March 2013 10:03, Iain Buclaw <ibuclaw ubuntu.com
             <mailto:ibuclaw ubuntu.com>
             <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>>
             <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>
             <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>>>>
 wrote:

                   The library is installed in /usr/lib,  which is part
             of the
                   LIBRARY_PATH.   The static library itself is a
             combination of
                   druntime and phobos together, not separate at the
             moment.  To
                   specify a different standard library, use -defaultlib
             switch.



             --
             Iain Buclaw

             *(p < e ? p++ : p) = (c & 0x0f) + '0';


         I don't fully understand that statement.
         So the -defaultlib switch gives the location for the import
         files .di/.d and not for the actual library (.a) ?


     No,  that's -I and -J



 Use case:

 gdc foo.d -defaultlib tango2


 This will invoke the driver to add -ltango2 to the linker options,
 instead of -lgphobos2

 Regards
 --
 Iain Buclaw

 *(p < e ? p++ : p) = (c & 0x0f) + '0';

Well but I'm not talking about the linker. If I do import std.stdio; I want to have a error message that std.stdio does not exist. Kind Regards Benjamin Thaut

-nostdinc should do that. Though the first error thrown would be that object.di cannot be found, which is correct behaviour, you need to specify where the new object.di is using -I -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; --0021cc02206618ab9804d7f776aa Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 1= 5 March 2013 14:06, Benjamin Thaut <span dir=3D"ltr">&lt;<a href=3D"mailto:= code benjamin-thaut.de" target=3D"_blank">code benjamin-thaut.de</a>&gt;</s= pan> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex">Am 15.03.2013 14:20, schrieb Iain Buclaw:<br=

x #ccc solid;padding-left:1ex"> On 15 March 2013 13:18, Iain Buclaw &lt;<a href=3D"mailto:ibuclaw ubuntu.co= m" target=3D"_blank">ibuclaw ubuntu.com</a><div class=3D"im"><br> &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" target=3D"_blank">ibuclaw = ubuntu.com</a>&gt;&gt; wrote:<br> <br> =A0 =A0 On 15 March 2013 13:05, Benjamin Thaut &lt;<a href=3D"mailto:code b= enjamin-thaut.de" target=3D"_blank">code benjamin-thaut.de</a><br></div><di= v class=3D"im"> =A0 =A0 &lt;mailto:<a href=3D"mailto:code benjamin-thaut.de" target=3D"_bla= nk">code benjamin-thaut.de</a><u></u>&gt;&gt; wrote:<br> <br> =A0 =A0 =A0 =A0 Am 15.03.2013 13:26, schrieb Iain Buclaw:<br> <br> =A0 =A0 =A0 =A0 =A0 =A0 On 15 March 2013 12:01, Benjamin Thaut<br> =A0 =A0 =A0 =A0 =A0 =A0 &lt;<a href=3D"mailto:code benjamin-thaut.de" targe= t=3D"_blank">code benjamin-thaut.de</a> &lt;mailto:<a href=3D"mailto:code b= enjamin-thaut.de" target=3D"_blank">code benjamin-thaut.de</a><u></u>&gt;<b= r> <br></div> =A0 =A0 =A0 =A0 =A0 =A0 &lt;mailto:<a href=3D"mailto:code benjamin-thaut.de= " target=3D"_blank">code benjamin-thaut.de</a><div><div class=3D"h5"><br> =A0 =A0 =A0 =A0 =A0 =A0 &lt;mailto:<a href=3D"mailto:code benjamin-thaut.de= " target=3D"_blank">code benjamin-thaut.de</a><u></u>&gt;__&gt;&gt; wrote:<= br> <br> <br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Well I don&#39;t want to overwrite the e= xisting version of<br> =A0 =A0 =A0 =A0 =A0 =A0 druntime and<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0phobos. I want to be ablte to specifiy v= ia a compiler<br> =A0 =A0 =A0 =A0 =A0 =A0 option to use<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0a different version of them. In some pro= jects I use the<br> =A0 =A0 =A0 =A0 =A0 =A0 original<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0druntime + phobos and in other projects = I use my custom<br> =A0 =A0 =A0 =A0 =A0 =A0 version.<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0With dmd this is possible via a custom s= c.ini file. So<br> =A0 =A0 =A0 =A0 =A0 =A0 is there a<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0option to just remove druntime/phobos fr= om<br> =A0 =A0 =A0 =A0 =A0 =A0 LIBRARY_PATH? (and keep<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0everything else)<br> <br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Kind Regards<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Benjamin Thaut<br> <br> <br> =A0 =A0 =A0 =A0 =A0 =A0 You didn&#39;t seem to read my first message. :)<br=

=A0 =A0 =A0 =A0 =A0 =A0 On 15 March 2013 10:03, Iain Buclaw &lt;<a href=3D"= mailto:ibuclaw ubuntu.com" target=3D"_blank">ibuclaw ubuntu.com</a><br> =A0 =A0 =A0 =A0 =A0 =A0 &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" ta= rget=3D"_blank">ibuclaw ubuntu.com</a>&gt;<br> =A0 =A0 =A0 =A0 =A0 =A0 &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" ta= rget=3D"_blank">ibuclaw ubuntu.com</a> &lt;mailto:<a href=3D"mailto:ibuclaw= ubuntu.com" target=3D"_blank">ibuclaw ubuntu.com</a>&gt;&gt;<br> =A0 =A0 =A0 =A0 =A0 =A0 &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" ta= rget=3D"_blank">ibuclaw ubuntu.com</a> &lt;mailto:<a href=3D"mailto:ibuclaw= ubuntu.com" target=3D"_blank">ibuclaw ubuntu.com</a>&gt;<br> =A0 =A0 =A0 =A0 =A0 =A0 &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" ta= rget=3D"_blank">ibuclaw ubuntu.com</a> &lt;mailto:<a href=3D"mailto:ibuclaw= ubuntu.com" target=3D"_blank">ibuclaw ubuntu.com</a>&gt;&gt;&gt;&gt; wrote= :<br> <br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 The library is installed in /usr/lib, = =A0which is part<br> =A0 =A0 =A0 =A0 =A0 =A0 of the<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 LIBRARY_PATH. =A0 The static library it= self is a<br> =A0 =A0 =A0 =A0 =A0 =A0 combination of<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 druntime and phobos together, not separ= ate at the<br> =A0 =A0 =A0 =A0 =A0 =A0 moment. =A0To<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 specify a different standard library, u= se -defaultlib<br> =A0 =A0 =A0 =A0 =A0 =A0 switch.<br> <br> <br> <br> =A0 =A0 =A0 =A0 =A0 =A0 --<br> =A0 =A0 =A0 =A0 =A0 =A0 Iain Buclaw<br> <br> =A0 =A0 =A0 =A0 =A0 =A0 *(p &lt; e ? p++ : p) =3D (c &amp; 0x0f) + &#39;0&#= 39;;<br> <br> <br> =A0 =A0 =A0 =A0 I don&#39;t fully understand that statement.<br> =A0 =A0 =A0 =A0 So the -defaultlib switch gives the location for the import= <br> =A0 =A0 =A0 =A0 files .di/.d and not for the actual library (.a) ?<br> <br> <br> =A0 =A0 No, =A0that&#39;s -I and -J<br> <br> <br> <br></div></div><div class=3D"im"> Use case:<br> <br> gdc foo.d -defaultlib tango2<br> <br> <br> This will invoke the driver to add -ltango2 to the linker options,<br> instead of -lgphobos2<br> <br> Regards<br></div><div class=3D"im"> --<br> Iain Buclaw<br> <br> *(p &lt; e ? p++ : p) =3D (c &amp; 0x0f) + &#39;0&#39;;<br> </div></blockquote> <br> Well but I&#39;m not talking about the linker. If I do<br> <br> import std.stdio;<br> <br> I want to have a error message that std.stdio does not exist.<br> <br> Kind Regards<span class=3D"HOEnZb"><font color=3D"#888888"><br> Benjamin Thaut<br> </font></span></blockquote></div><br><br></div><div class=3D"gmail_extra">-= nostdinc should do that.=A0 Though the first error thrown would be that obj= ect.di cannot be found, which is correct behaviour,=A0 you need to specify = where the new object.di is using -I<br> </div><div class=3D"gmail_extra"><br clear=3D"all"><br>-- <br>Iain Buclaw<b= r><br>*(p &lt; e ? p++ : p) =3D (c &amp; 0x0f) + &#39;0&#39;; </div></div> --0021cc02206618ab9804d7f776aa--
Mar 15 2013
prev sibling next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
--485b397dd4fb286a8804d7f8d121
Content-Type: text/plain; charset=ISO-8859-1

On 15 March 2013 15:21, Benjamin Thaut <code benjamin-thaut.de> wrote:

 Am 15.03.2013 15:29, schrieb Iain Buclaw:

 On 15 March 2013 14:06, Benjamin Thaut <code benjamin-thaut.de

 <mailto:code benjamin-thaut.de**>> wrote:

     Am 15.03.2013 14:20, schrieb Iain Buclaw:

         On 15 March 2013 13:18, Iain Buclaw <ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com>

         <mailto:ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>>> wrote:

              On 15 March 2013 13:05, Benjamin Thaut
         <code benjamin-thaut.de <mailto:code benjamin-thaut.de**>
              <mailto:code benjamin-thaut.de
         <mailto:code benjamin-thaut.de**>__>> wrote:

                  Am 15.03.2013 13:26, schrieb Iain Buclaw:

                      On 15 March 2013 12:01, Benjamin Thaut
                      <code benjamin-thaut.de
         <mailto:code benjamin-thaut.de**> <mailto:code benjamin-thaut.de
         <mailto:code benjamin-thaut.de**>__>

                      <mailto:code benjamin-thaut.de
         <mailto:code benjamin-thaut.de**>

                      <mailto:code benjamin-thaut.de
         <mailto:code benjamin-thaut.de**>__>__>> wrote:


                           Well I don't want to overwrite the existing
         version of
                      druntime and
                           phobos. I want to be ablte to specifiy via a
         compiler
                      option to use
                           a different version of them. In some projects
         I use the
                      original
                           druntime + phobos and in other projects I use
         my custom
                      version.
                           With dmd this is possible via a custom sc.ini
         file. So
                      is there a
                           option to just remove druntime/phobos from
                      LIBRARY_PATH? (and keep
                           everything else)

                           Kind Regards
                           Benjamin Thaut


                      You didn't seem to read my first message. :)

                      On 15 March 2013 10:03, Iain Buclaw
         <ibuclaw ubuntu.com <mailto:ibuclaw ubuntu.com>
                      <mailto:ibuclaw ubuntu.com <mailto:
 ibuclaw ubuntu.com>>
                      <mailto:ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com> <mailto:ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com>>>
                      <mailto:ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com> <mailto:ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com>>
                      <mailto:ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com> <mailto:ibuclaw ubuntu.com
         <mailto:ibuclaw ubuntu.com>>>>**> wrote:

                            The library is installed in /usr/lib,  which
         is part
                      of the
                            LIBRARY_PATH.   The static library itself is a
                      combination of
                            druntime and phobos together, not separate at
 the
                      moment.  To
                            specify a different standard library, use
         -defaultlib
                      switch.



                      --
                      Iain Buclaw

                      *(p < e ? p++ : p) = (c & 0x0f) + '0';


                  I don't fully understand that statement.
                  So the -defaultlib switch gives the location for the
 import
                  files .di/.d and not for the actual library (.a) ?


              No,  that's -I and -J



         Use case:

         gdc foo.d -defaultlib tango2


         This will invoke the driver to add -ltango2 to the linker options,
         instead of -lgphobos2

         Regards
         --
         Iain Buclaw

         *(p < e ? p++ : p) = (c & 0x0f) + '0';


     Well but I'm not talking about the linker. If I do

     import std.stdio;

     I want to have a error message that std.stdio does not exist.

     Kind Regards
     Benjamin Thaut



 -nostdinc should do that.  Though the first error thrown would be that
 object.di cannot be found, which is correct behaviour,  you need to
 specify where the new object.di is using -I


 --
 Iain Buclaw

 *(p < e ? p++ : p) = (c & 0x0f) + '0';

Thats the problem. As soon as I specify -nostdinc a lot of other options get missing to. For example gdc no longer includes the contents of version(Windows) statements. Is it possible that the phobos-ver-syms files have something to do with that?

(see patch-versym-os-4.8.x where there is a builtin define for Windows) -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; --485b397dd4fb286a8804d7f8d121 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 1= 5 March 2013 15:21, Benjamin Thaut <span dir=3D"ltr">&lt;<a href=3D"mailto:= code benjamin-thaut.de" target=3D"_blank">code benjamin-thaut.de</a>&gt;</s= pan> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex">Am 15.03.2013 15:29, schr= ieb Iain Buclaw:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex"> On 15 March 2013 14:06, Benjamin Thaut &lt;<a href=3D"mailto:code benjamin-= thaut.de" target=3D"_blank">code benjamin-thaut.de</a><div class=3D"im"><br=

benjamin-thaut.de</a><u></u>&gt;&gt; wrote:<br> <br> =A0 =A0 Am 15.03.2013 14:20, schrieb Iain Buclaw:<br> <br> =A0 =A0 =A0 =A0 On 15 March 2013 13:18, Iain Buclaw &lt;<a href=3D"mailto:i= buclaw ubuntu.com" target=3D"_blank">ibuclaw ubuntu.com</a><br> =A0 =A0 =A0 =A0 &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" target=3D"= _blank">ibuclaw ubuntu.com</a>&gt;<br> <br></div><div class=3D"im"> =A0 =A0 =A0 =A0 &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" target=3D"= _blank">ibuclaw ubuntu.com</a> &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.= com" target=3D"_blank">ibuclaw ubuntu.com</a>&gt;&gt;&gt; wrote:<br> <br></div><div class=3D"im"> =A0 =A0 =A0 =A0 =A0 =A0 =A0On 15 March 2013 13:05, Benjamin Thaut<br> =A0 =A0 =A0 =A0 &lt;<a href=3D"mailto:code benjamin-thaut.de" target=3D"_bl= ank">code benjamin-thaut.de</a> &lt;mailto:<a href=3D"mailto:code benjamin-= thaut.de" target=3D"_blank">code benjamin-thaut.de</a><u></u>&gt;<br></div>= <div class=3D"im"> =A0 =A0 =A0 =A0 =A0 =A0 =A0&lt;mailto:<a href=3D"mailto:code benjamin-thaut= .de" target=3D"_blank">code benjamin-thaut.de</a><br> =A0 =A0 =A0 =A0 &lt;mailto:<a href=3D"mailto:code benjamin-thaut.de" target= =3D"_blank">code benjamin-thaut.de</a><u></u>&gt;__&gt;&gt; wrote:<br> <br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Am 15.03.2013 13:26, schrieb Iain Buclaw= :<br> <br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0On 15 March 2013 12:01, Benjamin= Thaut<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&lt;<a href=3D"mailto:code benja= min-thaut.de" target=3D"_blank">code benjamin-thaut.de</a><br> =A0 =A0 =A0 =A0 &lt;mailto:<a href=3D"mailto:code benjamin-thaut.de" target= =3D"_blank">code benjamin-thaut.de</a><u></u>&gt; &lt;mailto:<a href=3D"mai= lto:code benjamin-thaut.de" target=3D"_blank">code benjamin-thaut.de</a><br=

=3D"_blank">code benjamin-thaut.de</a><u></u>&gt;__&gt;<br> <br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&lt;mailto:<a href=3D"mailto:cod= e benjamin-thaut.de" target=3D"_blank">code benjamin-thaut.de</a><br> =A0 =A0 =A0 =A0 &lt;mailto:<a href=3D"mailto:code benjamin-thaut.de" target= =3D"_blank">code benjamin-thaut.de</a><u></u>&gt;<br> <br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&lt;mailto:<a href=3D"mailto:cod= e benjamin-thaut.de" target=3D"_blank">code benjamin-thaut.de</a><br></div>= <div><div class=3D"h5"> =A0 =A0 =A0 =A0 &lt;mailto:<a href=3D"mailto:code benjamin-thaut.de" target= =3D"_blank">code benjamin-thaut.de</a><u></u>&gt;__&gt;__&gt;&gt; wrote:<br=

<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Well I don&#39;t want t= o overwrite the existing<br> =A0 =A0 =A0 =A0 version of<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0druntime and<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 phobos. I want to be ab= lte to specifiy via a<br> =A0 =A0 =A0 =A0 compiler<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0option to use<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 a different version of = them. In some projects<br> =A0 =A0 =A0 =A0 I use the<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0original<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 druntime + phobos and i= n other projects I use<br> =A0 =A0 =A0 =A0 my custom<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0version.<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 With dmd this is possib= le via a custom sc.ini<br> =A0 =A0 =A0 =A0 file. So<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0is there a<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 option to just remove d= runtime/phobos from<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0LIBRARY_PATH? (and keep<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 everything else)<br> <br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Kind Regards<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Benjamin Thaut<br> <br> <br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0You didn&#39;t seem to read my f= irst message. :)<br> <br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0On 15 March 2013 10:03, Iain Buc= law<br> =A0 =A0 =A0 =A0 &lt;<a href=3D"mailto:ibuclaw ubuntu.com" target=3D"_blank"=
ibuclaw ubuntu.com</a> &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" ta=

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&lt;mailto:<a href=3D"mailto:ibu= claw ubuntu.com" target=3D"_blank">ibuclaw ubuntu.com</a> &lt;mailto:<a hre= f=3D"mailto:ibuclaw ubuntu.com" target=3D"_blank">ibuclaw ubuntu.com</a>&gt= ;&gt;<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&lt;mailto:<a href=3D"mailto:ibu= claw ubuntu.com" target=3D"_blank">ibuclaw ubuntu.com</a><br> =A0 =A0 =A0 =A0 &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" target=3D"= _blank">ibuclaw ubuntu.com</a>&gt; &lt;mailto:<a href=3D"mailto:ibuclaw ubu= ntu.com" target=3D"_blank">ibuclaw ubuntu.com</a><br> =A0 =A0 =A0 =A0 &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" target=3D"= _blank">ibuclaw ubuntu.com</a>&gt;&gt;&gt;<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&lt;mailto:<a href=3D"mailto:ibu= claw ubuntu.com" target=3D"_blank">ibuclaw ubuntu.com</a><br> =A0 =A0 =A0 =A0 &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" target=3D"= _blank">ibuclaw ubuntu.com</a>&gt; &lt;mailto:<a href=3D"mailto:ibuclaw ubu= ntu.com" target=3D"_blank">ibuclaw ubuntu.com</a><br> =A0 =A0 =A0 =A0 &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" target=3D"= _blank">ibuclaw ubuntu.com</a>&gt;&gt;<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&lt;mailto:<a href=3D"mailto:ibu= claw ubuntu.com" target=3D"_blank">ibuclaw ubuntu.com</a><br> =A0 =A0 =A0 =A0 &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" target=3D"= _blank">ibuclaw ubuntu.com</a>&gt; &lt;mailto:<a href=3D"mailto:ibuclaw ubu= ntu.com" target=3D"_blank">ibuclaw ubuntu.com</a><br> =A0 =A0 =A0 =A0 &lt;mailto:<a href=3D"mailto:ibuclaw ubuntu.com" target=3D"= _blank">ibuclaw ubuntu.com</a>&gt;&gt;&gt;&gt;<u></u>&gt; wrote:<br> <br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0The library is insta= lled in /usr/lib, =A0which<br> =A0 =A0 =A0 =A0 is part<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0of the<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0LIBRARY_PATH. =A0 Th= e static library itself is a<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0combination of<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0druntime and phobos = together, not separate at the<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0moment. =A0To<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0specify a different = standard library, use<br> =A0 =A0 =A0 =A0 -defaultlib<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0switch.<br> <br> <br> <br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0--<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Iain Buclaw<br> <br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*(p &lt; e ? p++ : p) =3D (c &am= p; 0x0f) + &#39;0&#39;;<br> <br> <br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0I don&#39;t fully understand that statem= ent.<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0So the -defaultlib switch gives the loca= tion for the import<br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0files .di/.d and not for the actual libr= ary (.a) ?<br> <br> <br> =A0 =A0 =A0 =A0 =A0 =A0 =A0No, =A0that&#39;s -I and -J<br> <br> <br> <br> =A0 =A0 =A0 =A0 Use case:<br> <br> =A0 =A0 =A0 =A0 gdc foo.d -defaultlib tango2<br> <br> <br> =A0 =A0 =A0 =A0 This will invoke the driver to add -ltango2 to the linker o= ptions,<br> =A0 =A0 =A0 =A0 instead of -lgphobos2<br> <br> =A0 =A0 =A0 =A0 Regards<br> =A0 =A0 =A0 =A0 --<br> =A0 =A0 =A0 =A0 Iain Buclaw<br> <br> =A0 =A0 =A0 =A0 *(p &lt; e ? p++ : p) =3D (c &amp; 0x0f) + &#39;0&#39;;<br> <br> <br> =A0 =A0 Well but I&#39;m not talking about the linker. If I do<br> <br> =A0 =A0 import std.stdio;<br> <br> =A0 =A0 I want to have a error message that std.stdio does not exist.<br> <br> =A0 =A0 Kind Regards<br> =A0 =A0 Benjamin Thaut<br> <br> <br> <br></div></div><div class=3D"im"> -nostdinc should do that. =A0Though the first error thrown would be that<br=

specify where the new object.di is using -I<br> <br> <br></div><div class=3D"im"> --<br> Iain Buclaw<br> <br> *(p &lt; e ? p++ : p) =3D (c &amp; 0x0f) + &#39;0&#39;;<br> </div></blockquote> <br> Thats the problem. As soon as I specify -nostdinc a lot of other options ge= t missing to. For example gdc no longer includes the contents of version(Wi= ndows) statements.<br> Is it possible that the phobos-ver-syms files have something to do with tha= t?<br> <br clear=3D"all"></blockquote></div><br></div><div class=3D"gmail_extra">T= hat shouldn&#39;t be the case if you are using a recent development version= (see patch-versym-os-4.8.x where there is a builtin define for Windows)<br=

p++ : p) =3D (c &amp; 0x0f) + &#39;0&#39;; </div></div> --485b397dd4fb286a8804d7f8d121--
Mar 15 2013
prev sibling parent Johannes Pfau <nospam example.com> writes:
Am Fri, 15 Mar 2013 14:00:23 -0500
schrieb Daniel Green <venix1 gmail.com>:

 On 3/15/2013 11:42 AM, Benjamin Thaut wrote:
 Well mingw-gdc is quite a bit behind.

I'm working on that. C:\MinGW\msys\1.0>/crossdev/gdc/stage/bin/gdc -v Using built-in specs. COLLECT_GCC=/crossdev/gdc/stage/bin/gdc COLLECT_LTO_WRAPPER=c:/crossdev/gdc/stage/bin/../libexec/gcc/i686-pc-mingw32/4.8.0/lto-wrapper.exe Target: i686-pc-mingw32 Configured with: ../configure --prefix=/crossdev/gdc/stage --with-gmp=/crossdev/gdc/deps/gmp --with-mpfr=/crossdev/gdc/deps/mpfr --with-mpc=/crossdev/gdc/deps/mpc --with-cloog=/crossdev/gdc/deps/cloog/ --with-isl=/crossdev/gdc/deps/isl --disable-bootstrap --enable-languages=c,c++,d,lto Thread model: win32 gcc version 4.8.0 20130303 (experimental) (GCC) But in the meantime just modify the code directly. You can find it in d-lang.cc look for VersionCondition::addPredefinedGlobalIdent ("GNU"); and add one for Windows.

Great! Is there any change gdc changes could be upstreamed to the official gdc repo when this is finished? Then I could also backport those changes to the gdc-4.7 branch.
Mar 15 2013