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

Changeset 5b72635 in mainline


Ignore:
Timestamp:
2011-05-01T10:04:33Z (11 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
ec883cf
Parents:
7fb3f1c
Message:

Use dynamic linking for all apps and servers except those that are used
as init binaries. Turn on and off with CONFIG_USE_SHARED_LIBS.

Files:
13 edited

Legend:

Unmodified
Added
Removed
  • boot/Makefile.common

    r7fb3f1c r5b72635  
    120120RD_LIBS =
    121121
    122 ifeq ($(CONFIG_RTLD), y)
    123         RD_LIBS += $(USPACE_PATH)/lib/test/libtest.so.0
    124 endif
    125 
    126122ifeq ($(CONFIG_BUILD_SHARED_LIBS), y)
    127         RD_LIBS += $(USPACE_PATH)/lib/c/libc.so.0
    128         RD_LIBS += $(USPACE_PATH)/lib/softint/libsoftint.so.0
    129         RD_APPS += $(USPACE_PATH)/app/dltest/dltest
     123        RD_LIBS += \
     124                $(USPACE_PATH)/lib/test/libtest.so.0 \
     125                $(USPACE_PATH)/lib/c/libc.so.0 \
     126                $(USPACE_PATH)/lib/softint/libsoftint.so.0
     127        RD_APPS += \
     128                $(USPACE_PATH)/app/dltest/dltest
    130129endif
    131130
  • uspace/Makefile.common

    r7fb3f1c r5b72635  
    4343#   EXTRA_CLEAN        additional cleanup targets
    4444#
     45#   STATIC_NEEDED      set to 'y' for init binaries, will build statically
     46#                      linked version
     47#
    4548# (x) required variables
    4649# (/) exactly one of the variables must be defined
     
    100103LIBNET_PREFIX = $(LIB_PREFIX)/net
    101104
    102 ifeq ($(DYNAMIC_LINKING),y)
     105ifeq ($(STATIC_NEEDED),y)
     106        STATIC_BUILD = y
     107else
     108        ifeq ($(CONFIG_USE_SHARED_LIBS), y)
     109                STATIC_BUILD = n
     110        else
     111                STATIC_BUILD = y
     112        endif
     113endif
     114
     115ifeq ($(STATIC_BUILD), y)
     116BASE_LIBS = $(LIBC_PREFIX)/libc.a $(LIBSOFTINT_PREFIX)/libsoftint.a
     117LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld
     118else
    103119BASE_LIBS = $(LIBC_PREFIX)/libc.so.0 $(LIBSOFTINT_PREFIX)/libsoftint.a
    104120LFLAGS = -Bdynamic
    105121LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld
    106 else
    107 BASE_LIBS = $(LIBC_PREFIX)/libc.a $(LIBSOFTINT_PREFIX)/libsoftint.a
    108 LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld
    109122endif
    110123
  • uspace/app/dltest/Makefile

    r7fb3f1c r5b72635  
    2929USPACE_PREFIX = ../..
    3030BINARY = dltest
    31 DYNAMIC_LINKING = y
    3231
    3332SOURCES = \
  • uspace/app/init/Makefile

    r7fb3f1c r5b72635  
    3030USPACE_PREFIX = ../..
    3131BINARY = init
     32STATIC_NEEDED = y
    3233
    3334SOURCES = \
  • uspace/srv/bd/rd/Makefile

    r7fb3f1c r5b72635  
    3030USPACE_PREFIX = ../../..
    3131BINARY = rd
     32STATIC_NEEDED = y
    3233
    3334SOURCES = \
  • uspace/srv/devman/Makefile

    r7fb3f1c r5b72635  
    3030USPACE_PREFIX = ../..
    3131BINARY = devman
     32STATIC_NEEDED = y
    3233
    3334SOURCES = \
  • uspace/srv/devmap/Makefile

    r7fb3f1c r5b72635  
    3030USPACE_PREFIX = ../..
    3131BINARY = devmap
     32STATIC_NEEDED = y
    3233
    3334SOURCES = \
  • uspace/srv/fs/devfs/Makefile

    r7fb3f1c r5b72635  
    3232EXTRA_CFLAGS += -I$(LIBFS_PREFIX)
    3333BINARY = devfs
     34STATIC_NEEDED = y
    3435
    3536SOURCES = \
  • uspace/srv/fs/fat/Makefile

    r7fb3f1c r5b72635  
    3232EXTRA_CFLAGS += -I$(LIBBLOCK_PREFIX) -I$(LIBFS_PREFIX)
    3333BINARY = fat
     34STATIC_NEEDED = y
    3435
    3536SOURCES = \
  • uspace/srv/fs/tmpfs/Makefile

    r7fb3f1c r5b72635  
    3232EXTRA_CFLAGS += -I$(LIBBLOCK_PREFIX) -I$(LIBFS_PREFIX)
    3333BINARY = tmpfs
     34STATIC_NEEDED = y
    3435
    3536SOURCES = \
  • uspace/srv/loader/Makefile

    r7fb3f1c r5b72635  
    4242
    4343BINARY = loader
     44STATIC_NEEDED = y
    4445
    4546GENERIC_SOURCES = \
  • uspace/srv/ns/Makefile

    r7fb3f1c r5b72635  
    3030USPACE_PREFIX = ../..
    3131BINARY = ns
     32STATIC_NEEDED = y
    3233
    3334SOURCES = \
  • uspace/srv/vfs/Makefile

    r7fb3f1c r5b72635  
    3030USPACE_PREFIX = ../..
    3131BINARY = vfs
     32STATIC_NEEDED = y
    3233
    3334SOURCES = \
Note: See TracChangeset for help on using the changeset viewer.