1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

Add support for SunOS function/data sections and associated

section gc.

Patch by Bill Rushmore.

llvm-svn: 231128
This commit is contained in:
Eric Christopher 2015-03-03 20:54:29 +00:00
parent 53c7e75dbf
commit d87a27858e

View File

@ -631,6 +631,9 @@ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
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