From: Waldemar Kozaczuk <jwkozac...@gmail.com> Committer: Nadav Har'El <n...@scylladb.com> Branch: master
external x64: remove gcc.bin This patch in essence changes skel manifests to pull libgcc_s.so from host instead of gcc.bin under externals. It also removes external/x64/gcc.bin module. References #743 Signed-off-by: Waldemar Kozaczuk <jwkozac...@gmail.com> Message-Id: <20200122032153.6195-4-jwkozac...@gmail.com> --- diff --git a/.gitmodules b/.gitmodules --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,3 @@ -[submodule "external/x64/gcc.bin"] - path = external/x64/gcc.bin - url = ../../cloudius-systems/gcc.bin - ignore = dirty [submodule "external/x64/acpica"] path = external/x64/acpica url = ../../cloudius-systems/acpica diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -1923,10 +1923,16 @@ $(bootfs_manifest_dep): phony echo -n $(bootfs_manifest) > $(bootfs_manifest_dep) ; \ fi +ifeq ($(arch),x64) +libgcc_s_dir := $(dir $(shell $(CC) -print-file-name=libgcc_s.so.1)) +else +libgcc_s_dir := ../../$(gccbase)/lib64 +endif + $(out)/bootfs.bin: scripts/mkbootfs.py $(bootfs_manifest) $(bootfs_manifest_dep) $(tools:%=$(out)/%) \ $(out)/zpool.so $(out)/zfs.so $(out)/libenviron.so $(out)/libvdso.so $(call quiet, olddir=`pwd`; cd $(out); "$$olddir"/scripts/mkbootfs.py -o bootfs.bin -d bootfs.bin.d -m "$$olddir"/$(bootfs_manifest) \ - -D gccbase="$$olddir"/$(gccbase), MKBOOTFS $@) + -D libgcc_s_dir=$(libgcc_s_dir), MKBOOTFS $@) $(out)/bootfs.o: $(out)/bootfs.bin $(out)/bootfs.o: ASFLAGS += -I$(out) diff --git a/scripts/build b/scripts/build --- a/scripts/build +++ b/scripts/build @@ -169,9 +169,6 @@ aarch64) image=${vars[image]-uush};; esac modules=${vars[modules]-!$image} -# TODO: some modules need these... Would be better if they wouldn't... -gccbase=${vars[gccbase]-"$SRC"/external/$arch/gcc.bin} - case $OUT in /*) OSV_BUILD_PATH=$OUT;; *) OSV_BUILD_PATH=`pwd`/$OUT;; @@ -256,6 +253,7 @@ kernel_end=$(($loader_size+2097151 & ~2097151)) # the case in our old build.mk). cd $OUT +libgcc_s_dir=$(dirname $(readlink -f $(gcc -print-file-name=libgcc_s.so.1))) case $fs_type in zfs) cp loader.img bare.raw @@ -267,15 +265,15 @@ zfs) if [ "$export" == "none" ] then - "$SRC"/scripts/upload_manifest.py -o usr.img -m usr.manifest -D gccbase="$gccbase" + "$SRC"/scripts/upload_manifest.py -o usr.img -m usr.manifest -D libgcc_s_dir="$libgcc_s_dir" else export_dir=${vars[export_dir]-$SRC/build/export} - "$SRC"/scripts/export_manifest.py -e "$export_dir" -m usr.manifest -D gccbase="$gccbase" + "$SRC"/scripts/export_manifest.py -e "$export_dir" -m usr.manifest -D libgcc_s_dir="$libgcc_s_dir" fi ;; rofs) rm -rf rofs.img - "$SRC"/scripts/gen-rofs-img.py -o rofs.img -m usr.manifest -D gccbase="$gccbase" + "$SRC"/scripts/gen-rofs-img.py -o rofs.img -m usr.manifest -D libgcc_s_dir="$libgcc_s_dir" rofs_size=`stat --printf %s rofs.img` img_size=$((kernel_end + rofs_size)) cp loader.img bare.raw diff --git a/usr.manifest.skel b/usr.manifest.skel --- a/usr.manifest.skel +++ b/usr.manifest.skel @@ -9,7 +9,7 @@ /tools/cpiod.so: tools/cpiod/cpiod.so /tools/mount-nfs.so: tools/mount/mount-nfs.so /tools/umount.so: tools/mount/umount.so -/usr/lib/libgcc_s.so.1: %(gccbase)s/lib64/libgcc_s.so.1 +/usr/lib/libgcc_s.so.1: %(libgcc_s_dir)s/libgcc_s.so.1 /&/etc/hosts: ../../static/& /etc/mnttab: ->/proc/mounts /&/etc/fstab: ../../static/& diff --git a/usr_ramfs.manifest.skel b/usr_ramfs.manifest.skel --- a/usr_ramfs.manifest.skel +++ b/usr_ramfs.manifest.skel @@ -3,7 +3,7 @@ /libvdso.so: libvdso.so /tools/mount-nfs.so: tools/mount/mount-nfs.so /tools/umount.so: tools/mount/umount.so -/usr/lib/libgcc_s.so.1: %(gccbase)s/lib64/libgcc_s.so.1 +/usr/lib/libgcc_s.so.1: %(libgcc_s_dir)s/libgcc_s.so.1 /&/etc/hosts: ../../static/& /etc/mnttab: ->/proc/mounts diff --git a/usr_rofs.manifest.skel b/usr_rofs.manifest.skel --- a/usr_rofs.manifest.skel +++ b/usr_rofs.manifest.skel @@ -3,7 +3,7 @@ /libvdso.so: libvdso.so /tools/mount-nfs.so: tools/mount/mount-nfs.so /tools/umount.so: tools/mount/umount.so -/usr/lib/libgcc_s.so.1: %(gccbase)s/lib64/libgcc_s.so.1 +/usr/lib/libgcc_s.so.1: %(libgcc_s_dir)s/libgcc_s.so.1 /&/etc/hosts: ../../static/& /etc/mnttab: ->/proc/mounts -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/000000000000fd0435059cb790b3%40google.com.