binutils with GAS and GPROF
またもやHomebrewにPRが却下されたでござる。今回の却下理由は意味不明過ぎて、呆れてものも言えない。
そもそもの発端は、vulkan-sdkというものをビルドしようとしたところcmakeから「GASが見つからない。あったほうが良い」的なことを言われたため。それで、調べたところ本来GASはGNUのbinutilsというパッケージに含まれていることがわかったので、Homebrewでbinutilsを入れたところ、肝心なGASが入っていないため、binutilsのFormulaを、GASとついでにGPROFもインストールできるように改良して、HomebrewにPRを出したところ、「デフォルトでインストールされないものだから必要ない」という謎理由で却下された。お前が要らなくてもGASが必要な人は居るだろうに。
で、vulkan-sdkのほうはC++のヘッダーファイル(vk_loader_platform.h)を書き直さなければならないことが分かったので諦めました。
The following script installs GAS(from GNU binutils) on OSX with Homebrew. This script passed official Jenkins's test on Github.
Overwrite "binutils.rb" and do "brew install -s binutils".
class Binutils < Formula desc "FSF/GNU ld, ar, readelf, etc. for native development" homepage "https://www.gnu.org/software/binutils/binutils.html" url "https://ftp.gnu.org/gnu/binutils/binutils-2.29.1.tar.gz" mirror "https://ftpmirror.gnu.org/binutils/binutils-2.29.1.tar.gz" sha256 "0d9d2bbf71e17903f26a676e7fba7c200e581c84b8f2f43e72d875d0e638771c" revision 1 def install # No --default-names option as it interferes with Homebrew builds. system "./configure", "--disable-debug", "--disable-dependency-tracking", "--enable-deterministic-archives", "--program-prefix=g", "--prefix=#{prefix}", "--infodir=#{info}", "--mandir=#{man}", "--disable-werror", "--enable-interwork", "--enable-multilib", "--enable-64-bit-bfd", "--enable-targets=all" # Do "make" in buildpath at first. # See http://forum.osdev.org/viewtopic.php?p=262707&sid=8a5a5d70c93acab73c5325f629216a91 system "make" system "make", "install" cd "gprof" do system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", "--infodir=#{info}", "--mandir=#{man}", "--enable-plugins", "--disable-werror" system "make", "install" end cd "gas" do system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", "--infodir=#{info}", "--mandir=#{man}", "--enable-plugins", "--disable-werror", "--program-prefix=g", "--with-system-zlib" # Adjustment to install a original named binary into same directry of other original named binarys. inreplace "Makefile", "$(tooldir)", "#{prefix}/$(target)" system "make", "install" end end test do assert_match "main", shell_output("#{bin}/gnm #{bin}/gnm") end end