pkg:setup ENV.delete "LD" resource("isl").stage buildpath/"isl" languages = %w[c c++ fortran objc obj-c++] version_suffix = version.to_s.slice(/\d/) ENV["gcc_cv_prog_makeinfo_modern"] = "no" args = [ "--build=x86_64-apple-darwin#{osmajor}", "--prefix=#{prefix}", "--libdir=#{lib}/gcc/#{version_suffix}", "--enable-languages=#{languages.join(",")}", "--program-suffix=-#{version_suffix}", "--with-gmp=#{Formula["gmp"].opt_prefix}", "--with-mpfr=#{Formula["mpfr"].opt_prefix}", "--with-mpc=#{Formula["libmpc"].opt_prefix}", "--with-system-zlib", "--enable-libstdcxx-time=yes", "--enable-stage1-checking", "--enable-checking=release", "--enable-lto", "--enable-plugin", "--disable-werror", "--disable-nls", "--with-pkgversion=Homebrew GCC #{pkg_version} #{build.used_options*" "}".strip, "--with-bugurl=https://github.com/Homebrew/homebrew-core/issues", "--enable-multilib", ] inreplace "libgcc/config/t-slibgcc-darwin", "@shlib_slibdir@", "#{HOMEBREW_PREFIX}/lib/gcc/#{version_suffix}" mkdir "build" && cd build unless MacOS::CLT.installed? args << "--with-native-system-header-dir=/usr/include" args << "--with-sysroot=#{MacOS.sdk_path}"