mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-19 09:45:24 +01:00
Build tcc 0.9.27 immediately after tcc 0.9.26.
This commit is contained in:
parent
278b2390f7
commit
20c2d4c36e
27 changed files with 108 additions and 61 deletions
|
|
@ -1 +1 @@
|
|||
379d94b17a6762b5acd331cb3f216ff57f50ebd46835a1e8cc0117f4062a96dd /usr/bin/tcc
|
||||
dc73141eaa2b75fd6aaa085ef1945577b976ad1304e2875afe98ebc37a4f2f5d /usr/bin/tcc
|
||||
|
|
|
|||
|
|
@ -11,22 +11,19 @@ set -ex
|
|||
checksum-transcriber sources
|
||||
sha256sum -c sources.SHA256SUM
|
||||
|
||||
mkdir build src
|
||||
cd build
|
||||
|
||||
# Extract
|
||||
cp ${distfiles}/${pkg}.tar.bz2 ../src/
|
||||
bunzip2 -f ../src/${pkg}.tar.bz2
|
||||
tar xf ../src/${pkg}.tar
|
||||
mkdir build src
|
||||
cd src
|
||||
unbz2 --file ${distfiles}/${pkg}.tar.bz2 --output ${pkg}.tar
|
||||
cd ..
|
||||
|
||||
cd build
|
||||
untar --file ../src/${pkg}.tar
|
||||
cd ${pkg}
|
||||
|
||||
# Create config.h
|
||||
catm config.h
|
||||
|
||||
# Patch
|
||||
patch -Np0 -i ../../patches/static-link.patch
|
||||
patch -Np0 -i ../../patches/ignore-static-inside-array.patch
|
||||
|
||||
# Compile
|
||||
tcc-0.9.26 \
|
||||
-v \
|
||||
|
|
|
|||
45
sysa/tcc-0.9.27/tcc-mes-pass2.sh
Executable file
45
sysa/tcc-0.9.27/tcc-mes-pass2.sh
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
# SPDX-FileCopyrightText: 2021-2022 Andrius Štikonas <andrius@stikonas.eu>
|
||||
# SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
touch config.h
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export libdir=${PREFIX}/lib/mes
|
||||
export incdir=${PREFIX}/include/
|
||||
export bindir=${PREFIX}/bin
|
||||
|
||||
mkdir -p "${libdir}/tcc"
|
||||
|
||||
# We have to compile using tcc-0.9.26 as tcc-0.9.27 is not self-hosting when built with mes
|
||||
tcc-0.9.26 \
|
||||
-v \
|
||||
-static \
|
||||
-o tcc \
|
||||
-D TCC_TARGET_I386=1 \
|
||||
-D CONFIG_TCCDIR=\""${libdir}/tcc"\" \
|
||||
-D CONFIG_TCC_CRTPREFIX=\""${libdir}"\" \
|
||||
-D CONFIG_TCC_ELFINTERP=\"/mes/loader\" \
|
||||
-D CONFIG_TCC_LIBPATHS=\""${libdir}:${libdir}/tcc"\" \
|
||||
-D CONFIG_TCC_SYSINCLUDEPATHS=\""${incdir}"\" \
|
||||
-D TCC_LIBGCC=\""${libdir}/libc.a"\" \
|
||||
-D CONFIG_TCC_STATIC=1 \
|
||||
-D CONFIG_USE_LIBGCC=1 \
|
||||
-D TCC_VERSION=\"0.9.27\" \
|
||||
-D ONE_SOURCE=1 \
|
||||
tcc.c
|
||||
|
||||
# libtcc1.a
|
||||
tcc-0.9.26 -c -D HAVE_CONFIG_H=1 lib/libtcc1.c
|
||||
tcc-0.9.26 -ar cr "${libdir}/tcc/libtcc1.a" libtcc1.o
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Remove old tcc binaries
|
||||
install -D tcc "${DESTDIR}${bindir}/tcc"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue