[llvm] r231128 - Add support for SunOS function/data sections and associated
Eric Christopher
echristo at gmail.com
Tue Mar 3 12:54:30 PST 2015
Author: echristo
Date: Tue Mar 3 14:54:29 2015
New Revision: 231128
URL: http://llvm.org/viewvc/llvm-project?rev=231128&view=rev
Log:
Add support for SunOS function/data sections and associated
section gc.
Patch by Bill Rushmore.
Modified:
llvm/trunk/Makefile.rules
Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=231128&r1=231127&r2=231128&view=diff
==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Tue Mar 3 14:54:29 2015
@@ -631,6 +631,9 @@ ifneq ($(HOST_OS), $(filter $(HOST_OS),
ifneq ($(HOST_OS),Darwin)
ifneq ($(HOST_ARCH),Mips)
CXX.Flags += -ffunction-sections -fdata-sections
+ ifeq ($(HOST_OS),SunOS)
+ CXX.Flags += -falign-functions=8
+ endif
endif
endif
endif
@@ -638,8 +641,12 @@ ifndef NO_DEAD_STRIP
ifeq ($(HOST_OS),Darwin)
LD.Flags += -Wl,-dead_strip
else
- ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
- LD.Flags += -Wl,--gc-sections
+ ifeq ($(HOST_OS),SunOS)
+ LD.Flags += -Wl,-z -Wl,discard-unused=sections
+ else
+ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
+ LD.Flags += -Wl,--gc-sections
+ endif
endif
endif
endif
More information about the llvm-commits
mailing list