Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/Makefile.common

    raf2254ec r7c4b26c  
    160160LIBNETTL_PREFIX = $(LIB_PREFIX)/nettl
    161161
     162LIBURCU_PREFIX = $(LIB_PREFIX)/urcu
     163
    162164AFLAGS = --fatal-warnings
    163165LFLAGS = --fatal-warnings
     
    183185endif
    184186
     187# Build static because liburcu is linked against libc which uses thread
     188# local variables
     189ifneq ($(findstring urcu, $(LIBS)),)
     190        STATIC_BUILD = y
     191endif
     192
    185193# Build static because libpcut is linked against libc which uses thread
    186194# local variables
     
    191199ifeq ($(STATIC_BUILD),y)
    192200        BASE_LIBS = $(LIBC_PREFIX)/libc.a $(LIBSOFTINT_PREFIX)/libsoftint.a
    193         LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld
    194201        ifeq ($(MATH),y)
    195202                BASE_LIBS += $(LIBMATH_PREFIX)/libmath.a
     
    197204else
    198205        BASE_LIBS = $(LIBC_PREFIX)/libc.so.0 $(LIBSOFTINT_PREFIX)/libsoftint.so.0
    199         LFLAGS += -Bdynamic
    200         LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld
     206        LINK_DYNAMIC = y
    201207        ifeq ($(MATH),y)
    202208                BASE_LIBS += $(LIBMATH_PREFIX)/libmath.so.0
    203209        endif
     210endif
     211
     212ifeq ($(LINK_DYNAMIC),y)
     213        LFLAGS += -Bdynamic
     214        LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld
     215else
     216        LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld
    204217endif
    205218
     
    293306JOBFILE = $(LIBC_PREFIX)/../../../tools/jobfile.py
    294307
     308ifeq ($(FUTEX_UPGRADABLE),y)
     309        CFLAGS += -I$(LIBURCU_PREFIX)/
     310        LIBS += $(LIBURCU_PREFIX)/liburcu.a
     311endif
     312
    295313ifeq ($(COMPILER),gcc_cross)
    296314        CFLAGS += $(GCC_CFLAGS)
     
    318336endif
    319337
    320 
    321 ifneq ($(MAKECMDGOALS),clean)
    322338-include $(DEPEND)
    323 endif
    324339
    325340OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
     
    361376
    362377ifneq ($(LIBRARY),)
    363 $(LIBRARY).a: $(OBJECTS)
     378%.a: $(OBJECTS)
    364379        $(AR) rc $@ $(OBJECTS)
    365380endif
    366381
    367 ifneq ($(LARCHIVE),)
    368 $(LARCHIVE): $(LOBJECTS)
     382ifneq ($(SLIBRARY),)
     383%.la: $(LOBJECTS)
    369384        $(AR) rc $@ $(LOBJECTS)
    370385endif
Note: See TracChangeset for help on using the changeset viewer.