]> git.proxmox.com Git - mirror_edk2.git/commitdiff
StdLib: Changes needed to support XCODE5
authorAndrew Fish <afish@apple.com>
Tue, 9 Sep 2014 21:59:08 +0000 (21:59 +0000)
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 9 Sep 2014 21:59:08 +0000 (21:59 +0000)
I had to make the following changes to make this build work: >build -p AppPkg/AppPkg.dsc -a X64 -t XCODE5

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <afish@apple.com>
Reviewed-by: Daryl McDaniel <daryl.mcdaniel@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16081 6f19259b-4bc3-4df7-8a09-765794883524

StdLib/Include/sys/cdefs_aout.h
StdLib/LibC/StdLib/Environs.c
StdLib/StdLib.inc

index 274991875ac2147b5e67a4f9bd49b5b1261a0ac8..2eb0a90266738265426e2fb32eab4e466601c746 100644 (file)
     #define __weak_extern(sym)          /* NOTHING */\r
     #define __weak_reference(sym)       /* NOTHING */\r
 \r
-    #if !defined(__CC_ARM)\r
-      #define __warn_references(sym,msg)          \\r
-              __asm(".stabs \"" msg "\",30,0,0,0");       \\r
-              __asm(".stabs \"_" #sym "\",1,0,0,0");\r
-    #else\r
+    #if defined(__CC_ARM) || defined(__APPLE__)\r
       #define __warn_references(sym,msg)\r
+    #else\r
+      #define __warn_references(sym,msg)              \\r
+              __asm(".stabs \"" msg "\",30,0,0,0");   \\r
+              __asm(".stabs \"_" #sym "\",1,0,0,0");\r
     #endif\r
   #endif\r
 #else   /* __STDC__ */\r
index 40807279c930c422a50b6fd7cc8e39dd457fa4f8..15221a1260372c64cf80914f22d3b002d6dc8605 100644 (file)
@@ -120,7 +120,7 @@ _Exit(int status)
   longjmp(gMD->MainExit, 0x55);     // Get out of here.  longjmp can't return 0. Use 0x55 for a non-zero value.\r
 \r
 #ifdef __GNUC__\r
-  __builtin__Exit(status);         /* Keep GCC happy - never reached */\r
+  _Exit(status);        /* Keep GCC happy - never reached */\r
 #endif\r
 }\r
 \r
index 6bdbb6feceec941ec31d368f8a168f5856978d29..60f4cc4d1c68c69b261cfa85e715755717c4bef5 100644 (file)
 !ifndef $(EMULATE)\r
   # These Build Options are used when building the Standard Libraries to be run\r
   # on real hardware.\r
-  INTEL:*_*_*_CC_FLAGS      = /Qfreestanding /D UEFI_C_SOURCE\r
-   MSFT:*_*_*_CC_FLAGS      = /X /Zc:wchar_t /D UEFI_C_SOURCE\r
-    GCC:*_*_*_CC_FLAGS      = -nostdinc -nostdlib -DUEFI_C_SOURCE\r
-    RVCT:*_*_*_CC_FLAGS      = --library_interface=none -DUEFI_C_SOURCE -J$(WORKSPACE)/StdLib/Include -J$(WORKSPACE)/StdLib/Include/Arm\r
-  ARMGCC:*_*_*_CC_FLAGS      = -nostdinc -nostdlib -DUEFI_C_SOURCE -Wno-unknown-pragmas -Wno-unused -Wno-format-zero-length\r
+   INTEL:*_*_*_CC_FLAGS     = /Qfreestanding /D UEFI_C_SOURCE\r
+    MSFT:*_*_*_CC_FLAGS     = /X /Zc:wchar_t /D UEFI_C_SOURCE\r
+     GCC:*_*_*_CC_FLAGS     = -nostdinc -nostdlib -DUEFI_C_SOURCE\r
+    RVCT:*_*_*_CC_FLAGS     = --library_interface=none -DUEFI_C_SOURCE -J$(WORKSPACE)/StdLib/Include -J$(WORKSPACE)/StdLib/Include/Arm\r
+  ARMGCC:*_*_*_CC_FLAGS     = -nostdinc -nostdlib -DUEFI_C_SOURCE -Wno-unknown-pragmas -Wno-unused -Wno-format-zero-length\r
+   XCODE:*_*_*_CC_FLAGS     = -nostdinc -nostdlib -DUEFI_C_SOURCE -Wno-unused-const-variable -Wno-string-compare -Wno-sometimes-uninitialized\r
 \r
 !else\r
   # The Build Options, below, are only used when building the Standard Libraries\r
   # to be run under an emulation environment.\r
   # They disable optimization which facillitates debugging under the Emulation environment.\r
-  INTEL:*_*_IA32_CC_FLAGS     = /Od /D UEFI_C_SOURCE\r
-   MSFT:*_*_IA32_CC_FLAGS     = /Od /D UEFI_C_SOURCE\r
-    GCC:*_*_IA32_CC_FLAGS     = -O0 -DUEFI_C_SOURCE\r
-    RVCT:*_*_*_CC_FLAGS      = --library_interface=none -DUEFI_C_SOURCE -J$(WORKSPACE)/StdLib/Include -J$(WORKSPACE)/StdLib/Include/Arm\r
-  ARMGCC:*_*_*_CC_FLAGS      = -O0 -DUEFI_C_SOURCE -Wno-unknown-pragmas -Wno-unused -Wno-format-zero-length\r
+  INTEL:*_*_IA32_CC_FLAGS   = /Od /D UEFI_C_SOURCE\r
+   MSFT:*_*_IA32_CC_FLAGS   = /Od /D UEFI_C_SOURCE\r
+    GCC:*_*_IA32_CC_FLAGS   = -O0 -DUEFI_C_SOURCE\r
+    RVCT:*_*_*_CC_FLAGS     = --library_interface=none -DUEFI_C_SOURCE -J$(WORKSPACE)/StdLib/Include -J$(WORKSPACE)/StdLib/Include/Arm\r
+  ARMGCC:*_*_*_CC_FLAGS     = -O0 -DUEFI_C_SOURCE -Wno-unknown-pragmas -Wno-unused -Wno-format-zero-length\r
+   XCODE:*_*_*_CC_FLAGS     = -O0 -DUEFI_C_SOURCE -Wno-unused-const-variable -Wno-string-compare -Wno-sometimes-uninitialized\r
 !endif\r