From d042fa25a7cdb3da727acc0115d03ffd2986fab1 Mon Sep 17 00:00:00 2001 From: SergeySlice Date: Tue, 3 Nov 2020 22:13:44 +0300 Subject: [PATCH] no-lto for library Signed-off-by: SergeySlice --- Library/CppMemLib/CppMemLib.inf | 1 + Library/CppMemLib/memory.cpp | 2 +- Xcode/Clover/Clover.xcodeproj/project.pbxproj | 26 ++++++++++--------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Library/CppMemLib/CppMemLib.inf b/Library/CppMemLib/CppMemLib.inf index 1c52b3abf..c1a887f2e 100644 --- a/Library/CppMemLib/CppMemLib.inf +++ b/Library/CppMemLib/CppMemLib.inf @@ -46,3 +46,4 @@ [BuildOptions] MSFT:*_*_*_CC_FLAGS = /GL- + GCC:*_*_*_CC_FLAGS = -Os -fno-lto diff --git a/Library/CppMemLib/memory.cpp b/Library/CppMemLib/memory.cpp index b3f2c0217..e1d7f74fe 100755 --- a/Library/CppMemLib/memory.cpp +++ b/Library/CppMemLib/memory.cpp @@ -15,7 +15,7 @@ extern "C" { #ifdef __GNUC__ - void* memset(void* dst, int ch, UINTN count) __attribute__ ((used)); + //void* memset(void* dst, int ch, UINTN count) __attribute__ ((used)); //void* memcpy(void* dst, const void* src, UINT64 count) __attribute__ ((used)); #else // void* memset(void* dst, int ch, UINT64 count); diff --git a/Xcode/Clover/Clover.xcodeproj/project.pbxproj b/Xcode/Clover/Clover.xcodeproj/project.pbxproj index e6b7f0907..42165ecfb 100644 --- a/Xcode/Clover/Clover.xcodeproj/project.pbxproj +++ b/Xcode/Clover/Clover.xcodeproj/project.pbxproj @@ -6254,8 +6254,6 @@ A5C32A6A24B6CF9B004E20CC /* LzmaDecompress.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = LzmaDecompress.c; sourceTree = ""; }; A5C32A6B24B6CF9B004E20CC /* GuidedSectionExtraction.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = GuidedSectionExtraction.c; sourceTree = ""; }; A5C32A6C24B6CF9B004E20CC /* UefiLzma.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UefiLzma.h; sourceTree = ""; }; - A5C32A7324B6CF9B004E20CC /* DeviceTreeLib.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = DeviceTreeLib.c; sourceTree = ""; }; - A5C32A7424B6CF9B004E20CC /* DeviceTreeLib.inf */ = {isa = PBXFileReference; lastKnownFileType = text; path = DeviceTreeLib.inf; sourceTree = ""; }; A5C32A9224B6CF9B004E20CC /* BasePeCoffLibInternals.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BasePeCoffLibInternals.h; sourceTree = ""; }; A5C32A9324B6CF9B004E20CC /* BasePeCoff.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = BasePeCoff.c; sourceTree = ""; }; A5C32A9424B6CF9B004E20CC /* VBoxPeCoffLib.inf */ = {isa = PBXFileReference; lastKnownFileType = text; path = VBoxPeCoffLib.inf; sourceTree = ""; }; @@ -7583,6 +7581,9 @@ A5D12C3C243A0CAD00DFA98A /* string.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = string.h; sourceTree = ""; }; A5D12C3D243A0CBA00DFA98A /* wchar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wchar.cpp; sourceTree = ""; }; A5D12C3E243A0CBB00DFA98A /* wchar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wchar.h; sourceTree = ""; }; + A5E1C2EB2551E05700F2C2EB /* memory.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = memory.cpp; sourceTree = ""; }; + A5E1C2EC2551E05700F2C2EB /* CppMemLib.inf */ = {isa = PBXFileReference; lastKnownFileType = text; path = CppMemLib.inf; sourceTree = ""; }; + A5E1C2ED2551E05700F2C2EB /* memory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = memory.h; sourceTree = ""; }; A5E283D12347AE550068ED34 /* MemoryMap.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = MemoryMap.c; sourceTree = ""; }; A5E283D22347AE550068ED34 /* ServiceOverrides.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ServiceOverrides.h; sourceTree = ""; }; A5E283D32347AE550068ED34 /* BootFixes.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = BootFixes.c; sourceTree = ""; }; @@ -21130,7 +21131,7 @@ A5C32A4624B6CF9B004E20CC /* Library */ = { isa = PBXGroup; children = ( - A5C32A7224B6CF9B004E20CC /* DeviceTreeLib */, + A5E1C2EA2551E05700F2C2EB /* CppMemLib */, A5C32AF124B6CF9C004E20CC /* DuetTimerLib */, A5C3307724B6CF9F004E20CC /* GenericBdsLib */, A5C3303824B6CF9F004E20CC /* HdaDevicesLib */, @@ -21187,15 +21188,6 @@ path = C; sourceTree = ""; }; - A5C32A7224B6CF9B004E20CC /* DeviceTreeLib */ = { - isa = PBXGroup; - children = ( - A5C32A7324B6CF9B004E20CC /* DeviceTreeLib.c */, - A5C32A7424B6CF9B004E20CC /* DeviceTreeLib.inf */, - ); - path = DeviceTreeLib; - sourceTree = ""; - }; A5C32A9124B6CF9B004E20CC /* VBoxPeCoffLib */ = { isa = PBXGroup; children = ( @@ -23279,6 +23271,16 @@ path = cpp_util; sourceTree = ""; }; + A5E1C2EA2551E05700F2C2EB /* CppMemLib */ = { + isa = PBXGroup; + children = ( + A5E1C2EB2551E05700F2C2EB /* memory.cpp */, + A5E1C2EC2551E05700F2C2EB /* CppMemLib.inf */, + A5E1C2ED2551E05700F2C2EB /* memory.h */, + ); + path = CppMemLib; + sourceTree = ""; + }; A5E283CF2347AE550068ED34 /* MemoryFix */ = { isa = PBXGroup; children = (