Changeset 3a37751 in mainline for uspace/lib/posix/Makefile


Ignore:
Timestamp:
2017-11-10T16:52:36Z (7 years ago)
Author:
jzr <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7aa94304
Parents:
ee98e81
Message:

Build a special all-inclusive version of POSIXified libc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/Makefile

    ree98e81 r3a37751  
    3939FIXED_POSIX_LIBRARY = libposixaslibc.a
    4040FIXED_C_LIBRARY = libc4posix.a
     41MERGED_C_LIBRARY = libc.a
     42MERGE_LIBRARIES = \
     43        $(FIXED_C_LIBRARY) \
     44        $(FIXED_POSIX_LIBRARY) \
     45        $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a \
     46        $(LIBSOFTINT_PREFIX)/libsoftint.a
    4147
    4248REDEFS_HIDE_LIBC = redefs-hide-libc-symbols.list
     
    4753EXTRA_CLEAN = \
    4854        $(INCLUDE_LIBC) \
    49         $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX) \
    50         $(COLLISIONS_LIST)
    51 EXTRA_OUTPUT = $(FIXED_C_LIBRARY) $(FIXED_POSIX_LIBRARY)
     55        $(REDEFS_HIDE_LIBC) \
     56        $(REDEFS_SHOW_LIBPOSIX) \
     57        $(COLLISIONS_LIST) \
     58        libc.o
     59
     60EXTRA_OUTPUT = $(FIXED_C_LIBRARY) $(FIXED_POSIX_LIBRARY) $(MERGED_C_LIBRARY)
    5261
    5362SOURCES = \
     
    8796        ln -s -f -n ../$^ $@
    8897
    89 $(FIXED_C_LIBRARY): $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX)
     98$(FIXED_C_LIBRARY): $(LIBC_FILE) $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX)
    9099        $(OBJCOPY) --redefine-syms=$(REDEFS_HIDE_LIBC) $(LIBC_FILE) $@
    91100        $(OBJCOPY) --redefine-syms=$(REDEFS_SHOW_LIBPOSIX) $@ $@
     
    94103        $(OBJCOPY) --redefine-syms=$(REDEFS_HIDE_LIBC) $(LIBRARY).a $@
    95104        $(OBJCOPY) --redefine-syms=$(REDEFS_SHOW_LIBPOSIX) $@ $@
     105
     106$(MERGED_C_LIBRARY): $(MERGE_LIBRARIES)
     107        $(LD) --fatal-warnings -r -o libc.o --whole-archive $(MERGE_LIBRARIES) --no-whole-archive
     108        $(AR) rc $@ libc.o
    96109
    97110$(REDEFS_HIDE_LIBC): $(COLLISIONS_LIST)
Note: See TracChangeset for help on using the changeset viewer.