From 48588f4d24b16d705738107c38e9375a23a74aaa Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 19 May 2019 20:35:21 -0400 Subject: build: Fix broken libgcc_s.so link Before: /usr/lib/amd64-linux-glibc/gcc/8/libgcc_s.so -> ../../ After: /usr/lib/amd64-linux-glibc/gcc/8/libgcc_s.so -> /lib/amd64-linux-glibc/libgcc_s.so.1 --- (limited to 'build') diff --git a/build b/build index 68a1d8f..671ba31 100755 --- a/build +++ b/build @@ -1,5 +1,7 @@ #!/usr/bin/make -f +libgcc_soversion = 1 + # POSIX.1-2008: # If the pathname does not begin with a '/' it shall be treated as relative to # the current working directory of the process, not relative to the directory @@ -208,9 +210,6 @@ install-native: # Target-arch libraries: mkdir -p $(destdir)$(libdir) mv $(destdir)$(libdir)/$(libsuffix)/* $(destdir)$(libdir) - # Put libgcc_s.so.* under /lib. - mkdir -p $(destdir)/lib/$(OPK_HOST_ARCH) - mv $(destdir)$(libdir)/libgcc_s.so.* $(destdir)/lib/$(OPK_HOST_ARCH) # Put *.so links in a versioned directory. We want links to # libfoo.so.x, not libfoo.x.y.z as libtool generates. set -e; \ @@ -223,6 +222,11 @@ install-native: # Put *.o and *.spec files in a versioned directory. mv $(destdir)$(libdir)/*.o $(destdir)$(libdir)/*.spec \ $(destdir)$(tgtlibdir) + # Put libgcc_s.so.* under /lib. + mkdir -p $(destdir)/lib/$(OPK_HOST_ARCH) + mv $(destdir)$(libdir)/libgcc_s.so.* $(destdir)/lib/$(OPK_HOST_ARCH) + ln -sf /lib/$(OPK_HOST_ARCH)/libgcc_s.so.$(libgcc_soversion) \ + $(destdir)$(tgtlibdir)/libgcc_s.so # Remove libitm files. rm -f $(destdir)$(libdir)/libitm.* # Remove libmpx files. -- cgit v0.9.1