---
name: "ligcc"
section: "1"
platform: "linux"
package: "limba-licompile"
version: "0.5.6-2+b2"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/ligcc"
---

# ligcc(1)

Wrapper around gcc to create more portable apps

## NAME

ligcc - Wrapper around gcc to create more portable apps

## SYNOPSIS

**ligcc** \[**OPTION ...**\]

## DESCRIPTION

This manual page documents briefly the **ligcc** command.

**ligcc** is a wrapper around gcc. It allows you to create more portable executables by doing three things:

• Forces the linker to link against older glibc symbols. Users who are using an older version of glibc will no longer get "undefined symbol GLIBC\_2.4 in /lib/libc.so"-style error messages.

• Allows you to easily statically link to any other library.

• Automatically removes bogus dependencies. For example, your program uses libfoo. libfoo uses libpng internally, but your app does not. Yet the pkg-config file for libfoo specifies "-lfoo -lpng" is linker parameters. And tadaa - you now have a bogus dependency on libpng! LiGCC automatically removes the -lpng for you if your app doesn't use libpng directly.

• Add $ORIGIN/../lib to the binary's library search path. $ORIGIN is the directory in which the binary exists. This ensures that your binary can find library dependencies which are placed in the 'lib' folder under the same prefix. You might want to install custom libraries into /lib. If you set $APBUILD\_PROJECTNAME, ligcc will also add $ORIGIN/../lib/$APBUILD\_PROJECTNAME to the library search path.

## OPTIONS

See the manpage of [gcc(1)](/gcc/1.md) for more information about possible options.

There are also several environment variables available to modify ligcc's behavior check the documentation for more information.

## SEE ALSO

lig++ (1), [gcc(1)](/gcc/1.md).

Additional documentation can be found on http://people.freedesktop.org/~mak/limba.

## AUTHOR

This manual page was written by Matthias Klumpp \<matthias@tenstral.net\>.

## COPYRIGHT

Copyright © 2010-2014 Matthias Klumpp\
