Package Details: lcc-compiler 4.2-1

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: http://www.cs.princeton.edu/software/lcc/
Licenses: custom
Submitter: None
Maintainer: aksr
Last Packager: aksr
Votes: 4
Popularity: 0.177406
First Submitted: 2011-06-30 05:37
Last Updated: 2016-04-24 15:44

Dependencies (1)

Required by (0)

Sources (1)

Latest Comments

Hekuran commented on 2021-09-14 14:18

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

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

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

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

perlawk commented on 2014-04-19 14:06

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

perlawk commented on 2014-04-19 14:01

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

andreas_baumann commented on 2011-10-15 18:39

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

I get a conflict with /usr/bin/rcc from the qt package:

pacman -Ql qt | grep /usr/bin/rcc

qt /usr/bin/rcc