From 7572b3cb1515dc048b877b249bbf8cb15348bae1 Mon Sep 17 00:00:00 2001 From: Jon Maltiel Swenson Date: Thu, 16 Jan 2025 16:31:42 -0800 Subject: [PATCH] Minor tweaks to xz and libiberty builds Summary: X-link: https://github.com/facebookincubator/zstrong/pull/1145 This diff contains a few changes to the xz and libiberty getdeps builds that are required in order for folly to build as a shared library, which in turn is needed for folly's Python extensions to build correctly. Reviewed By: hyuen Differential Revision: D68252093 fbshipit-source-id: 036bc4a0e7bf9a11f0a4aa6ec0014f7935afbb5b --- build/fbcode_builder/manifests/libiberty | 9 ++++----- build/fbcode_builder/manifests/xz | 3 --- .../patches/libiberty_install_pic_lib.patch | 13 +++++++++++++ 3 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 build/fbcode_builder/patches/libiberty_install_pic_lib.patch diff --git a/build/fbcode_builder/manifests/libiberty b/build/fbcode_builder/manifests/libiberty index da022dfca..1e116f11e 100644 --- a/build/fbcode_builder/manifests/libiberty +++ b/build/fbcode_builder/manifests/libiberty @@ -9,19 +9,18 @@ binutils binutils-dev [download] -url = https://ftp.gnu.org/gnu/binutils/binutils-2.42.tar.xz -sha256 = f6e4d41fd5fc778b06b7891457b3620da5ecea1006c6a4a41ae998109f85a800 +url = https://ftp.gnu.org/gnu/binutils/binutils-2.43.tar.xz +sha256 = b53606f443ac8f01d1d5fc9c39497f2af322d99e14cea5c0b4b124d630379365 [dependencies] zlib [build] builder = autoconf -subdir = binutils-2.42/libiberty +subdir = binutils-2.43/libiberty +patchfile = libiberty_install_pic_lib.patch # only build the parts needed for demangling # as we still want to use system linker and assembler etc [autoconf.args] ---disable-shared ---disable-testsuite --enable-install-libiberty diff --git a/build/fbcode_builder/manifests/xz b/build/fbcode_builder/manifests/xz index e6c0808ff..6552f2871 100644 --- a/build/fbcode_builder/manifests/xz +++ b/build/fbcode_builder/manifests/xz @@ -18,6 +18,3 @@ sha256 = f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10 [build] builder = autoconf subdir = xz-5.2.5 - -[autoconf.args] ---disable-shared diff --git a/build/fbcode_builder/patches/libiberty_install_pic_lib.patch b/build/fbcode_builder/patches/libiberty_install_pic_lib.patch new file mode 100644 index 000000000..6346c3b30 --- /dev/null +++ b/build/fbcode_builder/patches/libiberty_install_pic_lib.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile.in b/Makefile.in +index b77a41c..cbe71fe 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -389,7 +389,7 @@ MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` + install_to_libdir: all + if test -n "${target_header_dir}"; then \ + ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \ +- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \ ++ $(INSTALL_DATA) pic/$(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \ + ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \ + mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \ + case "${target_header_dir}" in \