ports/tcc: Fix 32 bit build and add version name
tcc was using "Linux" for machine name in version string if it was not explicitly specified.
This commit is contained in:
@@ -4,11 +4,16 @@ NAME='tcc'
|
||||
VERSION='0.9.27'
|
||||
DOWNLOAD_URL="https://download.savannah.gnu.org/releases/tinycc/tcc-$VERSION.tar.bz2#de23af78fca90ce32dff2dd45b3432b2334740bb9bb7b05bf60fdbfc396ceb9c"
|
||||
|
||||
tcc_arch=$BANAN_ARCH
|
||||
if [ $tcc_arch = 'i686' ]; then
|
||||
tcc_arch='i386'
|
||||
fi
|
||||
|
||||
configure() {
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--sysroot=$BANAN_SYSROOT \
|
||||
--cpu=$BANAN_ARCH \
|
||||
--cpu=$tcc_arch \
|
||||
--enable-cross \
|
||||
--cross-prefix=$BANAN_TOOLCHAIN_TRIPLE- \
|
||||
--sysincludepaths=/usr/include:/usr/lib/tcc/include \
|
||||
@@ -19,10 +24,10 @@ configure() {
|
||||
|
||||
build() {
|
||||
touch $BANAN_SYSROOT/usr/include/sys/ucontext.h
|
||||
make -j$(nproc) cross-$BANAN_ARCH $BANAN_ARCH-libtcc1-usegcc=yes || exit 1
|
||||
make -j$(nproc) cross-$tcc_arch $tcc_arch-libtcc1-usegcc=yes || exit 1
|
||||
}
|
||||
|
||||
install() {
|
||||
make install-unx DESTDIR=$BANAN_SYSROOT || exit 1
|
||||
ln -sf $BANAN_ARCH-tcc $BANAN_SYSROOT/usr/bin/tcc
|
||||
ln -sf $tcc_arch-tcc $BANAN_SYSROOT/usr/bin/tcc
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user