Michael,
These changes seem to work for me. Note gcc is just a wrapper for clang at this
point. This TOT as of today in the edk2 repo.
A UINT64 can not be < 0, and I suppressed some warnings. There was also some
bogus C++ code that needed a little help.
~/work/edk2/BaseTools>svn diff
Index: Source/C/GenVtf/GenVtf.c
===================================================================
--- Source/C/GenVtf/GenVtf.c (revision 14932)
+++ Source/C/GenVtf/GenVtf.c (working copy)
@@ -1722,7 +1722,7 @@
--*/
{
- if ((BaseAddress >= 0) && (FwVolSize > 0x40) && ((BaseAddress + FwVolSize) %
8 == 0)) {
+ if ((FwVolSize > 0x40) && ((BaseAddress + FwVolSize) % 8 == 0)) {
return EFI_SUCCESS;
}
Index: Source/C/Makefiles/header.makefile
===================================================================
--- Source/C/Makefiles/header.makefile (revision 14932)
+++ Source/C/Makefiles/header.makefile (working copy)
@@ -41,7 +41,7 @@
INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I
$(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I
$(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE)
CPPFLAGS = $(INCLUDE)
-CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fno-merge-constants -nostdlib
-Wall -Werror -c -g
+CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -nostdlib -Wall -Werror
-Wno-self-assign -Wno-deprecated-declarations -c -g
LFLAGS =
ifeq ($(ARCH), IA32)
Index: Source/C/VfrCompile/VfrFormPkg.cpp
===================================================================
--- Source/C/VfrCompile/VfrFormPkg.cpp (revision 14932)
+++ Source/C/VfrCompile/VfrFormPkg.cpp (working copy)
@@ -95,7 +95,7 @@
}
CFormPkg::CFormPkg (
- IN UINT32 BufferSize = 4096
+ IN UINT32 BufferSize
)
{
CHAR8 *BufferStart;
Index: Source/C/VfrCompile/VfrFormPkg.h
===================================================================
--- Source/C/VfrCompile/VfrFormPkg.h (revision 14932)
+++ Source/C/VfrCompile/VfrFormPkg.h (working copy)
@@ -124,7 +124,7 @@
SPendingAssign *PendingAssignList;
public:
- CFormPkg (IN UINT32 BufferSize);
+ CFormPkg (IN UINT32 BufferSize = 4096);
~CFormPkg ();
CHAR8 * IfrBinBufferGet (IN UINT32);
~/work/edk2/BaseTools>gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.2
Thread model: posix
On Dec 5, 2013, at 10:33 AM, Andrew Fish <af...@apple.com> wrote:
>
> On Dec 5, 2013, at 9:51 AM, Michael Berman <michael.ber...@tidalscale.com>
> wrote:
>
>> Hello,
>>
>> I am trying to build the base tools on OSX Mavericks with Xcode version
>> 5.0.2.
>> The cc —version is:
>> Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
>> Target: x86_64-apple-darwin13.0.0
>> Thread model: posix
>>
>> I got passed a few initial issues by invoking the build with:
>> C_INCLUDE_PATH=../h:../support/set make -C edk2/BaseTools
>> CFLAGS=-Qunused-arguments
>>
>> Unfortunately, I now bump into an ld error: "duplicate symbol _zzsyn in:
>> antlr.o err.o"
>>
>> Before I jump into antlr.c and err.c, I was hoping someone could perhaps
>> point me at the recipe for building on current OSX.
>>
>
> I’ll take a look when I get a chance.
>
> I had to add -Wno-self-assign -Wno-deprecated-declarations to turn off some
> warnings. And I also seem to remember there is a C++ bug in the code.
>
> Thanks,
>
> Andrew Fish
>
>> TIA,
>>
>> Michael
>>
>> ------------------------------------------------------------------------------
>> Sponsored by Intel(R) XDK
>> Develop, test and display web and hybrid apps with a single code base.
>> Download it for free now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk_______________________________________________
>> edk2-buildtools-devel mailing list
>> edk2-buildtools-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk_______________________________________________
> edk2-buildtools-devel mailing list
> edk2-buildtools-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
edk2-buildtools-devel mailing list
edk2-buildtools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel