libiberty

{{Short description|Software library}}

{{refimprove|date=October 2016}}

{{Infobox software

| title = {{PAGENAMEBASE}}

| logo =

| logo caption =

| logo alt =

| logo size =

| collapsible =

| screenshot =

| screenshot size =

| screenshot alt =

| caption =

| other_names =

| author =

| developer =

| released =

| ver layout =

| discontinued = yes

| latest release version =

| latest release date =

| latest preview version =

| latest preview date =

| repo = {{URL|https://gcc.gnu.org/git/}}

| qid =

| programming language = C

| middleware =

| operating system =

| platform =

| included with =

| replaces =

| replaced_by =

| service_name =

| size =

| standard =

| language =

| language count =

| language footnote =

| genre = Library

| license = LGPL-2.1-only

| website =

| AsOf =

}}

GNU libiberty is a software library with a collection of subroutines used by various GNU programs.{{Cite web|url=https://gcc.gnu.org/onlinedocs/libiberty/Using.html |title=Using (GNU libiberty) |publisher=GNU |website=gcc.gnu.org |access-date=September 3, 2022}} The library is now a decommissioned GNU package.{{cite web |title=Decommissioned GNU packages |url=https://www.gnu.org/software/software.html |publisher=GNU |website=gcc.gnu.org |access-date=September 3, 2022}}

It was originally intended to be a sort of standard cross-platform library, thus enabling it to be linked (using the usual Unix library form) by just passing "-liberty" to the compiler. The contents consisted of a variety of useful functions. However, the development of standards for C and POSIX took away some of the impetus for this, and libiberty came to be used primarily as a support library for the GNU toolchain. It still contains a minimal set of functions that are either GNU extensions or occasionally unimplemented parts of the standard.{{cite web |title=GNU libiberty: Functions |url=https://gcc.gnu.org/onlinedocs/libiberty/Functions.html |website=gcc.gnu.org |publisher=GNU |access-date=September 3, 2022}}

Copies of libiberty are distributed with gcc, gdb, and the binutils. libiberty is not otherwise versioned or released separately.

One important piece of libiberty functionality is a demangler for C++ and D, included so that it is available to both binutils and GDB.

The name is a pun or word play on the word "liberty". On Unix-like operating systems, library files are always named "lib" + the name of the library. But when they are linked to with a C compiler command (cc, gcc, etc.), the command line flag specifying the library is -l followed by the part of the library name after "lib". In libiberty's case it therefore becomes -liberty.

See also

{{Portal|Free and open-source software}}

  • Gnulib - the current GNU portability library

References

{{Reflist}}