Changeset 82d9087 in mainline
- Timestamp:
- 2018-08-01T20:20:52Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3b10ae36
- Parents:
- f787c8e
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-01 20:20:43)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-01 20:20:52)
- Location:
- uspace
- Files:
-
- 1 added
- 10 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/Makefile.common
rf787c8e r82d9087 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 # … … 153 152 BASE_LIBS += $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a $(LIBSOFTINT_PREFIX)/libsoftint.a 154 153 155 ifeq ($(LINK_DYNAMIC),y) 156 LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld 157 else 154 ifneq ($(LINK_DYNAMIC),y) 158 155 LDFLAGS += -static 159 LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld 160 endif 161 162 LIB_LINKER_SCRIPT = $(LIBC_PREFIX)/arch/$(UARCH)/_link-shlib.ld 156 endif 163 157 164 158 INCLUDES_FLAGS = $(LIBC_INCLUDES_FLAGS) … … 261 255 endif 262 256 263 COMMON_CXXFLAGS = $(COMMON_CFLAGS) 257 COMMON_CXXFLAGS = $(COMMON_CFLAGS) -fno-exceptions 264 258 HELENOS_CXXFLAGS = \ 265 259 -std=c++17 -frtti \ … … 351 345 352 346 ifneq ($(filter %.cpp %.cc %.cxx, $(SOURCES)),) 353 $(BINARY): $( LINKER_SCRIPT) $(OBJECTS) $(LIBTAGS)354 $(CXX) $(CXXFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) - T $(LINKER_SCRIPT) -Wl,-Map,$@.map -o $@ $(START_FILES) $(OBJECTS) $(LIBARGS) $(CXX_BASE_LIBS)347 $(BINARY): $(OBJECTS) $(LIBTAGS) 348 $(CXX) $(CXXFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) -Wl,-Map,$@.map -o $@ $(START_FILES) $(OBJECTS) $(LIBARGS) $(CXX_BASE_LIBS) 355 349 else 356 $(BINARY): $( LINKER_SCRIPT) $(OBJECTS) $(LIBTAGS)357 $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) - T $(LINKER_SCRIPT) -Wl,-Map,$@.map -o $@ $(START_FILES) $(OBJECTS) $(LIBARGS) $(BASE_LIBS)350 $(BINARY): $(OBJECTS) $(LIBTAGS) 351 $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) -Wl,-Map,$@.map -o $@ $(START_FILES) $(OBJECTS) $(LIBARGS) $(BASE_LIBS) 358 352 endif 359 353 … … 361 355 362 356 ifneq ($(TEST_BINARY),) 363 $(TEST_BINARY): $( LINKER_SCRIPT) $(TEST_OBJECTS) $(TEST_BINARY_LIBS) $(LIBTAGS)364 $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) - T $(LINKER_SCRIPT) -Wl,-Map,$@.map -o $@ $(START_FILES) $(TEST_OBJECTS) $(TEST_BINARY_LIBS) $(LIBARGS) $(BASE_LIBS)357 $(TEST_BINARY): $(TEST_OBJECTS) $(TEST_BINARY_LIBS) $(LIBTAGS) 358 $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) -Wl,-Map,$@.map -o $@ $(START_FILES) $(TEST_OBJECTS) $(TEST_BINARY_LIBS) $(LIBARGS) $(BASE_LIBS) 365 359 endif 366 360 … … 378 372 $(AR) rc $@ $(LOBJECTS) 379 373 380 $(SLIBRARY): $(LIB _LINKER_SCRIPT) $(LIBRARY).la381 $(CC) $(CFLAGS) $(LIB_LDFLAGS) $(EXTRA_LDFLAGS) - T $(LIB_LINKER_SCRIPT) -Wl,-Map,$@.map -o $@ -Wl,--whole-archive $(LIBRARY).la -Wl,--no-whole-archive $(LIBARGS) $(BASE_LIBS)374 $(SLIBRARY): $(LIBRARY).la 375 $(CC) $(CFLAGS) $(LIB_LDFLAGS) $(EXTRA_LDFLAGS) -Wl,-Map,$@.map -o $@ -Wl,--whole-archive $(LIBRARY).la -Wl,--no-whole-archive $(LIBARGS) $(BASE_LIBS) 382 376 383 377 $(LSONAME): -
uspace/lib/c/Makefile
rf787c8e r82d9087 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.ld 39 40 PRE_DEPEND = 41 EXTRA_OUTPUT = $(LINKER_SCRIPTS) $(START_FILES) 42 EXTRA_CLEAN = $(LINKER_SCRIPTS) 35 EXTRA_OUTPUT = $(START_FILES) 43 36 EXTRA_TEST_CFLAGS = -Wno-deprecated-declarations 44 37 LIBRARY = libc … … 219 212 cp $< $@ 220 213 221 $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in222 $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -E -x c $< | grep -v "^\#" > $@223 224 $(LIBC_PREFIX)/arch/$(UARCH)/_link-shlib.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in225 $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DSHLIB -E -x c $< | grep -v "^\#" > $@226 227 $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in228 $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DDLEXE -E -x c $< | grep -v "^\#" > $@229 230 214 AUTOCHECK = $(realpath $(ROOT_PATH)/tools/autocheck.awk) 231 215 -
uspace/lib/pcut/Makefile
rf787c8e r82d9087 36 36 37 37 test-libpcut-%: $(LIBRARY).a 38 $(CC) $(CFLAGS) $(LDFLAGS) - T $(LINKER_SCRIPT) -o $@ $(START_FILES) $^ $(LIBRARY).a $(BASE_LIBS)38 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(START_FILES) $^ $(LIBRARY).a $(BASE_LIBS) 39 39 -
uspace/lib/pcut/update-from-master.sh
rf787c8e r82d9087 80 80 81 81 test-libpcut-%: $(LIBRARY).a 82 $(CC) $(CFLAGS) $(LDFLAGS) - T $(LINKER_SCRIPT) -o $@ $(START_FILES) $^ $(LIBRARY).a $(BASE_LIBS)82 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(START_FILES) $^ $(LIBRARY).a $(BASE_LIBS) 83 83 84 84 EOF_MAKEFILE_TAIL -
uspace/lib/posix/Makefile
rf787c8e r82d9087 36 36 37 37 SPECS = gcc.specs 38 LIBC_LINKER_SCRIPT = $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld39 EXPORT_LINKER_SCRIPT = link.ld40 38 41 39 EXPORT_FILES = \ … … 48 46 $(LIBC_PREFIX)/crt1.o \ 49 47 $(LIBRARY).a \ 50 $(EXPORT_LINKER_SCRIPT) \51 48 $(SPECS) 52 49 … … 54 51 EXTRA_CLEAN = $(INCLUDE_LIBC) 55 52 56 EXTRA_OUTPUT = $(SPECS) $(EXPORT_LINKER_SCRIPT) $(EXPORT_STARTUP_FILE)53 EXTRA_OUTPUT = $(SPECS) 57 54 58 55 SOURCES = \ … … 92 89 EXPORT_LDFLAGS = \ 93 90 -L$$(HELENOS_EXPORT_ROOT)/lib \ 94 -T link.ld \95 91 $$(HELENOS_EXPORT_ROOT)/lib/crt0.o \ 96 92 $$(HELENOS_EXPORT_ROOT)/lib/crt1.o … … 114 110 echo '$(EXPORT_LDLIBS)' >> $@.new 115 111 mv $@.new $@ 116 117 $(EXPORT_LINKER_SCRIPT): $(LIBC_LINKER_SCRIPT)118 cp $< $@119 120 $(EXPORT_STARTUP_FILE): $(LIBC_STARTUP_FILE)121 cp $< $@122 112 123 113 $(INCLUDE_LIBC): $(shell find ../c/include -name '*.h') -
uspace/srv/loader/Makefile
rf787c8e r82d9087 29 29 30 30 USPACE_PREFIX = ../.. 31 ROOT_PATH = $(USPACE_PREFIX)/.. 32 CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config 31 33 32 EXTRA_LDFLAGS = -Wl,-Ttext-segment=0x70000000 34 include $(CONFIG_MAKEFILE) 35 36 ifeq ($(UARCH),ia64) 37 # IA64 has a peculiar linker script with a fixed data segment address. 38 # Because the loader is a separate nonrelocatable binary in the same 39 # address space as the application, we provide a modified copy of 40 # the default linker script to work around that. 41 EXTRA_LDFLAGS = -T elf64_ia64_loader.x 42 else 43 # On all other architectures, we can simply move the text segment. 44 EXTRA_LDFLAGS = -Wl,-Ttext-segment=0x70000000 45 endif 33 46 34 47 BINARY = loader
Note:
See TracChangeset
for help on using the changeset viewer.