Skip to content
Snippets Groups Projects
Commit 0b842d40 authored by Avi Kivity's avatar Avi Kivity
Browse files

build: use ld to link, not g++

This gives us full control over linker options.
parent c0e3f76b
No related branches found
No related tags found
No related merge requests found
......@@ -24,12 +24,16 @@ objects += entry.o
libc = libc/string/strcmp.o
libstdc++.a = $(shell $(CXX) -static -print-file-name=libstdc++.a)
libsupc++.a = $(shell $(CXX) -static -print-file-name=libsupc++.a)
libgcc_s.a = $(shell $(CXX) -static -print-libgcc-file-name)
loader.elf: arch/x64/boot.o arch/x64/loader.ld loader.o runtime.o $(drivers) \
$(objects) \
$(libc) bootfs.bin
$(CXX) $(CXXFLAGS) -nostartfiles -static -nodefaultlibs -o $@ \
$(LD) -o $@ \
$(filter-out %.bin, $(^:%.ld=-T %.ld)) \
-lsupc++ libunwind.a -lstdc++
$(libstdc++.a) $(libsupc++.a) $(libgcc_s.a) libunwind.a
jdk-jni.h := $(shell rpm -ql java-1.7.0-openjdk-devel | grep include/jni.h$$)
jdkbase := $(jdk-jni.h:%/include/jni.h=%)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment