mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Upgrade to Cosmopolitan GCC 11.2.0 for x86_64
This commit is contained in:
parent
682b74ed88
commit
39f20dbb13
137 changed files with 48523 additions and 34001 deletions
238
third_party/gcc/README.cosmo
vendored
238
third_party/gcc/README.cosmo
vendored
|
@ -1,232 +1,28 @@
|
|||
This is a modern statically-linked GNU C2X toolchain.
|
||||
DESCRIPTION
|
||||
|
||||
You have the freedom to obtain the original sources to these binaries,
|
||||
and build ones just like them, by visiting:
|
||||
Cosmopolitan GCC
|
||||
Prebuilt x86_64-linux binaries
|
||||
An APE-friendly C/C++ compiler
|
||||
|
||||
https://www.gnu.org/
|
||||
https://github.com/richfelker/musl-cross-make
|
||||
LICENSE
|
||||
|
||||
The musl-cross-make tool also produces libraries and header files. We've
|
||||
only vendored the statically-linked executable files, since Cosmopolitan
|
||||
won't depend on GPL-licensed headers / runtime libraries.
|
||||
GPLv3 and other licenses (see LICENSE.txt)
|
||||
|
||||
We haven't made any modifications to the original software. The versions
|
||||
we chose are documented in $PKG/LICENSE.txt. Here's our Musl
|
||||
build config for maximum transparency:
|
||||
ORIGIN
|
||||
|
||||
commit 38e52db8358c043ae82b346a2e6e66bc86a53bc1
|
||||
Author: Rich Felker <dalias@aerifal.cx>
|
||||
Date: Wed Dec 18 14:29:07 2019 -0500
|
||||
@ahgamut's musl-cross-make fork
|
||||
https://github.com/ahgamut/musl-cross-make/
|
||||
d0f33e2162cf5e5b30cdf3b3accc0d0f7756830c
|
||||
|
||||
switch linux kernel headers to 4.19.88 by default
|
||||
|
||||
using slim headers-only version. this change is needed to support all
|
||||
future versions of musl on 32-bit archs, since prior to 4.16 the
|
||||
kernel headers had incompatibility with userspace time_t not matching
|
||||
the kernel's old (32-bit) time_t. support for older headers will be
|
||||
dropped entirely soon.
|
||||
MODIFICATIONS
|
||||
|
||||
TARGET = x86_64-linux-musl
|
||||
OUTPUT = /opt/cross9
|
||||
GCC_VER = 9.2.0
|
||||
export LANG=en_US.UTF-8
|
||||
export LC_CTYPE=en_US.UTF-8
|
||||
COMMON_CONFIG += CC="/opt/cross9/bin/x86_64-linux-musl-cc -static --static -g -Os -ftree-vectorize -fvect-cost-model=unlimited -mstringop-strategy=vector_loop -save-temps -fno-ident"
|
||||
COMMON_CONFIG += CXX="/opt/cross9/bin/x86_64-linux-musl-c++ -static --static -g -Os -ftree-vectorize -fvect-cost-model=unlimited -mstringop-strategy=vector_loop -save-temps -fno-ident"
|
||||
COMMON_CONFIG += LD="/opt/cross9/bin/x86_64-linux-musl-ld --build-id=none"
|
||||
COMMON_CONFIG += NM="/opt/cross9/bin/x86_64-linux-musl-nm"
|
||||
COMMON_CONFIG += LDFLAGS="-Wl,--build-id=none"
|
||||
COMMON_CONFIG += OBJCOPY="/opt/cross9/bin/x86_64-linux-musl-objcopy"
|
||||
COMMON_CONFIG += --disable-nls --disable-lto
|
||||
GCC_CONFIG += --enable-languages=c,c++
|
||||
GCC_CONFIG += --disable-multilib
|
||||
GCC_CONFIG += --with-gnu-as
|
||||
GCC_CONFIG += --with-gnu-ld
|
||||
GCC_CONFIG += --disable-multilib
|
||||
GCC_CONFIG += --enable-sjlj-exceptions
|
||||
GCC_CONFIG += --disable-threads
|
||||
GCC_CONFIG += --disable-tls
|
||||
COMMON_CONFIG += --with-debug-prefix-map=$(CURDIR)=
|
||||
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.}`
|
||||
|
||||
#!/bin/sh
|
||||
set -e
|
||||
export LC_ALL=C
|
||||
export GUNZ="/bin/gzip --rsyncable -9 -c"
|
||||
BASE=/opt/cross9
|
||||
PKG=third_party/gcc
|
||||
VERS=9.2.0
|
||||
SEE ALSO
|
||||
|
||||
if [ ! -d $BASE ]; then
|
||||
echo error: run make install >&2
|
||||
exit 1
|
||||
fi
|
||||
third_party/gcc/portcosmo.patch
|
||||
|
||||
if [ -d $BASE/$PKG ]; then
|
||||
rm -rf $BASE/$PKG
|
||||
fi
|
||||
NOTES
|
||||
|
||||
mkdir -p $BASE/$PKG/bin
|
||||
mkdir -p $BASE/$PKG/libexec/gcc/x86_64-linux-musl/$VERS
|
||||
mkdir -p $BASE/$PKG/x86_64-linux-musl/bin
|
||||
|
||||
cp $BASE/bin/x86_64-linux-musl-gcov-dump $BASE/$PKG/bin/x86_64-linux-musl-gcov-dump
|
||||
cp $BASE/bin/x86_64-linux-musl-cc $BASE/$PKG/bin/x86_64-linux-musl-gcc
|
||||
cp $BASE/bin/x86_64-linux-musl-addr2line $BASE/$PKG/bin/x86_64-linux-musl-addr2line
|
||||
cp $BASE/bin/x86_64-linux-musl-ar $BASE/$PKG/bin/x86_64-linux-musl-ar
|
||||
cp $BASE/libexec/gcc/x86_64-linux-musl/9.2.0/cc1plus $BASE/$PKG/libexec/gcc/x86_64-linux-musl/9.2.0/cc1plus
|
||||
cp $BASE/bin/x86_64-linux-musl-c++ $BASE/$PKG/bin/x86_64-linux-musl-g++
|
||||
cp $BASE/libexec/gcc/x86_64-linux-musl/9.2.0/collect2 $BASE/$PKG/libexec/gcc/x86_64-linux-musl/9.2.0/collect2
|
||||
cp $BASE/bin/x86_64-linux-musl-gcc-nm $BASE/$PKG/bin/x86_64-linux-musl-gcc-nm
|
||||
cp $BASE/bin/x86_64-linux-musl-c++filt $BASE/$PKG/bin/x86_64-linux-musl-c++filt
|
||||
cp $BASE/bin/x86_64-linux-musl-elfedit $BASE/$PKG/bin/x86_64-linux-musl-elfedit
|
||||
cp $BASE/bin/x86_64-linux-musl-ld $BASE/$PKG/x86_64-linux-musl/bin/ld.bfd
|
||||
cp $BASE/bin/x86_64-linux-musl-size $BASE/$PKG/bin/x86_64-linux-musl-size
|
||||
cp $BASE/bin/x86_64-linux-musl-strings $BASE/$PKG/bin/x86_64-linux-musl-strings
|
||||
cp $BASE/bin/x86_64-linux-musl-objcopy $BASE/$PKG/bin/x86_64-linux-musl-objcopy
|
||||
cp $BASE/bin/x86_64-linux-musl-nm $BASE/$PKG/bin/x86_64-linux-musl-nm
|
||||
cp $BASE/libexec/gcc/x86_64-linux-musl/9.2.0/cc1 $BASE/$PKG/libexec/gcc/x86_64-linux-musl/9.2.0/cc1
|
||||
cp $BASE/bin/x86_64-linux-musl-readelf $BASE/$PKG/bin/x86_64-linux-musl-readelf
|
||||
cp $BASE/bin/x86_64-linux-musl-objdump $BASE/$PKG/bin/x86_64-linux-musl-objdump
|
||||
cp $BASE/bin/x86_64-linux-musl-gcc-ar $BASE/$PKG/bin/x86_64-linux-musl-gcc-ar
|
||||
cp $BASE/bin/x86_64-linux-musl-gcov $BASE/$PKG/bin/x86_64-linux-musl-gcov
|
||||
cp $BASE/bin/x86_64-linux-musl-ranlib $BASE/$PKG/bin/x86_64-linux-musl-ranlib
|
||||
cp $BASE/bin/x86_64-linux-musl-as $BASE/$PKG/bin/x86_64-linux-musl-as
|
||||
cp $BASE/bin/x86_64-linux-musl-gcc-ranlib $BASE/$PKG/bin/x86_64-linux-musl-gcc-ranlib
|
||||
cp $BASE/bin/x86_64-linux-musl-cpp $BASE/$PKG/bin/x86_64-linux-musl-cpp
|
||||
cp $BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-strip
|
||||
cp $BASE/bin/x86_64-linux-musl-gprof $BASE/$PKG/bin/x86_64-linux-musl-gprof
|
||||
cp $BASE/bin/x86_64-linux-musl-gcov-tool $BASE/$PKG/bin/x86_64-linux-musl-gcov-tool
|
||||
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-gcov-dump
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-gcc
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-addr2line
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-ar
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/libexec/gcc/x86_64-linux-musl/9.2.0/cc1plus
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-g++
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/libexec/gcc/x86_64-linux-musl/9.2.0/collect2
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-gcc-nm
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-c++filt
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-elfedit
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/x86_64-linux-musl/bin/ld.bfd
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-size
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-strings
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-objcopy
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-nm
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/libexec/gcc/x86_64-linux-musl/9.2.0/cc1
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-readelf
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-objdump
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-gcc-ar
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-gcov
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-ranlib
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-as
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-gcc-ranlib
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-cpp
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-strip
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-gprof
|
||||
$BASE/bin/x86_64-linux-musl-strip $BASE/$PKG/bin/x86_64-linux-musl-gcov-tool
|
||||
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-gcov-dump >$BASE/$PKG/bin/x86_64-linux-musl-gcov-dump.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-gcc >$BASE/$PKG/bin/x86_64-linux-musl-gcc.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-addr2line >$BASE/$PKG/bin/x86_64-linux-musl-addr2line.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-ar >$BASE/$PKG/bin/x86_64-linux-musl-ar.gz
|
||||
$GUNZ $BASE/$PKG/libexec/gcc/x86_64-linux-musl/9.2.0/cc1plus >$BASE/$PKG/libexec/gcc/x86_64-linux-musl/9.2.0/cc1plus.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-g++ >$BASE/$PKG/bin/x86_64-linux-musl-g++.gz
|
||||
$GUNZ $BASE/$PKG/libexec/gcc/x86_64-linux-musl/9.2.0/collect2 >$BASE/$PKG/libexec/gcc/x86_64-linux-musl/9.2.0/collect2.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-gcc-nm >$BASE/$PKG/bin/x86_64-linux-musl-gcc-nm.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-c++filt >$BASE/$PKG/bin/x86_64-linux-musl-c++filt.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-elfedit >$BASE/$PKG/bin/x86_64-linux-musl-elfedit.gz
|
||||
$GUNZ $BASE/$PKG/x86_64-linux-musl/bin/ld.bfd >$BASE/$PKG/x86_64-linux-musl/bin/ld.bfd.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-size >$BASE/$PKG/bin/x86_64-linux-musl-size.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-strings >$BASE/$PKG/bin/x86_64-linux-musl-strings.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-objcopy >$BASE/$PKG/bin/x86_64-linux-musl-objcopy.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-nm >$BASE/$PKG/bin/x86_64-linux-musl-nm.gz
|
||||
$GUNZ $BASE/$PKG/libexec/gcc/x86_64-linux-musl/9.2.0/cc1 >$BASE/$PKG/libexec/gcc/x86_64-linux-musl/9.2.0/cc1.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-readelf >$BASE/$PKG/bin/x86_64-linux-musl-readelf.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-objdump >$BASE/$PKG/bin/x86_64-linux-musl-objdump.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-gcc-ar >$BASE/$PKG/bin/x86_64-linux-musl-gcc-ar.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-gcov >$BASE/$PKG/bin/x86_64-linux-musl-gcov.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-ranlib >$BASE/$PKG/bin/x86_64-linux-musl-ranlib.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-as >$BASE/$PKG/bin/x86_64-linux-musl-as.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-gcc-ranlib >$BASE/$PKG/bin/x86_64-linux-musl-gcc-ranlib.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-cpp >$BASE/$PKG/bin/x86_64-linux-musl-cpp.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-strip >$BASE/$PKG/bin/x86_64-linux-musl-strip.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-gprof >$BASE/$PKG/bin/x86_64-linux-musl-gprof.gz
|
||||
$GUNZ $BASE/$PKG/bin/x86_64-linux-musl-gcov-tool >$BASE/$PKG/bin/x86_64-linux-musl-gcov-tool.gz
|
||||
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-gcov-dump
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-gcc
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-addr2line
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-ar
|
||||
rm $BASE/$PKG/libexec/gcc/x86_64-linux-musl/9.2.0/cc1plus
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-g++
|
||||
rm $BASE/$PKG/libexec/gcc/x86_64-linux-musl/9.2.0/collect2
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-gcc-nm
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-c++filt
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-elfedit
|
||||
rm $BASE/$PKG/x86_64-linux-musl/bin/ld.bfd
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-size
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-strings
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-objcopy
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-nm
|
||||
rm $BASE/$PKG/libexec/gcc/x86_64-linux-musl/9.2.0/cc1
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-readelf
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-objdump
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-gcc-ar
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-gcov
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-ranlib
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-as
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-gcc-ranlib
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-cpp
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-strip
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-gprof
|
||||
rm $BASE/$PKG/bin/x86_64-linux-musl-gcov-tool
|
||||
|
||||
ln -s x86_64-linux-musl-gcc $BASE/$PKG/bin/x86_64-linux-musl-cc
|
||||
ln -s x86_64-linux-musl-gcc $BASE/$PKG/bin/x86_64-linux-musl-gcc-9.2.0
|
||||
ln -s ../../bin/x86_64-linux-musl-ar $BASE/$PKG/x86_64-linux-musl/bin/ar
|
||||
ln -s x86_64-linux-musl-g++ $BASE/$PKG/bin/x86_64-linux-musl-c++
|
||||
ln -s ld.bfd $BASE/$PKG/x86_64-linux-musl/bin/ld
|
||||
ln -s ../x86_64-linux-musl/bin/ld.bfd $BASE/$PKG/bin/x86_64-linux-musl-ld.bfd
|
||||
ln -s ../x86_64-linux-musl/bin/ld.bfd $BASE/$PKG/bin/x86_64-linux-musl-ld
|
||||
ln -s ../../bin/x86_64-linux-musl-objcopy $BASE/$PKG/x86_64-linux-musl/bin/objcopy
|
||||
ln -s ../../bin/x86_64-linux-musl-nm $BASE/$PKG/x86_64-linux-musl/bin/nm
|
||||
ln -s ../../bin/x86_64-linux-musl-readelf $BASE/$PKG/x86_64-linux-musl/bin/readelf
|
||||
ln -s ../../bin/x86_64-linux-musl-objdump $BASE/$PKG/x86_64-linux-musl/bin/objdump
|
||||
ln -s ../../bin/x86_64-linux-musl-ranlib $BASE/$PKG/x86_64-linux-musl/bin/ranlib
|
||||
ln -s ../../bin/x86_64-linux-musl-as $BASE/$PKG/x86_64-linux-musl/bin/as
|
||||
ln -s ../../bin/x86_64-linux-musl-strip $BASE/$PKG/x86_64-linux-musl/bin/strip
|
||||
|
||||
{
|
||||
cat <<'EOF'
|
||||
This is a modern statically-linked GNU C2X toolchain.
|
||||
|
||||
You have the freedom to obtain the original sources to these binaries,
|
||||
and build ones just like them, by visiting:
|
||||
|
||||
https://www.gnu.org/
|
||||
https://github.com/richfelker/musl-cross-make
|
||||
|
||||
The musl-cross-make tool also produces libraries and header files. We've
|
||||
only vendored the statically-linked executable files, since Cosmopolitan
|
||||
won't depend on GPL-licensed headers / runtime libraries.
|
||||
|
||||
We haven't made any modifications to the original software. The versions
|
||||
we chose are documented in $PKG/LICENSE.txt. Here's our Musl
|
||||
build config for maximum transparency:
|
||||
|
||||
EOF
|
||||
git show --quiet
|
||||
echo
|
||||
cat config.mak
|
||||
echo
|
||||
cat bundle.sh
|
||||
} >$BASE/$PKG/README.cosmo
|
||||
|
||||
{
|
||||
for f in $(find . -iname \*copying\* -or -iname \*license\* | sort); do
|
||||
printf '\n'
|
||||
printf '%s\n' "$f"
|
||||
printf '========================================================================\n'
|
||||
cat "$f"
|
||||
done
|
||||
} >$BASE/$PKG/LICENSE.txt
|
||||
My name is Justine Tunney and I approve of these binaries.
|
||||
|
|
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.
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-cpp.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-cpp.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/x86_64-linux-musl-elfedit.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-elfedit.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-ar.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-gcc-ar.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-ranlib.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-gcc-ranlib.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.
BIN
third_party/gcc/bin/x86_64-linux-musl-gcov-dump.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-gcov-dump.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/x86_64-linux-musl-gcov-tool.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-gcov-tool.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/x86_64-linux-musl-gcov.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-gcov.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/x86_64-linux-musl-gprof.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-gprof.gz
vendored
Binary file not shown.
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-ranlib.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-ranlib.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/x86_64-linux-musl-readelf.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-readelf.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/x86_64-linux-musl-size.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-size.gz
vendored
Binary file not shown.
BIN
third_party/gcc/bin/x86_64-linux-musl-strings.gz
vendored
BIN
third_party/gcc/bin/x86_64-linux-musl-strings.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
Normal file
97
third_party/gcc/config.mak
vendored
Normal file
|
@ -0,0 +1,97 @@
|
|||
#
|
||||
# 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.25.1
|
||||
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)=
|
0
third_party/gcc/lib/gcc/x86_64-linux-musl/11.2.0/specs
vendored
Normal file
0
third_party/gcc/lib/gcc/x86_64-linux-musl/11.2.0/specs
vendored
Normal file
|
@ -1,141 +0,0 @@
|
|||
*asm:
|
||||
%{m16|m32:--32} %{m16|m32:;:--64} %{msse2avx:%{!mavx:-msse2avx}}
|
||||
|
||||
*asm_debug:
|
||||
%{%:debug-level-gt(0):%{gstabs*:--gstabs}%{!gstabs*:%{g*:--gdwarf2}}} %{fdebug-prefix-map=*:--debug-prefix-map %*}
|
||||
|
||||
*asm_final:
|
||||
%{gsplit-dwarf:
|
||||
objcopy --extract-dwo %{c:%{o*:%*}%{!o*:%b%O}}%{!c:%U%O} %{c:%{o*:%:replace-extension(%{o*:%*} .dwo)}%{!o*:%b.dwo}}%{!c:%b.dwo}
|
||||
objcopy --strip-dwo %{c:%{o*:%*}%{!o*:%b%O}}%{!c:%U%O} }
|
||||
|
||||
*asm_options:
|
||||
%{-target-help:%:print-asm-header()} %{v} %{w:-W} %{I*} %{gz|gz=zlib:--compress-debug-sections=zlib} %{gz=none:--compress-debug-sections=none} %{gz=zlib-gnu:--compress-debug-sections=zlib-gnu} %a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}
|
||||
|
||||
*invoke_as:
|
||||
%{!fwpa*: %{fcompare-debug=*|fdump-final-insns=*:%:compare-debug-dump-opt()} %{!S:-o %|.s |
|
||||
as %(asm_options) %m.s %A } }
|
||||
|
||||
*cpp:
|
||||
%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}
|
||||
|
||||
*cpp_options:
|
||||
%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w} %{f*} %{g*:%{%:debug-level-gt(0):%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*} %{undef} %{save-temps*:-fpch-preprocess}
|
||||
|
||||
*cpp_debug_options:
|
||||
%{d*}
|
||||
|
||||
*cpp_unique_options:
|
||||
%{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v} %@{I*&F*} %{P} %I %{MD:-MD %{!o:%b.d}%{o*:%.d%*}} %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}} %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*} %{!E:%{!M:%{!MM:%{!MT:%{!MQ:%{MD|MMD:%{o*:-MQ %*}}}}}}} %{remap} %{g3|ggdb3|gstabs3|gxcoff3|gvms3:-dD} %{!iplugindir*:%{fplugin*:%:find-plugindir()}} %{H} %C %{D*&U*&A*} %{i*} %Z %i %{E|M|MM:%W{o*}}
|
||||
|
||||
*trad_capable_cpp:
|
||||
cc1 -E %{traditional|traditional-cpp:-traditional-cpp}
|
||||
|
||||
*cc1:
|
||||
%{!mandroid|tno-android-cc:%(cc1_cpu) %{profile:-p};:%(cc1_cpu) %{profile:-p} %{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: -fPIC}}}}}
|
||||
|
||||
*cc1_options:
|
||||
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}} %{!iplugindir*:%{fplugin*:%:find-plugindir()}} %1 %{!Q:-quiet} %{!dumpbase:-dumpbase %B} %{d*} %{m*} %{aux-info*} %{fcompare-debug-second:%:compare-debug-auxbase-opt(%b)} %{!fcompare-debug-second:%{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}}%{!c:%{!S:-auxbase %b}} %{g*} %{O*} %{W*&pedantic*} %{w} %{std*&ansi&trigraphs} %{v:-version} %{pg:-p} %{p} %{f*} %{undef} %{Qn:-fno-ident} %{Qy:} %{-help:--help} %{-target-help:--target-help} %{-version:--version} %{-help=*:--help=%*} %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}} %{fsyntax-only:-o %j} %{-param*} %{coverage:-fprofile-arcs -ftest-coverage} %{fprofile-arcs|fprofile-generate*|coverage: %{!fprofile-update=single: %{pthread:-fprofile-update=prefer-atomic}}}
|
||||
|
||||
*cc1plus:
|
||||
|
||||
|
||||
*link_gcc_c_sequence:
|
||||
%{static|static-pie:--start-group} %G %{!nolibc:%L} %{static|static-pie:--end-group}%{!static:%{!static-pie:%G}}
|
||||
|
||||
*link_ssp:
|
||||
%{fstack-protector|fstack-protector-all|fstack-protector-strong|fstack-protector-explicit:-lssp_nonshared}
|
||||
|
||||
*endfile:
|
||||
--push-state --pop-state
|
||||
|
||||
*link:
|
||||
%{!mandroid|tno-android-ld:%{m16|m32:;:-m elf_x86_64} %{m16|m32:-m elf_i386} %{shared:-shared} %{!shared: %{!static: %{!static-pie: %{rdynamic:-export-dynamic} }} %{static:-static} %{static-pie:-static -pie --no-dynamic-linker -z text}};:%{m16|m32:;:-m elf_x86_64} %{m16|m32:-m elf_i386} %{mx32:-m elf32_x86_64} %{shared:-shared} %{!shared: %{!static: %{!static-pie: %{rdynamic:-export-dynamic} %{m16|m32:-dynamic-linker } %{m16|m32:;:-dynamic-linker} }} %{static:-static} %{static-pie:-static -pie --no-dynamic-linker -z text}} %{shared: -Bsymbolic}}
|
||||
|
||||
*lib:
|
||||
--push-state --pop-state
|
||||
|
||||
*link_gomp:
|
||||
|
||||
|
||||
*libgcc:
|
||||
--push-state --pop-state
|
||||
|
||||
*startfile:
|
||||
--push-state --pop-state
|
||||
|
||||
*cross_compile:
|
||||
1
|
||||
|
||||
*version:
|
||||
9.2.0
|
||||
|
||||
*multilib:
|
||||
. ;
|
||||
|
||||
*multilib_defaults:
|
||||
m64
|
||||
|
||||
*multilib_extra:
|
||||
|
||||
|
||||
*multilib_matches:
|
||||
|
||||
|
||||
*multilib_exclusions:
|
||||
|
||||
|
||||
*multilib_options:
|
||||
|
||||
|
||||
*multilib_reuse:
|
||||
|
||||
|
||||
*linker:
|
||||
collect2
|
||||
|
||||
*linker_plugin_file:
|
||||
|
||||
|
||||
*lto_wrapper:
|
||||
|
||||
|
||||
*lto_gcc:
|
||||
|
||||
|
||||
*post_link:
|
||||
|
||||
|
||||
*link_libgcc:
|
||||
%D
|
||||
|
||||
*md_exec_prefix:
|
||||
|
||||
|
||||
*md_startfile_prefix:
|
||||
|
||||
|
||||
*md_startfile_prefix_1:
|
||||
|
||||
|
||||
*startfile_prefix_spec:
|
||||
|
||||
|
||||
*sysroot_spec:
|
||||
--sysroot=%R
|
||||
|
||||
*sysroot_suffix_spec:
|
||||
|
||||
|
||||
*sysroot_hdrs_suffix_spec:
|
||||
|
||||
|
||||
*self_spec:
|
||||
|
||||
|
||||
*cc1_cpu:
|
||||
%{march=native:%>march=native %:local_cpu_detect(arch) %{!mtune=*:%>mtune=native %:local_cpu_detect(tune)}} %{mtune=native:%>mtune=native %:local_cpu_detect(tune)}
|
||||
|
||||
*link_command:
|
||||
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S: %(linker) %{fuse-linker-plugin: %e-fuse-linker-plugin is not supported in this configuration}%{flto|flto=*:%<fcompare-debug*} %{flto} %{fno-lto} %{flto=*} %l %{shared|r:;pie|static-pie:-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic}} %{fuse-ld=*:-fuse-ld=%*} %{gz|gz=zlib:--compress-debug-sections=zlib} %{gz=none:--compress-debug-sections=none} %{gz=zlib-gnu:--compress-debug-sections=zlib-gnu} %X %{o*} %{e*} %{N} %{n} %{r} %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} %{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) %{fvtable-verify=none:} %{fvtable-verify=std: %e-fvtable-verify=std is not supported in this configuration} %{fvtable-verify=preinit: %e-fvtable-verify=preinit is not supported in this configuration} %{!nostdlib:%{!r:%{!nodefaultlibs:%{%:sanitize(address):%{!shared:libasan_preinit%O%s} %{static-libasan:%{!shared:-Bstatic --whole-archive -lasan --no-whole-archive -Bdynamic}}%{!static-libasan:-lasan}} %{%:sanitize(thread):%{!shared:libtsan_preinit%O%s} %{static-libtsan:%{!shared:-Bstatic --whole-archive -ltsan --no-whole-archive -Bdynamic}}%{!static-libtsan:-ltsan}} %{%:sanitize(leak):%{!shared:liblsan_preinit%O%s} %{static-liblsan:%{!shared:-Bstatic --whole-archive -llsan --no-whole-archive -Bdynamic}}%{!static-liblsan:-llsan}}}}} %o %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1): %:include(libgomp.spec)%(link_gomp)} %{fgnu-tm:%:include(libitm.spec)%(link_itm)} %(mflib) %{fsplit-stack: --wrap=pthread_create} %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} %{!nostdlib:%{!r:%{!nodefaultlibs:%{%:sanitize(address): %{static-libasan|static:%:include(libsanitizer.spec)%(link_libasan)} %{static:%ecannot specify -static with -fsanitize=address}} %{%:sanitize(thread): %{static-libtsan|static:%:include(libsanitizer.spec)%(link_libtsan)} %{static:%ecannot specify -static with -fsanitize=thread}} %{%:sanitize(undefined):%{static-libubsan:-Bstatic} -lubsan %{static-libubsan:-Bdynamic} %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}} %{%:sanitize(leak): %{static-liblsan|static:%:include(libsanitizer.spec)%(link_liblsan)}}}}} %{!nostdlib:%{!r:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}} %{!nostdlib:%{!r:%{!nostartfiles:%E}}} %{T*}
|
||||
%(post_link) }}}}}}
|
BIN
third_party/gcc/libexec/gcc/x86_64-linux-musl/11.2.0/cc1.gz
vendored
Normal file
BIN
third_party/gcc/libexec/gcc/x86_64-linux-musl/11.2.0/cc1.gz
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
third_party/gcc/libexec/gcc/x86_64-linux-musl/11.2.0/collect2.gz
vendored
Normal file
BIN
third_party/gcc/libexec/gcc/x86_64-linux-musl/11.2.0/collect2.gz
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
1869
third_party/gcc/portcosmo.patch
vendored
Normal file
1869
third_party/gcc/portcosmo.patch
vendored
Normal file
File diff suppressed because it is too large
Load diff
46
third_party/gcc/upgrade-cosmo-gcc.sh
vendored
Executable file
46
third_party/gcc/upgrade-cosmo-gcc.sh
vendored
Executable file
|
@ -0,0 +1,46 @@
|
|||
#!/bin/sh
|
||||
|
||||
ARCH=${1:-x86_64}
|
||||
IMPORT=${2:-/opt/cross11portcosmo}
|
||||
PREFIX=third_party/gcc/
|
||||
OLDVERSION=9.2.0
|
||||
NEWVERSION=11.2.0
|
||||
|
||||
rm -rf o/third_party/gcc
|
||||
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)
|
||||
|
||||
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-elfedit
|
||||
bin/$ARCH-linux-musl-nm
|
||||
bin/$ARCH-linux-musl-objcopy
|
||||
bin/$ARCH-linux-musl-gcc
|
||||
bin/$ARCH-linux-musl-c++filt
|
||||
bin/$ARCH-linux-musl-gcc-ranlib
|
||||
bin/$ARCH-linux-musl-addr2line
|
||||
bin/$ARCH-linux-musl-objdump
|
||||
bin/$ARCH-linux-musl-gcov
|
||||
bin/$ARCH-linux-musl-ranlib
|
||||
bin/$ARCH-linux-musl-gcc-nm
|
||||
bin/$ARCH-linux-musl-strip
|
||||
bin/$ARCH-linux-musl-gcov-tool
|
||||
bin/$ARCH-linux-musl-gprof
|
||||
bin/$ARCH-linux-musl-strings
|
||||
bin/$ARCH-linux-musl-gcov-dump
|
||||
bin/$ARCH-linux-musl-cpp
|
||||
bin/$ARCH-linux-musl-ar
|
||||
bin/$ARCH-linux-musl-readelf
|
||||
bin/$ARCH-linux-musl-size
|
||||
bin/$ARCH-linux-musl-as
|
||||
bin/$ARCH-linux-musl-g++
|
||||
bin/$ARCH-linux-musl-gcc-ar
|
||||
"
|
||||
|
||||
for f in $FILES; do
|
||||
gzip -9 <$IMPORT/$f >$PREFIX/$f.gz || exit
|
||||
done
|
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.
Loading…
Add table
Add a link
Reference in a new issue