mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-08 12:18:31 +00:00
Upgrade mono repo to cosmocc 3.2
The toolchain will now be downloaded going forward from multiple pinned URLs which have shasums. Either wget or curl must be installed. This change unblocks #1053
This commit is contained in:
parent
a334f9cc33
commit
0de6a08988
75 changed files with 183 additions and 19489 deletions
17107
third_party/gcc/LICENSE.txt
vendored
17107
third_party/gcc/LICENSE.txt
vendored
File diff suppressed because it is too large
Load diff
27
third_party/gcc/README.cosmo
vendored
27
third_party/gcc/README.cosmo
vendored
|
@ -1,27 +0,0 @@
|
|||
DESCRIPTION
|
||||
|
||||
Cosmopolitan GCC
|
||||
Prebuilt x86_64-linux binaries
|
||||
An APE-friendly C/C++ compiler
|
||||
|
||||
LICENSE
|
||||
|
||||
GPLv3 and other licenses (see LICENSE.txt)
|
||||
|
||||
ORIGIN
|
||||
|
||||
@ahgamut's musl-cross-make fork
|
||||
https://github.com/ahgamut/musl-cross-make/
|
||||
e58abc1110b335a3341e8ad5821ad8e3880d9bb2
|
||||
|
||||
MODIFICATIONS
|
||||
|
||||
ahgamut's musl-cross-make fork includes a 2kLOC patch that modifies
|
||||
GCC so it'll compile C code like `switch(errno){case EINVAL: etc.}`
|
||||
see third_party/gcc/portcosmo.patch for GCC 11.2.0 for our changes
|
||||
|
||||
NOTES
|
||||
|
||||
These binaries were compiled by Justine Tunney. You have the freedom
|
||||
to obtain the original source source code, apply our patch, and enjoy
|
||||
all the freedoms promised to you by the GNU General Public License.
|
|
@ -1 +0,0 @@
|
|||
../../bin/aarch64-linux-musl-ar
|
|
@ -1 +0,0 @@
|
|||
../../bin/aarch64-linux-musl-as
|
BIN
third_party/gcc/aarch64-linux-musl/bin/ld.bfd.gz
vendored
BIN
third_party/gcc/aarch64-linux-musl/bin/ld.bfd.gz
vendored
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
ld.bfd
|
|
@ -1 +0,0 @@
|
|||
../../bin/aarch64-linux-musl-nm
|
|
@ -1 +0,0 @@
|
|||
../../bin/aarch64-linux-musl-objcopy
|
|
@ -1 +0,0 @@
|
|||
../../bin/aarch64-linux-musl-objdump
|
|
@ -1 +0,0 @@
|
|||
../../bin/aarch64-linux-musl-strip
|
BIN
third_party/gcc/bin/aarch64-linux-musl-addr2line.gz
vendored
BIN
third_party/gcc/bin/aarch64-linux-musl-addr2line.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/aarch64-linux-musl-ar.gz
vendored
BIN
third_party/gcc/bin/aarch64-linux-musl-ar.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/aarch64-linux-musl-as.gz
vendored
BIN
third_party/gcc/bin/aarch64-linux-musl-as.gz
vendored
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
aarch64-linux-musl-g++
|
BIN
third_party/gcc/bin/aarch64-linux-musl-c++filt.gz
vendored
BIN
third_party/gcc/bin/aarch64-linux-musl-c++filt.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/aarch64-linux-musl-g++.gz
vendored
BIN
third_party/gcc/bin/aarch64-linux-musl-g++.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/aarch64-linux-musl-gcc-nm.gz
vendored
BIN
third_party/gcc/bin/aarch64-linux-musl-gcc-nm.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/aarch64-linux-musl-gcc.gz
vendored
BIN
third_party/gcc/bin/aarch64-linux-musl-gcc.gz
vendored
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
../aarch64-linux-musl/bin/ld.bfd
|
|
@ -1 +0,0 @@
|
|||
../aarch64-linux-musl/bin/ld.bfd
|
BIN
third_party/gcc/bin/aarch64-linux-musl-nm.gz
vendored
BIN
third_party/gcc/bin/aarch64-linux-musl-nm.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/aarch64-linux-musl-objcopy.gz
vendored
BIN
third_party/gcc/bin/aarch64-linux-musl-objcopy.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/aarch64-linux-musl-objdump.gz
vendored
BIN
third_party/gcc/bin/aarch64-linux-musl-objdump.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/aarch64-linux-musl-strip.gz
vendored
BIN
third_party/gcc/bin/aarch64-linux-musl-strip.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/x86_64-linux-musl-addr2line.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-addr2line.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/x86_64-linux-musl-ar.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-ar.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/x86_64-linux-musl-as.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-as.gz
vendored
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
x86_64-linux-musl-g++
|
BIN
third_party/gcc/bin/x86_64-linux-musl-c++filt.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-c++filt.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/x86_64-linux-musl-g++.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-g++.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/x86_64-linux-musl-gcc-nm.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-gcc-nm.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/x86_64-linux-musl-gcc.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-gcc.gz
vendored
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
../x86_64-linux-musl/bin/ld.bfd
|
1
third_party/gcc/bin/x86_64-linux-musl-ld.sym
vendored
1
third_party/gcc/bin/x86_64-linux-musl-ld.sym
vendored
|
@ -1 +0,0 @@
|
|||
../x86_64-linux-musl/bin/ld.bfd
|
BIN
third_party/gcc/bin/x86_64-linux-musl-nm.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-nm.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/x86_64-linux-musl-objcopy.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-objcopy.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/x86_64-linux-musl-objdump.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-objdump.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/x86_64-linux-musl-strip.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-strip.gz
vendored
Binary file not shown.
97
third_party/gcc/config.mak
vendored
97
third_party/gcc/config.mak
vendored
|
@ -1,97 +0,0 @@
|
|||
#
|
||||
# config.mak.dist - sample musl-cross-make configuration
|
||||
#
|
||||
# Copy to config.mak and edit as desired.
|
||||
#
|
||||
|
||||
# There is no default TARGET; you must select one here or on the make
|
||||
# command line. Some examples:
|
||||
|
||||
# TARGET = i486-linux-musl
|
||||
TARGET = aarch64-linux-musl
|
||||
# TARGET = arm-linux-musleabi
|
||||
# TARGET = arm-linux-musleabihf
|
||||
# TARGET = sh2eb-linux-muslfdpic
|
||||
# TARGET = powerpc64le-linux-musl
|
||||
# TARGET = aarch64-linux-musl
|
||||
|
||||
# By default, cross compilers are installed to ./output under the top-level
|
||||
# musl-cross-make directory and can later be moved wherever you want them.
|
||||
# To install directly to a specific location, set it here. Multiple targets
|
||||
# can safely be installed in the same location. Some examples:
|
||||
|
||||
OUTPUT = /opt/cross11portcosmo
|
||||
# OUTPUT = /usr/local
|
||||
|
||||
# By default, latest supported release versions of musl and the toolchain
|
||||
# components are used. You can override those here, but the version selected
|
||||
# must be supported (under hashes/ and patches/) to work. For musl, you
|
||||
# can use "git-refname" (e.g. git-master) instead of a release. Setting a
|
||||
# blank version for gmp, mpc, mpfr and isl will suppress download and
|
||||
# in-tree build of these libraries and instead depend on pre-installed
|
||||
# libraries when available (isl is optional and not set by default).
|
||||
# Setting a blank version for linux will suppress installation of kernel
|
||||
# headers, which are not needed unless compiling programs that use them.
|
||||
|
||||
BINUTILS_VER = 2.35.2
|
||||
GCC_VER = 11.2.0
|
||||
# MUSL_VER = git-master
|
||||
# GMP_VER =
|
||||
# MPC_VER =
|
||||
# MPFR_VER =
|
||||
# ISL_VER =
|
||||
# LINUX_VER =
|
||||
|
||||
# By default source archives are downloaded with wget. curl is also an option.
|
||||
|
||||
# DL_CMD = wget -c -O
|
||||
# DL_CMD = curl -C - -L -o
|
||||
|
||||
# Check sha-1 hashes of downloaded source archives. On gnu systems this is
|
||||
# usually done with sha1sum.
|
||||
|
||||
# SHA1_CMD = sha1sum -c
|
||||
# SHA1_CMD = sha1 -c
|
||||
# SHA1_CMD = shasum -a 1 -c
|
||||
|
||||
# Something like the following can be used to produce a static-linked
|
||||
# toolchain that's deployable to any system with matching arch, using
|
||||
# an existing musl-targeted cross compiler. This only works if the
|
||||
# system you build on can natively (or via binfmt_misc and qemu) run
|
||||
# binaries produced by the existing toolchain (in this example, i486).
|
||||
|
||||
# MUSL_CONFIG += --enable-debug
|
||||
# MUSL_CONFIG += CFLAGS="-Os -fno-omit-frame-pointer -fno-optimize-sibling-calls -mno-omit-leaf-frame-pointer"
|
||||
MUSL_CONFIG += CFLAGS="-Os"
|
||||
|
||||
COMMON_CONFIG += CC="/opt/cross/bin/x86_64-linux-musl-gcc -static --static"
|
||||
COMMON_CONFIG += CXX="/opt/cross/bin/x86_64-linux-musl-g++ -static --static"
|
||||
# COMMON_CONFIG += CC="gcc -static --static"
|
||||
# COMMON_CONFIG += CXX="g++ -static --static"
|
||||
|
||||
# Recommended options for smaller build for deploying binaries:
|
||||
|
||||
COMMON_CONFIG += CFLAGS="-Os -g0"
|
||||
COMMON_CONFIG += CXXFLAGS="-Os -g0"
|
||||
COMMON_CONFIG += LDFLAGS="-s"
|
||||
|
||||
# Options you can add for faster/simpler build at the expense of features:
|
||||
|
||||
COMMON_CONFIG += --disable-nls
|
||||
GCC_CONFIG += --disable-libquadmath --disable-decimal-float
|
||||
GCC_CONFIG += --disable-libitm
|
||||
GCC_CONFIG += --disable-fixed-point
|
||||
GCC_CONFIG += --disable-lto
|
||||
|
||||
# By default C and C++ are the only languages enabled, and these are
|
||||
# the only ones tested and known to be supported. You can uncomment the
|
||||
# following and add other languages if you want to try getting them to
|
||||
# work too.
|
||||
|
||||
GCC_CONFIG += --enable-languages=c,c++ #--enable-plugin
|
||||
|
||||
# You can keep the local build path out of your toolchain binaries and
|
||||
# target libraries with the following, but then gdb needs to be told
|
||||
# where to look for source files.
|
||||
|
||||
# COMMON_CONFIG += --with-debug-prefix-map=$(CURDIR)=
|
|
@ -1 +0,0 @@
|
|||
../../../../bin/aarch64-linux-musl-as
|
Binary file not shown.
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
../../../../x86_64-linux-musl/bin/ld.bfd
|
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
../../../../bin/aarch64-linux-musl-ld.bfd
|
|
@ -1 +0,0 @@
|
|||
../../../../bin/aarch64-linux-musl-ld.bfd
|
|
@ -1 +0,0 @@
|
|||
../../../../bin/x86_64-linux-musl-as
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
1910
third_party/gcc/portcosmo.patch
vendored
1910
third_party/gcc/portcosmo.patch
vendored
File diff suppressed because it is too large
Load diff
37
third_party/gcc/upgrade-cosmo-gcc.sh
vendored
37
third_party/gcc/upgrade-cosmo-gcc.sh
vendored
|
@ -1,37 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
ARCH=${1:-x86_64}
|
||||
IMPORT=${2:-/opt/cross11portcosmo}
|
||||
PREFIX=third_party/gcc
|
||||
OLDVERSION=11.2.0
|
||||
NEWVERSION=11.2.0
|
||||
|
||||
rm -rf o/third_party/gcc
|
||||
if [ $OLDVERSION != $NEWVERSION ]; then
|
||||
mv $PREFIX/libexec/gcc/$ARCH-linux-musl/$OLDVERSION $PREFIX/libexec/gcc/$ARCH-linux-musl/$NEWVERSION
|
||||
mv $PREFIX/lib/gcc/$ARCH-linux-musl/$OLDVERSION $PREFIX/lib/gcc/$ARCH-linux-musl/$NEWVERSION
|
||||
sed -i -e "s/$OLDVERSION/$NEWVERSION/g" $(find $PREFIX -name \*.sym | grep $ARCH)
|
||||
fi
|
||||
|
||||
FILES="
|
||||
$ARCH-linux-musl/bin/ld.bfd
|
||||
libexec/gcc/$ARCH-linux-musl/$NEWVERSION/collect2
|
||||
libexec/gcc/$ARCH-linux-musl/$NEWVERSION/cc1
|
||||
libexec/gcc/$ARCH-linux-musl/$NEWVERSION/cc1plus
|
||||
bin/$ARCH-linux-musl-as
|
||||
bin/$ARCH-linux-musl-ar
|
||||
bin/$ARCH-linux-musl-gcc
|
||||
bin/$ARCH-linux-musl-g++
|
||||
bin/$ARCH-linux-musl-nm
|
||||
bin/$ARCH-linux-musl-objcopy
|
||||
bin/$ARCH-linux-musl-c++filt
|
||||
bin/$ARCH-linux-musl-addr2line
|
||||
bin/$ARCH-linux-musl-objdump
|
||||
bin/$ARCH-linux-musl-gcc-nm
|
||||
bin/$ARCH-linux-musl-strip
|
||||
"
|
||||
|
||||
for f in $FILES; do
|
||||
cp -f $IMPORT/$f $PREFIX/$f || exit
|
||||
gzip -f9 $PREFIX/$f || exit
|
||||
done
|
1
third_party/gcc/x86_64-linux-musl/bin/ar.sym
vendored
1
third_party/gcc/x86_64-linux-musl/bin/ar.sym
vendored
|
@ -1 +0,0 @@
|
|||
../../bin/x86_64-linux-musl-ar
|
1
third_party/gcc/x86_64-linux-musl/bin/as.sym
vendored
1
third_party/gcc/x86_64-linux-musl/bin/as.sym
vendored
|
@ -1 +0,0 @@
|
|||
../../bin/x86_64-linux-musl-as
|
BIN
third_party/gcc/x86_64-linux-musl/bin/ld.bfd.gz
vendored
BIN
third_party/gcc/x86_64-linux-musl/bin/ld.bfd.gz
vendored
Binary file not shown.
1
third_party/gcc/x86_64-linux-musl/bin/ld.sym
vendored
1
third_party/gcc/x86_64-linux-musl/bin/ld.sym
vendored
|
@ -1 +0,0 @@
|
|||
ld.bfd
|
1
third_party/gcc/x86_64-linux-musl/bin/nm.sym
vendored
1
third_party/gcc/x86_64-linux-musl/bin/nm.sym
vendored
|
@ -1 +0,0 @@
|
|||
../../bin/x86_64-linux-musl-nm
|
|
@ -1 +0,0 @@
|
|||
../../bin/x86_64-linux-musl-objcopy
|
|
@ -1 +0,0 @@
|
|||
../../bin/x86_64-linux-musl-objdump
|
|
@ -1 +0,0 @@
|
|||
../../bin/x86_64-linux-musl-strip
|
Loading…
Add table
Add a link
Reference in a new issue