FWIW - i used extern "C" { around all the #includes in the .cpp module } -
be nice if the headers already had all that, but can do it right now and
get a cpp build to work. I like defining variables where they are used
(and compiler can better know which stack areas can be reused) as well as
classes, I don't use any of the exotic c++ items nor exception handling
(can be disable in visual c++ and most others).
On Wed, Feb 6, 2013 at 3:54 PM, Andrew Fish <[email protected]> wrote:
>
>
> On Feb 6, 2013, at 2:46 PM, Tim Lewis <[email protected]> wrote:
>
> > The truth is: those intrinsics are already in EDK2, but only in the
> StdLib. One of the things I'm hoping for with the standalone version of the
> StdLib is the ability to link with it just to get the intrinsics so I don't
> have to use the Mult64 versions.
> >
>
> It might be better to have a NULL library class that just implements the
> intrinsics. This is the precedence we set with the ARM port in edk2 proper.
>
> As Laszio points out our previous no-intrinsic bar was IA32 and it turns
> out some versions or ARM are much lower than that. So we decided that an
> intrinsic library was the way to go, since the IA32 bar is as low as we
> would want to go.
>
> [LibraryClasses.ARM]
> #
> # It is not possible to prevent the ARM compiler for generic intrinsic
> functions.
> # This library provides the instrinsic functions generate by a given
> compiler.
> # [LibraryClasses.ARM] and NULL mean link this library into all ARM
> images.
> #
> NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
>
>
> https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/BeagleBoardPkg/BeagleBoardPkg.dsc
>
>
>
> > -----Original Message-----
> > From: Laszlo Ersek [mailto:[email protected]]
> > Sent: Wednesday, February 06, 2013 1:28 PM
> > To: [email protected]
> > Subject: Re: [edk2] Fix for stdlib and cpp building.
> >
> > On 02/06/13 22:04, Mcdaniel, Daryl wrote:
> >> I have actually been looking into this. Essentially all core EDK II
> >> headers need to have the #ifdef cplusplus wrapper added. Many files
> >> in StdLib have this wrapper but not all, and some of those that do
> >> need to be a bit more inclusive.
> >
> > [...]
> >
> >> Then, of course, there is the issue of coming up with solutions that
> >> work for all supported compilers and all supported CPU architectures,
> >> is maintainable, and does not add an undue burden to other developers.
> >
> > If nowhere else, my guess is that this would be the spot where the
> undertaking bleeds to death. As of today, I'm not allowed to use *structure
> assignment*, or the *division operator* with UINT64, in edk2, because
> supported C compilers generate different code for them, or something like
> that.
> >
> > Laszlo
> >
> >
> ------------------------------------------------------------------------------
> > Free Next-Gen Firewall Hardware Offer
> > Buy your Sophos next-gen firewall before the end March 2013 and get the
> hardware for free! Learn more.
> > http://p.sf.net/sfu/sophos-d2d-feb
> > _______________________________________________
> > edk2-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/edk2-devel
> >
> >
> ------------------------------------------------------------------------------
> > Free Next-Gen Firewall Hardware Offer
> > Buy your Sophos next-gen firewall before the end March 2013
> > and get the hardware for free! Learn more.
> > http://p.sf.net/sfu/sophos-d2d-feb
> > _______________________________________________
> > edk2-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
>
>
> ------------------------------------------------------------------------------
> Free Next-Gen Firewall Hardware Offer
> Buy your Sophos next-gen firewall before the end March 2013
> and get the hardware for free! Learn more.
> http://p.sf.net/sfu/sophos-d2d-feb
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel