2014-08-09 16:57:58 +00:00
|
|
|
SUMMARY="A small and fast C compiler"
|
|
|
|
DESCRIPTION="* SMALL! You can compile and execute C code everywhere, for \
|
|
|
|
example on rescue disks (about 100KB for x86 TCC executable, including C \
|
|
|
|
preprocessor, C compiler, assembler and linker).
|
|
|
|
* FAST! tcc generates x86 code. No byte code overhead. Compile, assemble and \
|
|
|
|
link several times faster than GCC.
|
|
|
|
* UNLIMITED! Any C dynamic library can be used directly. TCC is heading \
|
|
|
|
torward full ISOC99 compliance. TCC can of course compile itself.
|
|
|
|
* SAFE! tcc includes an optional memory and bound checker. Bound checked code \
|
|
|
|
can be mixed freely with standard code.
|
|
|
|
* Compile and execute C source directly. No linking or assembly necessary. \
|
|
|
|
Full C preprocessor and GNU-like assembler included.
|
|
|
|
* C script supported : just add '#!/usr/local/bin/tcc -run' at the first line \
|
|
|
|
of your C source, and execute it directly from the command line.
|
2016-02-26 15:33:51 +00:00
|
|
|
* With libtcc, you can use TCC as a backend for dynamic code generation."
|
2018-05-30 06:15:46 +00:00
|
|
|
HOMEPAGE="https://bellard.org/tcc/"
|
2016-02-17 19:26:37 +00:00
|
|
|
COPYRIGHT="2001-2014 Fabrice Bellard"
|
|
|
|
LICENSE="GNU LGPL v2"
|
2018-08-06 14:44:28 +00:00
|
|
|
REVISION="3"
|
2015-07-02 15:12:32 +00:00
|
|
|
SOURCE_URI="http://download.savannah.gnu.org/releases/tinycc/tcc-0.9.26.tar.bz2"
|
2014-08-09 16:57:58 +00:00
|
|
|
CHECKSUM_SHA256="521e701ae436c302545c3f973a9c9b7e2694769c71d9be10f70a2460705b6d71"
|
|
|
|
PATCHES="tcc-$portVersion.patchset"
|
|
|
|
|
2021-09-15 19:40:18 +00:00
|
|
|
ARCHITECTURES="?all !x86_gcc2"
|
2017-12-12 00:37:43 +00:00
|
|
|
SECONDARY_ARCHITECTURES="x86"
|
2014-08-09 16:57:58 +00:00
|
|
|
|
|
|
|
PROVIDES="
|
2017-12-10 12:49:50 +00:00
|
|
|
tcc$secondaryArchSuffix = $portVersion
|
|
|
|
cmd:arm_eabi_tcc$secondaryArchSuffix
|
|
|
|
cmd:arm_fpa_ld_tcc$secondaryArchSuffix
|
|
|
|
cmd:arm_fpa_tcc$secondaryArchSuffix
|
|
|
|
cmd:arm_vfp_tcc$secondaryArchSuffix
|
|
|
|
cmd:c67_tcc$secondaryArchSuffix
|
|
|
|
cmd:i386_win32_tcc$secondaryArchSuffix
|
|
|
|
cmd:tcc$secondaryArchSuffix
|
|
|
|
cmd:x86_64_tcc$secondaryArchSuffix
|
|
|
|
cmd:x86_64_win32_tcc$secondaryArchSuffix
|
2016-02-26 15:33:51 +00:00
|
|
|
"
|
2014-08-09 16:57:58 +00:00
|
|
|
REQUIRES="
|
2017-12-10 12:49:50 +00:00
|
|
|
haiku$secondaryArchSuffix
|
2016-02-26 15:33:51 +00:00
|
|
|
"
|
2014-08-09 16:57:58 +00:00
|
|
|
|
2016-02-17 19:26:37 +00:00
|
|
|
PROVIDES_devel="
|
2018-08-06 14:44:28 +00:00
|
|
|
tcc${secondaryArchSuffix}_devel = $portVersion
|
2017-12-10 12:49:50 +00:00
|
|
|
devel:libtcc$secondaryArchSuffix
|
2016-02-21 02:13:04 +00:00
|
|
|
"
|
|
|
|
REQUIRES_devel="
|
|
|
|
"
|
2018-08-06 13:04:59 +00:00
|
|
|
|
2014-08-09 16:57:58 +00:00
|
|
|
BUILD_PREREQUIRES="
|
2017-12-10 12:49:50 +00:00
|
|
|
haiku${secondaryArchSuffix}_devel
|
|
|
|
cmd:gcc$secondaryArchSuffix
|
2014-08-09 16:57:58 +00:00
|
|
|
cmd:make
|
2016-02-29 01:17:42 +00:00
|
|
|
"
|
2014-08-09 16:57:58 +00:00
|
|
|
|
|
|
|
BUILD()
|
|
|
|
{
|
2017-12-10 12:49:50 +00:00
|
|
|
local hybrid
|
|
|
|
# Borrowed from gcc
|
|
|
|
local sysincdir=(
|
|
|
|
"/boot/system/develop/headers/os"
|
|
|
|
"/boot/system/develop/headers/os/app"
|
|
|
|
"/boot/system/develop/headers/os/device"
|
|
|
|
"/boot/system/develop/headers/os/drivers"
|
|
|
|
"/boot/system/develop/headers/os/game"
|
|
|
|
"/boot/system/develop/headers/os/interface"
|
|
|
|
"/boot/system/develop/headers/os/kernel"
|
|
|
|
"/boot/system/develop/headers/os/locale"
|
|
|
|
"/boot/system/develop/headers/os/mail"
|
|
|
|
"/boot/system/develop/headers/os/media"
|
|
|
|
"/boot/system/develop/headers/os/midi"
|
|
|
|
"/boot/system/develop/headers/os/midi2"
|
|
|
|
"/boot/system/develop/headers/os/net"
|
|
|
|
"/boot/system/develop/headers/os/opengl"
|
|
|
|
"/boot/system/develop/headers/os/storage"
|
|
|
|
"/boot/system/develop/headers/os/support"
|
|
|
|
"/boot/system/develop/headers/os/translation"
|
|
|
|
"/boot/system/develop/headers/os/add-ons/graphics"
|
|
|
|
"/boot/system/develop/headers/os/add-ons/input_server"
|
|
|
|
"/boot/system/develop/headers/os/add-ons/mail_daemon"
|
|
|
|
"/boot/system/develop/headers/os/add-ons/registrar"
|
|
|
|
"/boot/system/develop/headers/os/add-ons/screen_saver"
|
|
|
|
"/boot/system/develop/headers/os/add-ons/tracker"
|
|
|
|
"/boot/system/develop/headers/os/be_apps/Deskbar"
|
|
|
|
"/boot/system/develop/headers/os/be_apps/NetPositive"
|
|
|
|
"/boot/system/develop/headers/os/be_apps/Tracker"
|
|
|
|
"/boot/system/develop/headers/3rdparty"
|
|
|
|
"/boot/system/develop/headers/bsd"
|
|
|
|
"/boot/system/develop/headers/glibc"
|
|
|
|
"/boot/system/develop/headers/gnu"
|
|
|
|
"/boot/system/develop/headers/posix"
|
|
|
|
)
|
|
|
|
if [ -n "$secondaryArchSuffix" ]; then
|
|
|
|
hybrid="${secondaryArchSuffix#_}"
|
|
|
|
sysincdir=("/boot/system/non-packaged/develop/headers/$hybrid"
|
|
|
|
${sysincdir[@]}
|
|
|
|
"/boot/system/develop/headers/$hybrid"
|
|
|
|
"/boot/system/develop/headers/$hybrid/os"
|
|
|
|
"/boot/system/develop/headers/$hybrid/os/opengl")
|
|
|
|
else
|
|
|
|
sysincdir=("/boot/system/non-packaged/develop/headers"
|
|
|
|
${sysincdir[@]})
|
|
|
|
fi
|
|
|
|
|
|
|
|
sysincdir+=("/boot/system/develop/headers"
|
|
|
|
# TCC owns include paths, refer to tcc.h
|
|
|
|
"{B}/include")
|
|
|
|
|
|
|
|
local crtpre=("/boot/system/non-packaged/develop/lib${hybrid:+/$hybrid}"
|
|
|
|
"/boot/system/develop/lib${hybrid:+/$hybrid}")
|
|
|
|
|
|
|
|
local libdir=(${crtpre[@]}
|
|
|
|
"/boot/system/non-packaged/lib${hybrid:+/$hybrid}"
|
|
|
|
"/boot/system/lib${hybrid:+/$hybrid}")
|
|
|
|
|
|
|
|
runConfigure ./configure --enable-cross \
|
|
|
|
--sysincludepaths=$(IFS=:; echo "${sysincdir[*]}") \
|
|
|
|
--libpaths=$(IFS=:; echo "${libdir[*]}") \
|
|
|
|
--crtprefix=$(IFS=:; echo "${crtpre[*]}") \
|
|
|
|
--elfinterp=/system/runtime_loader
|
2014-08-09 16:57:58 +00:00
|
|
|
make $jobArgs
|
|
|
|
}
|
|
|
|
|
|
|
|
INSTALL()
|
|
|
|
{
|
|
|
|
make install
|
|
|
|
prepareInstalledDevelLib libtcc
|
|
|
|
packageEntries devel $developDir
|
|
|
|
}
|
2017-12-10 12:49:50 +00:00
|
|
|
|
|
|
|
TEST()
|
|
|
|
{
|
|
|
|
if [ "$targetArchitecture" == "x86_gcc2" && -z "$secondaryArchSuffix" ]; then
|
|
|
|
echo "Sorry, test doesn't support gcc2"
|
|
|
|
else
|
|
|
|
make test
|
|
|
|
fi
|
|
|
|
}
|