X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=Makefile.rules;h=24cac3b376590b06aafa34bf3a3c81cddbb33e71;hp=c8c971f6b2810e5aa3d7942d0c7af35de5c85c22;hb=df11b54057e8b433443776617d87bc8ef459e518;hpb=4cd064b8e86f3d52e9b78e329059bdfffd15d52e 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