Ignore:
Timestamp:
2017-06-05T16:21:21Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a961619
Parents:
7a99507
Message:

Use -ffunction-sections and —gc-sections

This change results in vast reduction of binary image sizes. For example, the
amd64 ISO image was 38MiB before this change and is only 25MiB after the change.

Unfortunately the ia64 linker ignores —gc-sections for some reason so it cannot
be turned on globally.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/ia32/Makefile.common

    r7a99507 r9780584  
    2828
    2929ifeq ($(PROCESSOR),i486)
    30         GCC_CFLAGS += -march=i486 -mno-tls-direct-seg-refs -fno-omit-frame-pointer
     30        GCC_CFLAGS += -march=i486
    3131else
    32         GCC_CFLAGS += -march=pentium -mno-tls-direct-seg-refs -fno-omit-frame-pointer
     32        GCC_CFLAGS += -march=pentium
    3333endif
    3434
     35GCC_CFLAGS += -mno-tls-direct-seg-refs -fno-omit-frame-pointer
    3536CLANG_CFLAGS += -fno-omit-frame-pointer
     37LFLAGS += --gc-sections
    3638
    3739ENDIANESS = LE
Note: See TracChangeset for help on using the changeset viewer.