Changeset 970c4d8 in mainline for uspace/lib/posix/Makefile


Ignore:
Timestamp:
2013-08-15T09:41:43Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
820104d
Parents:
7fbe5ec
Message:

libposix: use objcopy more effectively

This removes the helper libposix tools that were used to redefine
conflicting symbols in libc.

objcopy can work on whole libraries thus there is no need to
unpack and repack them again.
Also, it accepts file with list of redefinitions, thus we do not
need to use xargs at all.

This solution is much simpler and also it speeds-up the compilation
a bit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/Makefile

    r7fbe5ec r970c4d8  
    4242FIXED_C_LIBRARY = libc4posix.a
    4343
    44 REDEFS_HIDE_LIBC = redefs-hide-libc.xargs
    45 REDEFS_SHOW_LIBPOSIX = redefs-show-posix.xargs
     44REDEFS_HIDE_LIBC = redefs-hide-libc-symbols.list
     45REDEFS_SHOW_LIBPOSIX = redefs-show-posix-symbols.list
    4646COLLISIONS_LIST = collisions.list
    4747
     
    8585
    8686$(FIXED_C_LIBRARY): $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX)
    87         ./tools/transform-symbols.sh \
    88                 $(OBJCOPY) $(AR) echo \
    89                 $(LIBC_FILE) $@ \
    90                 $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX)
     87        $(OBJCOPY) --redefine-syms=$(REDEFS_HIDE_LIBC) $(LIBC_FILE) $@
     88        $(OBJCOPY) --redefine-syms=$(REDEFS_SHOW_LIBPOSIX) $@ $@
    9189
    9290$(FIXED_POSIX_LIBRARY): $(LIBRARY).a $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX)
    93         ./tools/transform-symbols.sh \
    94                 $(OBJCOPY) $(AR) echo \
    95                 $(LIBRARY).a $@ \
    96                 $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX)
     91        $(OBJCOPY) --redefine-syms=$(REDEFS_HIDE_LIBC) $(LIBRARY).a $@
     92        $(OBJCOPY) --redefine-syms=$(REDEFS_SHOW_LIBPOSIX) $@ $@
    9793
    9894$(REDEFS_HIDE_LIBC): $(COLLISIONS_LIST)
    99         ./tools/create-redefines.sh "" "__helenos_libc_" <$(COLLISIONS_LIST) >$@
    100        
     95        sed 's/.*/& __helenos_libc_&/' <$(COLLISIONS_LIST) >$@
     96
    10197$(REDEFS_SHOW_LIBPOSIX): $(COLLISIONS_LIST)
    102         ./tools/create-redefines.sh "posix_" "" <$(COLLISIONS_LIST) >$@
     98        sed 's/.*/posix_& &/' <$(COLLISIONS_LIST) >$@
    10399
    104100$(COLLISIONS_LIST):
    105         ./tools/get-collision-list.sh ./include/posix >$@
     101        find ./include/posix -name '*.h' -exec \
     102                sed -n -e '/^#/d' -e 's/__POSIX_DEF__/\n&/gp' {} \; | \
     103                sed -n -e 's/__POSIX_DEF__(\([^)]*\)).*/\1/p' | \
     104                sort -u >$@
Note: See TracChangeset for help on using the changeset viewer.