Changeset 009c485 in mainline for uspace/Makefile.common


Ignore:
Timestamp:
2018-05-01T19:02:23Z (7 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
742fc98e
Parents:
5261062
Message:

Always use CC for linking.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/Makefile.common

    r5261062 r009c485  
    115115
    116116AFLAGS = --fatal-warnings
    117 LFLAGS = --fatal-warnings --warn-common
     117LDFLAGS = -Wl,--fatal-warnings,--warn-common
    118118
    119119ifeq ($(STATIC_NEEDED),y)
     
    141141
    142142ifeq ($(LINK_DYNAMIC),y)
    143         LFLAGS += -Bdynamic
    144143        LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld
    145144else
     145        LDFLAGS += -static
    146146        LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld
    147147endif
     
    245245
    246246ifeq ($(CONFIG_STRIP_BINARIES),y)
    247         LFLAGS += --strip-all
     247        LDFLAGS += -s
    248248endif
    249249
    250250LIB_CFLAGS = $(CFLAGS) -fPIC
    251 LIB_LFLAGS = $(LFLAGS) -shared -soname $(LSONAME)
     251LIB_LDFLAGS = $(LDFLAGS) -shared -Wl,-soname,$(LSONAME)
    252252
    253253AS_CFLAGS := $(addprefix -Xassembler ,$(AFLAGS))
    254 LD_CFLAGS := $(addprefix -Xlinker ,$(LFLAGS))
    255254
    256255OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
     
    303302ifneq ($(BINARY),)
    304303$(BINARY): $(LINKER_SCRIPT) $(OBJECTS) $(LIBTAGS) $(BASE_LIBS)
    305         $(LD) $(LFLAGS) $(EXTRA_LFLAGS) -T $(LINKER_SCRIPT) -Map $@.map -o $@ $(OBJECTS) $(LIBARGS) $(BASE_LIBS)
     304        $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) -T $(LINKER_SCRIPT) -Wl,-Map,$@.map -o $@ $(OBJECTS) $(LIBARGS) $(BASE_LIBS)
    306305endif
    307306
    308307ifneq ($(TEST_BINARY),)
    309308$(TEST_BINARY): $(LINKER_SCRIPT) $(TEST_OBJECTS) $(TEST_BINARY_LIBS) $(LIBTAGS) $(BASE_LIBS)
    310         $(LD) $(LFLAGS) $(EXTRA_LFLAGS) -T $(LINKER_SCRIPT) -Map $@.map -o $@ $(TEST_OBJECTS) $(TEST_BINARY_LIBS) $(LIBARGS) $(BASE_LIBS)
     309        $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) -T $(LINKER_SCRIPT) -Wl,-Map,$@.map -o $@ $(TEST_OBJECTS) $(TEST_BINARY_LIBS) $(LIBARGS) $(BASE_LIBS)
    311310endif
    312311
     
    325324
    326325$(SLIBRARY): $(LIB_LINKER_SCRIPT) $(LIBRARY).la
    327         $(LD) $(LIB_LFLAGS) $(EXTRA_LFLAGS) -T $(LIB_LINKER_SCRIPT) -Map $@.map -o $@ --whole-archive $(LIBRARY).la --no-whole-archive
     326        $(CC) $(CFLAGS) $(LIB_LDFLAGS) $(EXTRA_LDFLAGS) -T $(LIB_LINKER_SCRIPT) -Wl,-Map,$@.map -o $@ -Wl,--whole-archive $(LIBRARY).la -Wl,--no-whole-archive
    328327
    329328$(LSONAME):
Note: See TracChangeset for help on using the changeset viewer.