diff options
author | Eric Christopher <echristo@gmail.com> | 2015-03-03 20:54:29 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2015-03-03 20:54:29 +0000 |
commit | 221418eee16ce32f63964e2b806d41e6c2b153f8 (patch) | |
tree | ed83a13e5454d6e0716e52386f97a1176816a9df /Makefile.rules | |
parent | 0bec909f40a95eeb08bddfe7c5864f6bd37be3a6 (diff) |
Add support for SunOS function/data sections and associated
section gc.
Patch by Bill Rushmore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231128 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile.rules b/Makefile.rules index c8c971f6b28..24cac3b3765 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -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 |