Changeset d92060f in mainline
- Timestamp:
- 2018-05-02T16:31:14Z (7 years ago)
- Children:
- cbc02a77
- Parents:
- 924786bf
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-05-02 16:05:44)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-05-02 16:31:14)
- Location:
- uspace
- Files:
-
- 10 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/Makefile.common
r924786bf rd92060f 35 35 # DEFS compiler defines 36 36 # EXTRA_CFLAGS additional flags to pass to C compiler 37 # LINKER_SCRIPT linker script38 37 # PRE_DEPEND targets required for dependency check 39 38 # … … 113 112 LIBPOSIX_PREFIX = $(LIB_PREFIX)/posix 114 113 LIBDLTEST_PREFIX = $(LIB_PREFIX)/dltest 114 115 STARTUP_OBJECT = $(LIBC_PREFIX)/arch/$(UARCH)/src/entry.o 115 116 116 117 AFLAGS = --fatal-warnings … … 140 141 BASE_LIBS += $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a $(LIBSOFTINT_PREFIX)/libsoftint.a 141 142 142 ifeq ($(LINK_DYNAMIC),y) 143 LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld 144 else 143 ifneq ($(LINK_DYNAMIC),y) 145 144 LDFLAGS += -static 146 LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld 147 endif 148 149 LIB_LINKER_SCRIPT = $(LIBC_PREFIX)/arch/$(UARCH)/_link-shlib.ld 145 endif 150 146 151 147 INCLUDES_FLAGS = $(LIBC_INCLUDES_FLAGS) … … 301 297 302 298 ifneq ($(BINARY),) 303 $(BINARY): $( LINKER_SCRIPT) $(OBJECTS) $(LIBTAGS) $(BASE_LIBS)304 $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) - T $(LINKER_SCRIPT) -Wl,-Map,$@.map -o $@$(OBJECTS) $(LIBARGS) $(BASE_LIBS)299 $(BINARY): $(OBJECTS) $(LIBTAGS) $(BASE_LIBS) 300 $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) -Wl,-Map,$@.map -o $@ $(STARTUP_OBJECT) $(OBJECTS) $(LIBARGS) $(BASE_LIBS) 305 301 endif 306 302 307 303 ifneq ($(TEST_BINARY),) 308 $(TEST_BINARY): $( LINKER_SCRIPT) $(TEST_OBJECTS) $(TEST_BINARY_LIBS) $(LIBTAGS) $(BASE_LIBS)309 $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) - T $(LINKER_SCRIPT) -Wl,-Map,$@.map -o $@$(TEST_OBJECTS) $(TEST_BINARY_LIBS) $(LIBARGS) $(BASE_LIBS)304 $(TEST_BINARY): $(TEST_OBJECTS) $(TEST_BINARY_LIBS) $(LIBTAGS) $(BASE_LIBS) 305 $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) -Wl,-Map,$@.map -o $@ $(STARTUP_OBJECT) $(TEST_OBJECTS) $(TEST_BINARY_LIBS) $(LIBARGS) $(BASE_LIBS) 310 306 endif 311 307 … … 323 319 $(AR) rc $@ $(LOBJECTS) 324 320 325 $(SLIBRARY): $(LIB _LINKER_SCRIPT) $(LIBRARY).la326 $(CC) $(CFLAGS) $(LIB_LDFLAGS) $(EXTRA_LDFLAGS) - T $(LIB_LINKER_SCRIPT) -Wl,-Map,$@.map -o $@ -Wl,--whole-archive $(LIBRARY).la -Wl,--no-whole-archive321 $(SLIBRARY): $(LIBRARY).la 322 $(CC) $(CFLAGS) $(LIB_LDFLAGS) $(EXTRA_LDFLAGS) -Wl,-Map,$@.map -o $@ -Wl,--whole-archive $(LIBRARY).la -Wl,--no-whole-archive 327 323 328 324 $(LSONAME): -
uspace/lib/c/Makefile
r924786bf rd92060f 33 33 CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config 34 34 35 LINKER_SCRIPTS = \36 $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld \37 $(LIBC_PREFIX)/arch/$(UARCH)/_link-shlib.ld \38 $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld39 40 PRE_DEPEND =41 EXTRA_OUTPUT = $(LINKER_SCRIPTS)42 EXTRA_CLEAN = $(LINKER_SCRIPTS)43 35 LIBRARY = libc 44 36 SOVERSION = 0.0 … … 196 188 include $(USPACE_PREFIX)/Makefile.common 197 189 198 $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in199 $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -E -x c $< | grep -v "^\#" > $@200 201 $(LIBC_PREFIX)/arch/$(UARCH)/_link-shlib.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in202 $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DSHLIB -E -x c $< | grep -v "^\#" > $@203 204 $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in205 $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DDLEXE -E -x c $< | grep -v "^\#" > $@206 207 190 AUTOCHECK = $(realpath $(ROOT_PATH)/tools/autocheck.awk) 208 191 -
uspace/lib/pcut/Makefile
r924786bf rd92060f 36 36 37 37 test-libpcut-%: $(LIBRARY).a 38 $(CC) $(CFLAGS) $(LDFLAGS) - T $(LINKER_SCRIPT) -o $@ $(STARTUP) $^ $(LIBRARY).a $(BASE_LIBS)38 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(STARTUP_OBJECT) $^ $(LIBRARY).a $(BASE_LIBS) 39 39 -
uspace/lib/pcut/update-from-master.sh
r924786bf rd92060f 80 80 81 81 test-libpcut-%: $(LIBRARY).a 82 $(CC) $(CFLAGS) $(LDFLAGS) - T $(LINKER_SCRIPT) -o $@ $(STARTUP) $^ $(LIBRARY).a $(BASE_LIBS)82 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(STARTUP_OBJECT) $^ $(LIBRARY).a $(BASE_LIBS) 83 83 84 84 EOF_MAKEFILE_TAIL -
uspace/lib/posix/Makefile
r924786bf rd92060f 36 36 37 37 SPECS = gcc.specs 38 LIBC_LINKER_SCRIPT = $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld 39 LIBC_STARTUP_FILE = $(shell sed -n -e 's/^.*STARTUP(\(.*\)).*$$/\1/p' $(LIBC_LINKER_SCRIPT)) 40 EXPORT_LINKER_SCRIPT = link.ld 38 LIBC_STARTUP_FILE = $(STARTUP_OBJECT) 41 39 EXPORT_STARTUP_FILE = crt0.o 42 40 … … 49 47 $(LIBRARY).a \ 50 48 $(EXPORT_STARTUP_FILE) \ 51 $(EXPORT_LINKER_SCRIPT) \52 49 $(SPECS) 53 50 … … 55 52 EXTRA_CLEAN = $(INCLUDE_LIBC) 56 53 57 EXTRA_OUTPUT = $(SPECS) $(EXPORT_ LINKER_SCRIPT) $(EXPORT_STARTUP_FILE)54 EXTRA_OUTPUT = $(SPECS) $(EXPORT_STARTUP_FILE) 58 55 59 56 SOURCES = \ … … 90 87 91 88 EXPORT_LDFLAGS = \ 92 -L$$(HELENOS_EXPORT_ROOT)/lib \ 93 -T link.ld 89 -L$$(HELENOS_EXPORT_ROOT)/lib 94 90 95 91 EXPORT_LDLIBS = \ … … 111 107 echo '$(EXPORT_LDLIBS)' >> $@.new 112 108 mv $@.new $@ 113 114 $(EXPORT_LINKER_SCRIPT): $(LIBC_LINKER_SCRIPT)115 sed 's/STARTUP(.*)/STARTUP(crt0.o)/' $< > $@116 109 117 110 $(EXPORT_STARTUP_FILE): $(LIBC_STARTUP_FILE)
Note:
See TracChangeset
for help on using the changeset viewer.