Changeset 9780584 in mainline for uspace/Makefile.common


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/Makefile.common

    r7a99507 r9780584  
    235235GCC_CFLAGS = $(INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
    236236        -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
    237         -finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
    238         -Wall -Wextra -Wno-clobbered -Wno-unused-parameter -Wmissing-prototypes \
    239         -std=gnu99 -Werror-implicit-function-declaration -Wwrite-strings \
    240         -pipe -ggdb -D__$(ENDIANESS)__
     237        -finput-charset=UTF-8 -ffreestanding -fno-builtin -ffunction-sections \
     238        -nostdlib -nostdinc -Wall -Wextra -Wno-clobbered -Wno-unused-parameter \
     239        -Wmissing-prototypes -std=gnu99 -Werror-implicit-function-declaration \
     240        -Wwrite-strings -pipe -ggdb -D__$(ENDIANESS)__
    241241
    242242ICC_CFLAGS = $(INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
Note: See TracChangeset for help on using the changeset viewer.