diff --git a/README.md b/README.md index cda81f8d24148c3f5d207d37c39c0cd597cc06db..23cd08765989c0ee09cdea6ab00d297cbee2e559 100644 --- a/README.md +++ b/README.md @@ -442,7 +442,7 @@ autoreconf -si ``` - Configure Dynare from the source directory: ```sh -./configure --with-matlab=<…> CC=gcc-10 CXX=g++-10 CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib LEX=/usr/local/opt/flex/bin/flex YACC=/usr/local/opt/bison/bin/bison +./configure --with-matlab=<…> CC=gcc-11 CXX=g++-11 CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib LEX=/usr/local/opt/flex/bin/flex YACC=/usr/local/opt/bison/bin/bison ``` where the path to MATLAB is specified, typically of the form `/Applications/MATLAB_R2020b.app`. If you don’t have MATLAB, simply replace diff --git a/macOS/brewfiles/gcc.rb b/macOS/brewfiles/gcc.rb index d809efccee6f938c38bc9eb2dbf82066327d2896..7bc5a61a89c48263715957529288ae0a439d078a 100644 --- a/macOS/brewfiles/gcc.rb +++ b/macOS/brewfiles/gcc.rb @@ -4,62 +4,53 @@ class Gcc < Formula if Hardware::CPU.arm? # Branch from the Darwin maintainer of GCC with Apple Silicon support, # located at https://github.com/iains/gcc-darwin-arm64 and - # backported with his help to gcc-10 branch. Too big for a patch. - url "https://github.com/fxcoudert/gcc/archive/gcc-10-arm-20201228.tar.gz" - sha256 "dd5377a13f0ee4645bce1c18ed7327ea4ad5f8bd5c6a2a24eb299c647d3d43f4" - version "10.2.0" + # backported with his help to gcc-11 branch. Too big for a patch. + url "https://github.com/fxcoudert/gcc/archive/refs/tags/gcc-11.1.0-arm-20210504.tar.gz" + sha256 "ce862b4a4bdc8f36c9240736d23cd625a48af82c2332d2915df0e16e1609a74c" + version "11.1.0" else - url "https://ftp.gnu.org/gnu/gcc/gcc-10.2.0/gcc-10.2.0.tar.xz" - mirror "https://ftpmirror.gnu.org/gcc/gcc-10.2.0/gcc-10.2.0.tar.xz" - sha256 "b8dd4368bb9c7f0b98188317ee0254dd8cc99d1e3a18d0ff146c855fe16c1d8c" + url "https://ftp.gnu.org/gnu/gcc/gcc-11.1.0/gcc-11.1.0.tar.xz" + mirror "https://ftpmirror.gnu.org/gcc/gcc-11.1.0/gcc-11.1.0.tar.xz" + sha256 "4c4a6fb8a8396059241c2e674b85b351c26a5d678274007f076957afa1cc9ddf" end - license "GPL-3.0" - revision 2 + license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" } + revision 1 head "https://gcc.gnu.org/git/gcc.git" livecheck do # Should be # url :stable # but that does not work with the ARM-specific branch above - url "https://ftp.gnu.org/gnu/gcc/gcc-10.2.0" + url "https://ftp.gnu.org/gnu/gcc/gcc-11.1.0" regex(%r{href=.*?gcc[._-]v?(\d+(?:\.\d+)+)(?:/?["' >]|\.t)}i) end bottle do - root_url "https://homebrew.bintray.com/bottles" - cellar :any - sha256 "7d6952bb9c36d08e658e7e9b0637805a49184a1c7506c020ffa839e7ca756ba3" => :big_sur - sha256 "537582c8fb519a87b3e213953a8c2daadf11339559b9da17dd9fab95d8768dfc" => :arm64_big_sur - sha256 "4c17591306a2c233bdb9c469ceec3057a1b76ac4d194942737c322ffc22cb440" => :catalina - sha256 "d4ef938e9e1d7e4247b653e4b3f5fb13e55a3dc6d50ea64f0e914271edd78c7c" => :mojave + sha256 cellar: :any, arm64_big_sur: "5ad4c157cf19f01c6acfed380db28ff15276f02f4b5d6a20f5a7034583b174aa" + sha256 cellar: :any, big_sur: "4ec68e83ce46f4c686a4c9a7f90a748705543826da81e4c74c78d210b6c66c81" + sha256 cellar: :any, catalina: "c8405807d9bdab853432100e8d85bf3b4c7d4a4123067f099699a492d40a430b" + sha256 cellar: :any, mojave: "cac0a37271b71e40b3df7b9fa83190c11dfcd9640d8b3d02bc2ba2bae5b964ac" end # The bottles are built on systems with the CLT installed, and do not work # out of the box on Xcode-only systems due to an incorrect sysroot. - pour_bottle? do - reason "The bottle needs the Xcode CLT to be installed." - satisfy { MacOS::CLT.installed? } - end + pour_bottle? only_if: :clt_installed depends_on "gmp" depends_on "isl" depends_on "libmpc" depends_on "mpfr" + depends_on "zstd" uses_from_macos "zlib" + on_linux do + depends_on "binutils" + end + # GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib cxxstdlib_check :skip - if Hardware::CPU.arm? - # Patch for Big Sur version numbering, remove with GCC 11 - # https://github.com/iains/gcc-darwin-arm64/commit/556ab512 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/7baf6e2f/gcc/bigsur.diff" - sha256 "42de3bc4889b303258a4075f88ad8624ea19384cab57a98a5270638654b83f41" - end - end - def version_suffix if build.head? "HEAD" @@ -77,12 +68,12 @@ class Gcc < Formula # - Go, currently not supported on macOS # - BRIG languages = %w[c c++ objc obj-c++ fortran] + languages << "d" if Hardware::CPU.intel? pkgversion = "Homebrew GCC #{pkg_version} #{build.used_options*" "}".strip cpu = Hardware::CPU.arm? ? "aarch64" : "x86_64" args = %W[ - --build=#{cpu}-apple-darwin#{OS.kernel_version.major} --prefix=#{prefix} --libdir=#{lib}/gcc/#{version_suffix} --disable-nls @@ -93,42 +84,71 @@ class Gcc < Formula --with-mpfr=#{Formula["mpfr"].opt_prefix} --with-mpc=#{Formula["libmpc"].opt_prefix} --with-isl=#{Formula["isl"].opt_prefix} - --with-system-zlib + --with-zstd=#{Formula["zstd"].opt_prefix} --with-pkgversion=#{pkgversion} - --with-bugurl=https://github.com/Homebrew/homebrew-core/issues + --with-bugurl=#{tap.issues_url} ] + # libphobos is part of gdc + args << "--enable-libphobos" if Hardware::CPU.intel? + + on_macos do + args << "--build=#{cpu}-apple-darwin#{OS.kernel_version.major}" + args << "--with-system-zlib" - # Xcode 10 dropped 32-bit support - args << "--disable-multilib" if DevelopmentTools.clang_build_version >= 1000 + # Xcode 10 dropped 32-bit support + args << "--disable-multilib" if DevelopmentTools.clang_build_version >= 1000 - # System headers may not be in /usr/include - sdk = MacOS.sdk_path_if_needed - if sdk - args << "--with-native-system-header-dir=/usr/include" - args << "--with-sysroot=#{sdk}" + # Workaround for Xcode 12.5 bug on Intel + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100340 + args << "--without-build-config" if Hardware::CPU.intel? && DevelopmentTools.clang_build_version >= 1205 + + # System headers may not be in /usr/include + sdk = MacOS.sdk_path_if_needed + if sdk + args << "--with-native-system-header-dir=/usr/include" + args << "--with-sysroot=#{sdk}" + end + + # Ensure correct install names when linking against libgcc_s; + # see discussion in https://github.com/Homebrew/legacy-homebrew/pull/34303 + inreplace "libgcc/config/t-slibgcc-darwin", "@shlib_slibdir@", "#{HOMEBREW_PREFIX}/lib/gcc/#{version_suffix}" end - # Mojave uses the Catalina SDK which causes issues like - # https://github.com/Homebrew/homebrew-core/issues/46393 - ENV["ac_cv_func_aligned_alloc"] = "no" if MacOS.version == :mojave + on_linux do + # Fix cc1: error while loading shared libraries: libisl.so.15 + args << "--with-boot-ldflags=-static-libstdc++ -static-libgcc #{ENV["LDFLAGS"]}" - # Avoid reference to sed shim - args << "SED=/usr/bin/sed" + # Fix Linux error: gnu/stubs-32.h: No such file or directory. + args << "--disable-multilib" - # Ensure correct install names when linking against libgcc_s; - # see discussion in https://github.com/Homebrew/legacy-homebrew/pull/34303 - inreplace "libgcc/config/t-slibgcc-darwin", "@shlib_slibdir@", "#{HOMEBREW_PREFIX}/lib/gcc/#{version_suffix}" + # Change the default directory name for 64-bit libraries to `lib` + # https://stackoverflow.com/a/54038769 + inreplace "gcc/config/i386/t-linux64", "m64=../lib64", "m64=" + end mkdir "build" do system "../configure", *args - # Use -headerpad_max_install_names in the build, - # otherwise updated load commands won't fit in the Mach-O header. - # This is needed because `gcc` avoids the superenv shim. - system "make", "BOOT_LDFLAGS=-Wl,-headerpad_max_install_names" - system "make", "install" + on_macos do + # Use -headerpad_max_install_names in the build, + # otherwise updated load commands won't fit in the Mach-O header. + # This is needed because `gcc` avoids the superenv shim. + system "make", "BOOT_LDFLAGS=-Wl,-headerpad_max_install_names" + system "make", "install" + end + + on_linux do + system "make" + system "make", "install-strip" + end bin.install_symlink bin/"gfortran-#{version_suffix}" => "gfortran" + bin.install_symlink bin/"gdc-#{version_suffix}" => "gdc" if Hardware::CPU.intel? + + on_linux do + # Only the newest brewed gcc should install gfortan libs as we can only have one. + lib.install_symlink Dir[lib/"gcc/#{version_suffix}/libgfortran.*"] + end end # Handle conflicts between GCC formulae and avoid interfering @@ -146,6 +166,81 @@ class Gcc < Formula File.rename file, "#{dir}/#{base}-#{suffix}#{ext}" end + def post_install + on_linux do + gcc = bin/"gcc-#{version_suffix}" + libgcc = Pathname.new(Utils.safe_popen_read(gcc, "-print-libgcc-file-name")).parent + raise "command failed: #{gcc} -print-libgcc-file-name" if $CHILD_STATUS.exitstatus.nonzero? + + glibc = Formula["glibc"] + glibc_installed = glibc.any_version_installed? + + # Symlink system crt1.o and friends where gcc can find it. + crtdir = if glibc_installed + glibc.opt_lib + else + Pathname.new(Utils.safe_popen_read("/usr/bin/cc", "-print-file-name=crti.o")).parent + end + ln_sf Dir[crtdir/"*crt?.o"], libgcc + + # Create the GCC specs file + # See https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html + + # Locate the specs file + specs = libgcc/"specs" + ohai "Creating the GCC specs file: #{specs}" + specs_orig = Pathname.new("#{specs}.orig") + rm_f [specs_orig, specs] + + system_header_dirs = ["#{HOMEBREW_PREFIX}/include"] + + if glibc_installed + # https://github.com/Linuxbrew/brew/issues/724 + system_header_dirs << glibc.opt_include + else + # Locate the native system header dirs if user uses system glibc + target = Utils.safe_popen_read(gcc, "-print-multiarch").chomp + raise "command failed: #{gcc} -print-multiarch" if $CHILD_STATUS.exitstatus.nonzero? + + system_header_dirs += ["/usr/include/#{target}", "/usr/include"] + end + + # Save a backup of the default specs file + specs_string = Utils.safe_popen_read(gcc, "-dumpspecs") + raise "command failed: #{gcc} -dumpspecs" if $CHILD_STATUS.exitstatus.nonzero? + + specs_orig.write specs_string + + # Set the library search path + # For include path: + # * `-isysroot #{HOMEBREW_PREFIX}/nonexistent` prevents gcc searching built-in + # system header files. + # * `-idirafter <dir>` instructs gcc to search system header + # files after gcc internal header files. + # For libraries: + # * `-nostdlib -L#{libgcc}` instructs gcc to use brewed glibc + # if applied. + # * `-L#{libdir}` instructs gcc to find the corresponding gcc + # libraries. It is essential if there are multiple brewed gcc + # with different versions installed. + # Noted that it should only be passed for the `gcc@*` formulae. + # * `-L#{HOMEBREW_PREFIX}/lib` instructs gcc to find the rest + # brew libraries. + libdir = HOMEBREW_PREFIX/"lib/gcc/#{version_suffix}" + specs.write specs_string + <<~EOS + *cpp_unique_options: + + -isysroot #{HOMEBREW_PREFIX}/nonexistent #{system_header_dirs.map { |p| "-idirafter #{p}" }.join(" ")} + + *link_libgcc: + #{glibc_installed ? "-nostdlib -L#{libgcc}" : "+"} -L#{libdir} -L#{HOMEBREW_PREFIX}/lib + + *link: + + --dynamic-linker #{HOMEBREW_PREFIX}/lib/ld.so -rpath #{libdir} -rpath #{HOMEBREW_PREFIX}/lib + + EOS + end + end + test do (testpath/"hello-c.c").write <<~EOS #include <stdio.h> @@ -160,9 +255,13 @@ class Gcc < Formula (testpath/"hello-cc.cc").write <<~EOS #include <iostream> + struct exception { }; int main() { std::cout << "Hello, world!" << std::endl; + try { throw exception{}; } + catch (exception) { } + catch (...) { } return 0; } EOS @@ -182,5 +281,18 @@ class Gcc < Formula EOS system "#{bin}/gfortran", "-o", "test", "test.f90" assert_equal "Done\n", `./test` + + if Hardware::CPU.intel? + (testpath/"hello_d.d").write <<~EOS + import std.stdio; + int main() + { + writeln("Hello, world!"); + return 0; + } + EOS + system "#{bin}/gdc-#{version_suffix}", "-o", "hello-d", "hello_d.d" + assert_equal "Hello, world!\n", `./hello-d` + end end end diff --git a/macOS/brewfiles/gmp.rb b/macOS/brewfiles/gmp.rb index 4f8865d69798e231b806236a870b45653b2b3ce4..870af2b0a265717d77ab84a684c40518d59ee0f6 100644 --- a/macOS/brewfiles/gmp.rb +++ b/macOS/brewfiles/gmp.rb @@ -12,13 +12,11 @@ class Gmp < Formula end bottle do - root_url "https://homebrew.bintray.com/bottles" - cellar :any - sha256 "6a44705536f25c4b9f8547d44d129ae3b3657755039966ad2b86b821e187c32c" => :big_sur - sha256 "ff4ad8d068ba4c14d146abb454991b6c4f246796ec2538593dc5f04ca7593eec" => :arm64_big_sur - sha256 "35e9f82d80708ae8dea2d6b0646dcd86d692321b96effaa76b7fad4d6cffa5be" => :catalina - sha256 "00fb998dc2abbd09ee9f2ad733ae1adc185924fb01be8814e69a57ef750b1a32" => :mojave - sha256 "54191ce7fa888df64b9c52870531ac0ce2e8cbd40a7c4cdec74cb2c4a421af97" => :high_sierra + sha256 cellar: :any, arm64_big_sur: "ff4ad8d068ba4c14d146abb454991b6c4f246796ec2538593dc5f04ca7593eec" + sha256 cellar: :any, big_sur: "6a44705536f25c4b9f8547d44d129ae3b3657755039966ad2b86b821e187c32c" + sha256 cellar: :any, catalina: "35e9f82d80708ae8dea2d6b0646dcd86d692321b96effaa76b7fad4d6cffa5be" + sha256 cellar: :any, mojave: "00fb998dc2abbd09ee9f2ad733ae1adc185924fb01be8814e69a57ef750b1a32" + sha256 cellar: :any, high_sierra: "54191ce7fa888df64b9c52870531ac0ce2e8cbd40a7c4cdec74cb2c4a421af97" end uses_from_macos "m4" => :build diff --git a/macOS/brewfiles/isl.rb b/macOS/brewfiles/isl.rb index a2dfc9b74e0f8a8b62d3c752ab68fc4472761e2a..1c3af44f6ebe240b1c275076257d779942cdc565 100644 --- a/macOS/brewfiles/isl.rb +++ b/macOS/brewfiles/isl.rb @@ -7,9 +7,8 @@ class Isl < Formula # and update isl_version() function accordingly. All other names will # result in isl_version() function returning "UNKNOWN" and hence break # package detection. - url "http://isl.gforge.inria.fr/isl-0.23.tar.xz" - mirror "https://deb.debian.org/debian/pool/main/i/isl/isl_0.23.orig.tar.xz" - sha256 "5efc53efaef151301f4e7dde3856b66812d8153dede24fab17673f801c8698f2" + url "http://isl.gforge.inria.fr/isl-0.24.tar.xz" + sha256 "043105cc544f416b48736fff8caf077fb0663a717d06b1113f16e391ac99ebad" license "MIT" livecheck do @@ -18,12 +17,10 @@ class Isl < Formula end bottle do - root_url "https://homebrew.bintray.com/bottles" - cellar :any - sha256 "77907a43a415210de713d9e82588b452e5546a31b42194c7c75e07486d319a51" => :big_sur - sha256 "5b066bc471862c8d166082f0d1bf6b132aac0117f67e19bba139dfe907eb2614" => :arm64_big_sur - sha256 "bb4c986e9f49c7eea6349a536889e6223549885c0aab3d7692542cd48bc06481" => :catalina - sha256 "066330367dcc69e8d200a1d26a7f6ca580ecc3c397a686fa3b2fbd36d5d88ada" => :mojave + sha256 cellar: :any, arm64_big_sur: "cf7f8b77fc0e51bc9c9921306737176e6f9e03062255a525d9ab59cf91ed3d36" + sha256 cellar: :any, big_sur: "d8c7026042e122143e0729bf3a596be77753b8cfeddcae200cd3a3c18176800c" + sha256 cellar: :any, catalina: "f33ee49a23fbde05392be23110d14add72aaed390ffd3aefc400645eeb1772d4" + sha256 cellar: :any, mojave: "34b71567d6bfb7e4cb4aced1d089fe6d72988af02775730be26b5bcea483d065" end head do @@ -43,6 +40,7 @@ class Isl < Formula "--prefix=#{prefix}", "--with-gmp=system", "--with-gmp-prefix=#{Formula["gmp"].opt_prefix}" + system "make" system "make", "install" (share/"gdb/auto-load").install Dir["#{lib}/*-gdb.py"] end diff --git a/macOS/brewfiles/libmpc.rb b/macOS/brewfiles/libmpc.rb index 7558267772d6cbbec3ae178eb2a4a375e8afc3bb..aa73c72d00a8a66c4eae27ffbaf9b811431d0c3c 100644 --- a/macOS/brewfiles/libmpc.rb +++ b/macOS/brewfiles/libmpc.rb @@ -6,18 +6,12 @@ class Libmpc < Formula sha256 "17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459" license "LGPL-3.0-or-later" - livecheck do - url :stable - end - bottle do - root_url "https://homebrew.bintray.com/bottles" - cellar :any - sha256 "754667644cc287cd9691fd3215df260aa971562b5a7b6ca65e29b2e15ea1e656" => :big_sur - sha256 "6a93bd78c1b55f8b29e11fd1e9c68c6c305ffe74aa5b978ba93189b6d84d1451" => :arm64_big_sur - sha256 "8c037df4b551058d00351676dc2c5ec395bd69c88545fac9ccfd0749dadb8ee2" => :catalina - sha256 "c229b6def61f4acc41b4b159d93dbc63a5c77f87f61623c9f7c5399da440cc4f" => :mojave - sha256 "939f0ad01d809356e33bdc70a8a8483eb1b021fd5f3723d0e61a2698af00f01b" => :high_sierra + sha256 cellar: :any, arm64_big_sur: "6a93bd78c1b55f8b29e11fd1e9c68c6c305ffe74aa5b978ba93189b6d84d1451" + sha256 cellar: :any, big_sur: "754667644cc287cd9691fd3215df260aa971562b5a7b6ca65e29b2e15ea1e656" + sha256 cellar: :any, catalina: "8c037df4b551058d00351676dc2c5ec395bd69c88545fac9ccfd0749dadb8ee2" + sha256 cellar: :any, mojave: "c229b6def61f4acc41b4b159d93dbc63a5c77f87f61623c9f7c5399da440cc4f" + sha256 cellar: :any, high_sierra: "939f0ad01d809356e33bdc70a8a8483eb1b021fd5f3723d0e61a2698af00f01b" end depends_on "gmp" diff --git a/macOS/brewfiles/mpfr.rb b/macOS/brewfiles/mpfr.rb index 2a06bdc1a6699116ead44043ca246c0afa19a81d..b6da5f5eb4c128f04eb09832f639eb66c43713d6 100644 --- a/macOS/brewfiles/mpfr.rb +++ b/macOS/brewfiles/mpfr.rb @@ -6,18 +6,12 @@ class Mpfr < Formula sha256 "0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f" license "GPL-3.0" - livecheck do - url :stable - end - bottle do - root_url "https://homebrew.bintray.com/bottles" - cellar :any - sha256 "1e8eb0326f62d3461d420d98af6fc088daca481cae89fd77a75b420d2e76d776" => :big_sur - sha256 "9df11560dd3650ffae35c134cef6e0e91aad0e862f5c8895c568b828cf0598d5" => :arm64_big_sur - sha256 "5fcf57834f58c18761c6c7b0eb961eb7f9fc54325b5361bf3a17c4dee6ebc08a" => :catalina - sha256 "93c0d2ca093819f125300002cd34c1d1b4dfb7a1403729205861bec21388ff12" => :mojave - sha256 "77581a1df66fb1ef55ffb19777d08b0b60fbc3d2d7ad491a8aceb3a6a4bf7ffd" => :high_sierra + sha256 cellar: :any, arm64_big_sur: "9df11560dd3650ffae35c134cef6e0e91aad0e862f5c8895c568b828cf0598d5" + sha256 cellar: :any, big_sur: "1e8eb0326f62d3461d420d98af6fc088daca481cae89fd77a75b420d2e76d776" + sha256 cellar: :any, catalina: "5fcf57834f58c18761c6c7b0eb961eb7f9fc54325b5361bf3a17c4dee6ebc08a" + sha256 cellar: :any, mojave: "93c0d2ca093819f125300002cd34c1d1b4dfb7a1403729205861bec21388ff12" + sha256 cellar: :any, high_sierra: "77581a1df66fb1ef55ffb19777d08b0b60fbc3d2d7ad491a8aceb3a6a4bf7ffd" end depends_on "gmp" diff --git a/macOS/brewfiles/zstd.rb b/macOS/brewfiles/zstd.rb new file mode 100644 index 0000000000000000000000000000000000000000..622269387c659a3044a8e116c8042e9f30a3ff7c --- /dev/null +++ b/macOS/brewfiles/zstd.rb @@ -0,0 +1,38 @@ +class Zstd < Formula + desc "Zstandard is a real-time compression algorithm" + homepage "https://facebook.github.io/zstd/" + url "https://github.com/facebook/zstd/archive/v1.5.0.tar.gz" + sha256 "0d9ade222c64e912d6957b11c923e214e2e010a18f39bec102f572e693ba2867" + license "BSD-3-Clause" + head "https://github.com/facebook/zstd.git", branch: "dev" + + bottle do + sha256 cellar: :any, arm64_big_sur: "e8962c7923904213f312c86372b670b6b5a7ac7103ee63254ab3d1c349913246" + sha256 cellar: :any, big_sur: "eae17621cfc664d6e527a6d6aa6a000343eced0f60c81b4e2dd9a9aed7b79c3f" + sha256 cellar: :any, catalina: "571d031a8fe1b96f68c4c50c2e72532adbad273c565420cb0825cf4745f512bc" + sha256 cellar: :any, mojave: "8089b1b5c398c95af5eaacea6033829dd8d255c9f32d6fa2f0c436821c902087" + end + + depends_on "cmake" => :build + + uses_from_macos "zlib" + + def install + cd "build/cmake" do + system "cmake", "-S", ".", "-B", "builddir", + "-DZSTD_BUILD_CONTRIB=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *std_cmake_args + system "cmake", "--build", "builddir" + system "cmake", "--install", "builddir" + end + end + + test do + assert_equal "hello\n", + pipe_output("#{bin}/zstd | #{bin}/zstd -d", "hello\n", 0) + + assert_equal "hello\n", + pipe_output("#{bin}/pzstd | #{bin}/pzstd -d", "hello\n", 0) + end +end diff --git a/macOS/build.sh b/macOS/build.sh index 35e9814da795d7eac03fe36897ad8e91af6ddcab..2c0f7b78519a39e818961a6cefae564529d99bc3 100755 --- a/macOS/build.sh +++ b/macOS/build.sh @@ -22,7 +22,7 @@ set -ex ROOTDIR=$(pwd)/.. # Set the GCC version -GCC_VERSION=10 +GCC_VERSION=11 # Set the compilers CC=gcc-$GCC_VERSION diff --git a/preprocessor b/preprocessor index 824433aa3f1bd9b5e4f7c395231111242b3c308a..e6e25a5c87682c8bf3d6f42524ff8bfbc909bc8a 160000 --- a/preprocessor +++ b/preprocessor @@ -1 +1 @@ -Subproject commit 824433aa3f1bd9b5e4f7c395231111242b3c308a +Subproject commit e6e25a5c87682c8bf3d6f42524ff8bfbc909bc8a