Package Details: lcc-compiler 4.2-2

Git Clone URL: https://aur.archlinux.org/lcc-compiler.git (read-only, click to copy)
Package Base: lcc-compiler
Description: A small and fast C compiler.
Upstream URL: https://drh.github.io/lcc/
Licenses: custom
Submitter: None
Maintainer: aksr
Last Packager: aksr
Votes: 4
Popularity: 0.000000
First Submitted: 2011-06-30 05:37 (UTC)
Last Updated: 2023-01-01 21:08 (UTC)

Dependencies (1)

Required by (0)

Sources (1)

Latest Comments

kseistrup commented on 2023-01-01 14:49 (UTC)

Please notice that the current PKGBUILD file puts the man-pages in /usr/man/man1/. The correct place is /usr/share/man/man1/.

Hekuran commented on 2021-09-14 14:18 (UTC)

This tarball is very old from 2007. While the last commit in the new github repo, ist from january 2021. https://github.com/drh/lcc

The package builds with just changing the souce and the two cd commands. Though i have not tested the program. here is the git diff:

diff --git a/PKGBUILD b/PKGBUILD
index 0ddc794..b806a9e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,24 +6,22 @@ pkgver=4.2
 pkgrel=1
 pkgdesc="A small and fast C compiler."
 arch=('i686' 'x86_64')
-url='http://www.cs.princeton.edu/software/lcc/'
+url='https://github.com/drh/lcc'
 license=('custom')
 makedepends=('gcc')
-source=("ftp://ftp.cs.princeton.edu/pub/packages/${_pkgname}/${_pkgname}-$pkgver.tar.gz")
+source=("git+${url}.git")
 install=${pkgname}.install
-md5sums=('2c4826936b4486f3b0445a2ddb6cd642')
-sha1sums=('40353f5dc66ac62cc27abe1e7ef09ad31be9168d')
-sha256sums=('05d3e2b2824b30e9860621de1568a0a0f2028182955c5fedd68474a7bcab5d00')
+sha256sums=('SKIP')

 build() {
-  cd $srcdir/${_pkgname}-$pkgver
+  cd $srcdir/${_pkgname}
   mkdir -p ${_pkgname}
   BUILDDIR=lcc make -j2 CFLAGS="-O2 -DLCCDIR='\"/usr/lib/lcc/\"'" HOSTFILE=./etc/linux.c lcc
   BUILDDIR=lcc make -j2 CFLAGS="-O2 -DLCCDIR='\"/usr/lib/lcc/\"'" all
 }

 package() {
-  cd $srcdir/${_pkgname}-$pkgver/${_pkgname}
+  cd $srcdir/${_pkgname}/${_pkgname}
   mkdir -p $pkgdir/usr/{bin,lib/${_pkgname}/include,man/man1}
   install -Dm755 bprint $pkgdir/usr/bin/bprint
   install -Dm755 lburg $pkgdir/usr/bin/lburg

andreas_baumann commented on 2020-08-06 08:37 (UTC) (edited on 2020-08-06 08:38 (UTC) by andreas_baumann)

cat > hello.c <<EOF

#include <stdio.h>

int main( int argc, char *argv[] )
{
        puts( "Hello" );
        return 0;
}
EOF
lcc -o hello hello.c
cpp: /usr/include/features.h:187 /usr/include/bits/libc-header-start.h:33 /usr/include/stdio.h:27 hello.c:1 Unknown preprocessor control warning
cpp: /usr/include/features.h:397 /usr/include/bits/libc-header-start.h:33 /usr/include/stdio.h:27 hello.c:1 Unknown preprocessor control warning
cpp: /usr/include/features.h:399 /usr/include/bits/libc-header-start.h:33 /usr/include/stdio.h:27 hello.c:1 Unknown preprocessor control warning
lcc: fatal error in /usr/lib/lcc/gcc/cpp

There might be gcc-ism or/and glibc-isms everywhere in the copied header files. Unless upstream makes sure the lcc preprocessor can read those, one can not compile simple programs it seems.

andreas_baumann commented on 2020-08-06 08:33 (UTC) (edited on 2020-08-06 08:38 (UTC) by andreas_baumann)

ln -s /usr/lib/gcc/*-linux-gnu/*/include/*
ln -s /usr/lib/gcc/*-linux-gnu/*/crt*

should be more explicit:

ln -s /usr/lib/gcc/x86_64-pc-linux-gnu/*/include/*
ln -s /usr/lib/gcc/x86_64-pc-linux-gnu/*/crt*

Some people might have gcc-cross-compilers installed in /usr/lib/gcc (for instance I have: avr riscv64-linux-gnu x86_64-pc-linux-gnu).

Using the wildcard results in "file exists" errors.

aksr commented on 2015-07-16 14:56 (UTC)

perlawk: I renamed rcc to lcc-rcc to avoid a conflict with qtchooser.

perlawk commented on 2014-04-19 14:06 (UTC)

suggest to rename the rcc to lrcc and add some warning to the package user.

perlawk commented on 2014-04-19 14:01 (UTC)

failed to compile: to fix: install=lcc.install

andreas_baumann commented on 2011-10-15 18:39 (UTC)

Spoiler alert: During package build (yes I know, never build as root), some parts of gcc get replaced with fatal effects for gcc.

andreas_baumann commented on 2011-10-12 17:58 (UTC)

I get a conflict with /usr/bin/rcc from the qt package: pacman -Ql qt | grep /usr/bin/rcc qt /usr/bin/rcc