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
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