Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 1cb092d in mainline


Ignore:
Timestamp:
2010-05-10T20:21:18Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
6db1e27
Parents:
a4125fb1
Message:

Prepare to support size-optimized builds and stripped binaries.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/Makefile

    ra4125fb1 r1cb092d  
    8282
    8383INCLUDES = generic/include
     84
     85ifeq ($(CONFIG_OPTIMIZE_FOR_SIZE),y)
     86OPTIMIZATION = s
     87else
    8488OPTIMIZATION = 3
     89endif
    8590
    8691DEFS = -DKERNEL -DRELEASE=$(RELEASE) "-DNAME=$(NAME)" -D__$(BITS)_BITS__ -D__$(ENDIANESS)__
     
    352357$(RAW): $(LINK) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(SYMTAB_OBJECTS)
    353358        $(LD) -N $(LFLAGS) -T $(LINK) -M -Map $(MAP) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SYMTAB_OBJECTS)
     359ifeq ($(CONFIG_STRIP_BINARIES),y)
     360        $(STRIP) $(RAW)
     361endif
    354362
    355363$(LINK): $(LINK).in $(DEPEND)
  • uspace/Makefile.common

    ra4125fb1 r1cb092d  
    104104        find . -name '*.o' -follow -exec rm \{\} \;
    105105
     106ifeq ($(CONFIG_OPTIMIZE_FOR_SIZE),y)
     107OPTIMIZATION = s
     108else
    106109OPTIMIZATION = 3
     110endif
    107111
    108112GCC_CFLAGS = -I$(LIBC_PREFIX)/include -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
     
    167171$(BINARY): $(LINKER_SCRIPT) $(OBJECTS) $(LIBS) $(BASE_LIBS)
    168172        $(LD) -N $(LFLAGS) -T $(LINKER_SCRIPT) -M -Map $(BINARY).map -o $(BINARY) $(OBJECTS) $(LIBS) $(BASE_LIBS)
     173ifeq ($(CONFIG_STRIP_BINARIES),y)
     174        $(STRIP) $(BINARY)
     175endif
    169176endif
    170177
Note: See TracChangeset for help on using the changeset viewer.