Changeset dfeb4e2 in mainline for uspace/lib


Ignore:
Timestamp:
2018-01-06T02:37:59Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
c9e09f2
Parents:
3d95c9d
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-02 18:06:21)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-06 02:37:59)
Message:

Integrate ports into the main tree as a submodule.

A stripped down version of hsct.sh is added to tools, and Makefiles
gain new targets that implement part of hsct's prior functionality.

This arrangement improves usability and maintainability of ports,
reduces the likelihood of ports being broken by mainline changes,
and partially solves the issue with build logic being duplicated
in multiple places.

It is newly possible to build individual ports using make ports-NAME,
and all ports using make ports-all. This also installs the outputs to
uspace/dist, so ideally, simple make ports-all && make would create
an image with all ports included. This currently doesn't work only
because some ports fail to build.

Location:
uspace/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/Makefile

    r3d95c9d rdfeb4e2  
    4444LIBRARY = libc
    4545SOVERSION = 0.0
     46
     47EXTRA_CFLAGS = -fno-builtin
    4648
    4749-include $(CONFIG_MAKEFILE)
  • uspace/lib/c/arch/amd64/Makefile.common

    r3d95c9d rdfeb4e2  
    3131# XXX: clang doesn't support this flag, but the optimization is OS-specific,
    3232#      so it isn't used for amd64-unknown-elf target.
    33 GCC_CFLAGS += -mno-tls-direct-seg-refs
     33
     34ifneq ($(COMPILER),clang)
     35        COMMON_CFLAGS += -mno-tls-direct-seg-refs
     36endif
    3437
    3538LFLAGS += --gc-sections
  • uspace/lib/posix/Makefile

    r3d95c9d rdfeb4e2  
    4646        $(LIBSOFTINT_PREFIX)/libsoftint.a
    4747
     48SPECS = gcc.specs
     49LINKER_SCRIPT = link.ld
     50STARTUP_FILE = crt0.o
     51LIBC_LINKER_SCRIPT = $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld
     52LIBC_STARTUP_FILE = $(LIBC_PREFIX)/arch/$(UARCH)/src/entry.o
     53
    4854REDEFS_HIDE_LIBC = redefs-hide-libc-symbols.list
    4955REDEFS_SHOW_LIBPOSIX = redefs-show-posix-symbols.list
     
    5864        libc.o
    5965
    60 EXTRA_OUTPUT = $(FIXED_C_LIBRARY) $(FIXED_POSIX_LIBRARY) $(MERGED_C_LIBRARY)
     66EXTRA_OUTPUT = $(FIXED_C_LIBRARY) $(FIXED_POSIX_LIBRARY) $(MERGED_C_LIBRARY) $(SPECS) $(LINKER_SCRIPT) $(STARTUP_FILE)
    6167
    6268SOURCES = \
     
    9298include $(USPACE_PREFIX)/Makefile.common
    9399
     100$(SPECS): $(CONFIG_MAKEFILE)
     101        echo '*self_spec:' > $@.new
     102        echo '+ $(COMMON_CFLAGS)' >> $@.new
     103        echo >> $@.new
     104        echo '*lib:' >> $@.new
     105        echo '--whole-archive -lc -lm --no-whole-archive' >> $@.new
     106        echo >> $@.new
     107        mv $@.new $@
     108
     109$(LINKER_SCRIPT): $(LIBC_LINKER_SCRIPT)
     110        cp $< $@
     111
     112$(STARTUP_FILE): $(LIBC_STARTUP_FILE)
     113        cp $< $@
     114
    94115$(INCLUDE_LIBC): ../c/include
    95116        ln -s -f -n ../$^ $@
  • uspace/lib/posix/include/posix/stdio.h

    r3d95c9d rdfeb4e2  
    7272typedef struct _IO_FILE FILE;
    7373
    74 #ifndef LIBPOSIX_INTERNAL
     74#if !defined(LIBPOSIX_INTERNAL) && !defined(LIBC_STDIO_H_)
    7575        enum _buffer_type {
    7676                /** No buffering */
Note: See TracChangeset for help on using the changeset viewer.