Skip to content

Commit

Permalink
Add support for SunOS function/data sections and associated
Browse files Browse the repository at this point in the history
section gc.

Patch by Bill Rushmore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231128 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
echristo committed Mar 3, 2015
1 parent 0bec909 commit 221418e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -631,15 +631,22 @@ 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
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
Expand Down

0 comments on commit 221418e

Please sign in to comment.